# Cancel pending actions and return back to previous step

**URL:** <https://discuss.workflowgen.com/t/cancel-pending-actions-and-return-back-to-previous-step/1976>\
**Category:** Process Design\
**Created:** [November 29, 2021, 12:56am UTC](https://discuss.workflowgen.com/t/cancel-pending-actions-and-return-back-to-previous-step/1976 "2021-11-29T00:56:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wing\_hou](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@wing\_hou](https://discuss.workflowgen.com/u/wing_hou)\
**Post date:** [November 29, 2021, 12:56am UTC](https://discuss.workflowgen.com/t/cancel-pending-actions-and-return-back-to-previous-step/1976/1 "2021-11-29T00:56:59Z")

</div>

The workflow consists of 3 steps.  
Step 1: 1 action  
Step 2: 2 or more actions  
Step 3: 1 action  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/fc19769ccf84f449a76eed3635f8fe8bc96cf2d1.png)  
Step 1 will determine how many person will handle step 2.  
In step 2, if any person reject, the other still pending step 2 will be cancel and return back to step 1.  
I use the Raise Exception function to cancel the pending actions but it always cancel the whole request.

Is this a bug?  
How to handle the problem?

---

<div class="post-metadata">

**Author:** ![nvarlet](https://avatars.discourse-cdn.com/v4/letter/n/a8b319/32.png) [@nvarlet](https://discuss.workflowgen.com/u/nvarlet)\
**Post date:** [December 7, 2021, 2:50pm UTC](https://discuss.workflowgen.com/t/cancel-pending-actions-and-return-back-to-previous-step/1976/2 "2021-12-07T14:50:41Z")

</div>

Hello.  
Can you try to redirect cancel action to a finish. (and keep step2 to step1 via a “cancel action” condition.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/23e82eb877d189548c7f8cc93a7852bb10c7c8f2.png)

My action “ANNULE\_SUIVI” cancels action “SUIVRE\_RECRUT”.  
Both actions go to an endpoint.

My action “SUIVRE RECRUT” goes to a synchro line to continue the process.

Best regards

---

<div class="post-metadata">

**Author:** ![wing\_hou](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@wing\_hou](https://discuss.workflowgen.com/u/wing_hou)\
**Post date:** [December 8, 2021, 12:35am UTC](https://discuss.workflowgen.com/t/cancel-pending-actions-and-return-back-to-previous-step/1976/3 "2021-12-08T00:35:18Z")

</div>

Hi @nvarlet,

I had try your suggestion but the request still being cancelled without going back to STEP\_1

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/eba78c9142d56908d14348380f2a70552d31a4e4.png)  
As you can see from the image above, STEP\_2 have 4 actions spawn in parallel.  
After I reject action No.4, action No.3,5,6 is cancelled by action No.7 but did not go to STEP\_1

For additional testing, I remove the synchro bar and put a direct link from STEP\_2 to STEP\_1 for cancellation exception.  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/ed515a52856f181bc6955d527ff1ef19777f166f.png)  
The workflow can successful go back to STEP\_1 after any STEP\_2 is cancel.  
But if STEP\_2 have 5 actions cancelled, 5 STEP\_1 will be spawned.

I am not sure that the cancellation exception do not work when going to synchro bar or I still missing something.

PS: workflowgen 7.11.0

Best Regards

---

<div class="post-metadata">

**Author:** ![wing\_hou](https://avatars.discourse-cdn.com/v4/letter/w/b5a626/32.png) [@wing\_hou](https://discuss.workflowgen.com/u/wing_hou)\
**Post date:** [December 13, 2021, 5:48am UTC](https://discuss.workflowgen.com/t/cancel-pending-actions-and-return-back-to-previous-step/1976/4 "2021-12-13T05:48:12Z")

</div>

I have found a workaround solution for this:  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/e07c2087112d09c295011e13d55d2061fd9de42f.png)  
Just add a DUMMY action between the synchro bar and the action where the cancellation trigger(STEP\_2), then the problem is solved.

Best Regards.
