I have a process that includes a 'send message' node to cancel another active sub-process. The active sub-process gets cancelled and ends, with a receive message node. This process ends cleanly and also ends the parent process. I tried to change the process so that if the active sub-process needs to end - I use an Execute Process Report smart service to identify the subprocess's ID and then use a 'Cancel Process' smart service to cancel it. It does cancel it, but does not also end the parent process associated with the cancelled sub-process. Using the 'send message' to cancel the active process does - and cleans up these cancelled processes nicely - basically ends the active tasks and then ends the processes. Is the 'send message' the best way to go with this? I know that we should not use the 'send message' event to 'start' a process, but is it still acceptable (i.e. not soon to be deprecated) to end a process with a 'send message'? If I should be changing it - how to I configure the 'Cancel Process' smart service to cancel the associated parent process?
Could you please tell me how you had done the above scenario.
Hi Satish - you need to do the following:
Hope this helps
I am able to send a message and receive message events to subprocesses but after I am unable to close Parent Processes.I want to kill parent processes as well. Could please guide on that.
Is the parent calling the sub-process synchronously or asynchronously?
Stewart - I would say in my scenario - the parent process called the sub-process synchonously. It's actually calling an earlier executed version of the same process that has yet to be completed.
Here's the scenario I had: I had a situation where an accountant starts a process to edit an account. Once he enters the changes, it goes to someone else to review and certify the changes. Before being certified, the accountant (or another accountant) might need to make additional changes. So - if the first change hadn't been certified, it needed to be cancelled. So - I used an 'Execute Process Report' node to find find the previous review task(s) and captures those active process id(s). In the Data Outputs node for the 'Execute Process Report' - I save the process id(s) that need to be cancelled, which are then used in the Cancel Message.
Hope this helps!
Hi Judy - I got your use case and solution, I was trying to help Satish with his :-)
Thanks for responding to me Judy and Stewart.....
But I had used complete task smart service it worked by choosing the canceling path Action IDs in UI. But in our requirement Action IDs shouldn't be displayed in UI. Is it possible to get an automatic canceling path action ID based on open tasks in Processes Model?
You should be able to capture the Action IDs in the data output (not something you'd have to display in the UI) and use that to cancel. Did you look at this related discussion? This may help. https://community.appian.com/discussions/f/process/9693/cancelling-specific-tasks-from-a-separate-process
I approached in the above way also but I hadn't got it Judy
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.