# How can I end other process

**URL:** <https://forums.pega.com/t/how-can-i-end-other-process/4853>\
**Category:** General\
**Tags:** 8-8, case-management\
**Created:** [July 27, 2023, 8:59am UTC](https://forums.pega.com/t/how-can-i-end-other-process/4853 "2023-07-27T08:59:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CloeW938](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@CloeW938](https://forums.pega.com/u/CloeW938)\
**Post date:** [July 27, 2023, 8:59am UTC](https://forums.pega.com/t/how-can-i-end-other-process/4853/1 "2023-07-27T08:59:21Z")

</div>

Hello,

We have configured an optional process so user can launch it from Actions menu, as below.

 ![Optional Process.png](https://pega1.discourse-cdn.com/pega/original/2X/5/57abcd5a22416b172fad3fffd96e5dc5baf953b4.png)

Optional process is defined in pyDefault Case Type rule.

 ![pyDefault Case Type 1.png](https://pega1.discourse-cdn.com/pega/original/2X/9/92a52460b48385ff8e51943dd68073681955eef1.png)

If user launches this optional process, total process becomes two - main process, and optional process.

 ![Multiple processes.png](https://pega1.discourse-cdn.com/pega/original/2X/b/b9896b6994bfc3f1fe7441ee612810e9b99c4bfe.png)

Now, our client wants to have another optional process to withdraw this optional process. It may sound strange, but optional process to withdraw other optional process. Let’s call this “Withdraw optional process”. Withdraw optional process has approval step. Once approved, withdraw optional process must end, and also original optional process must end as well.

For this purpose, I have added a Utility shape to manually delete .pxFlow(OptionalProcess), but this approach didn’t work well.

 ![Withdraw optional process.png](https://pega1.discourse-cdn.com/pega/original/2X/e/e6efa9a7585abec1b931f6135319bcbb32cfca3f.png)

How can I end other process in such situation?

Regards,

---

<div class="post-metadata">

**Author:** ![BhanuPrakash\_G](https://avatars.discourse-cdn.com/v4/letter/b/dc4da7/32.png) [@BhanuPrakash\_G](https://forums.pega.com/u/BhanuPrakash_G)\
**Post date:** [July 27, 2023, 9:13am UTC](https://forums.pega.com/t/how-can-i-end-other-process/4853/2 "2023-07-27T09:13:06Z")

</div>

@CloeW938 Have you tried setting a ticket on the end shape of optional process which you can raise from withdraw process on approval

---

<div class="post-metadata">

**Author:** ![CloeW938](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@CloeW938](https://forums.pega.com/u/CloeW938)\
**Post date:** [July 28, 2023, 3:23am UTC](https://forums.pega.com/t/how-can-i-end-other-process/4853/3 "2023-07-28T03:23:50Z")

</div>

@BhanuPrakash_G

Thank you for your suggestion. I’ve never used ticket, and this approach seems to work. Here are the steps I did.

1. Create a Rule-Obj-Ticket.

 ![Rule-Obj-Ticket.png](https://pega1.discourse-cdn.com/pega/original/2X/7/7deeb43f2da3f7abf8d506c30b097bac225f3286.png)

1. Set Ticket in the optional process flow.

 ![Optional Process.png](https://pega1.discourse-cdn.com/pega/original/2X/6/6385666934bebe9c4c157735a9d5d5c70058f7fe.png)

1. Call SetTicket activity in the withdraw optional process.

 ![Set Ticket.png](https://pega1.discourse-cdn.com/pega/original/1X/5b79f464cd783a23fb0f4d7f114e40b690866bab.png)

This way, when approved, the withdraw optional process will end after Set Ticket shape, and also optional process will end regardless of where the current step is. This meets our client’s requirement. Thank you.

Regards,
