# Close open subprocess upon parent process closed

**URL:** https://discuss.workflowgen.com/t/close-open-subprocess-upon-parent-process-closed/1332
**Category:** Workflow Designer
**Created:** [March 7, 2019, 6:37am UTC](https://discuss.workflowgen.com/t/close-open-subprocess-upon-parent-process-closed/1332 "2019-03-07T06:37:37Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![GiapWeng](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@GiapWeng](https://discuss.workflowgen.com/u/GiapWeng)
#### Post date: [March 7, 2019, 6:37am UTC](https://discuss.workflowgen.com/t/close-open-subprocess-upon-parent-process-closed/1332/1 "2019-03-07T06:37:37Z")

</div>

Hi,

Is there a way to close those open subprocesses when parent process is closed?

Regards,  
Lim

---

<div class="post-metadata">

### Author: ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)
#### Post date: [March 7, 2019, 11:39am UTC](https://discuss.workflowgen.com/t/close-open-subprocess-upon-parent-process-closed/1332/2 "2019-03-07T11:39:06Z")

</div>

Hi @GiapWeng,

Do you mean you would like to **cancel** the subprocesses once the parent is closed?

Regards,  
Eddy.

---

<div class="post-metadata">

### Author: ![GiapWeng](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@GiapWeng](https://discuss.workflowgen.com/u/GiapWeng)
#### Post date: [March 8, 2019, 2:42am UTC](https://discuss.workflowgen.com/t/close-open-subprocess-upon-parent-process-closed/1332/3 "2019-03-08T02:42:22Z")

</div>

Hi Eddy,

Yes. Either cancel or complete the subprocesses is fine.

Regards,  
Lim

---

<div class="post-metadata">

### Author: ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)
#### Post date: [March 20, 2019, 3:12pm UTC](https://discuss.workflowgen.com/t/close-open-subprocess-upon-parent-process-closed/1332/4 "2019-03-20T15:12:40Z")

</div>

@GiapWeng,

Easiest thing to do is to cancel the subprocess. Completing it will be complicated unless your subprocess has a simple workflow.

You can use the [CANCELREQUEST](https://docs.advantys.com/workflowgen-administration-module-reference-guide/cancelrequest-workflow-application) application just before completing the parent process (before an endpoint)  
You simply need to pass the subprocess instance ID to the application and it will cancel the indicated subprocess.

If you would like to complete it, you can use the [COMPLETEACTION](https://docs.advantys.com/workflowgen-administration-module-reference-guide/completeaction-workflow-application) application just before completing the parent process.

Regards,  
Eddy.

---

<div class="post-metadata">

### Author: ![marinam](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/marinam/32/322_2.png) [@marinam](https://discuss.workflowgen.com/u/marinam)
#### Post date: [November 24, 2020, 9:02am UTC](https://discuss.workflowgen.com/t/close-open-subprocess-upon-parent-process-closed/1332/5 "2020-11-24T09:02:49Z")

</div>

Hi @eddy.daouk,  
We experienced the following issue:  
If one of launched sub-processed is cancelled, it automatically cancels all other open sub-processes. How can we prevent this to happen?

Thank you,  
Marina

---

<div class="post-metadata">

### Author: ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)
#### Post date: [November 25, 2020, 11:34pm UTC](https://discuss.workflowgen.com/t/close-open-subprocess-upon-parent-process-closed/1332/6 "2020-11-25T23:34:50Z")

</div>

Hi @marinam,

All actions (or subprocesses) that have a potential to be cancelled need to have a “Action cancellation exception” transtition. This is because you need to guide the workflow in case the action is cancelled. If there is no transition indicating where the workflow should after it is cancelled, the system will cancel the entire request including the other subprocesses.

![ef40d3b7564c71c171853cdd39cdf4d44b3ed6ba_2_690x497](https://canada1.discourse-cdn.com/flex030/uploads/workflowgen/original/1X/0d5411deff0f46e34e9e5992edcdc93188d839a8.png)
