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?
Discussion posts and replies are publicly visible
There is a dedicated Smart Service (also available as an a!function) for cancelling Process Instances:
https://docs.appian.com/suite/help/19.1/Cancel_Process_Smart_Service.html
Thanks Stewart - that's the smart service I was trying to use. I got it to work for cancelling the 'subprocess' but I couldn't get it to cancel the parent process so I went back to using the 'send message' to cancel both. That works well.
Hi Judy - if you're sending messages at both Parent and Child then why not use the Cancel Process Smart service in the same way to cancel both? (i.e. get the ProcessIds of both Parent and Child and execute the Smart Service twice, once for each instance id.)
I have heard there are performance/scalability issues with Send Message (cool though it is!)