Cancelling a process from another process

Certified Senior Developer

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

Parents Reply
  • Hi Satish - you need to do the following:

    • ensure your target process models include some unique shared business token e.g. Customer Number, Order Number
    • create a Process Report that returns the ProcessIds of the Process Model instances that you want to cancel, filtered by the above business token
    • then you have a choice:
      • use the 'Cancel Process' Smart Service to cancel the process instances identified by the ProcessIds generated by the above report
      • use the 'Send Message'/'Receive Message' pattern as described in the original post above

    Hope this helps

    Regards

    S>

Children