I have a question, maybe someone of you will give me some tips. So, let say I have a Workflow named “Start”.
This WF starts and reaches a UserTask for example and waits there someone to interact with the user task.
In the same moment the WF “Start” starts again.
Now, I want when the new WF “Start” started, the previous one that is waiting on the UserTask to kill it, i.e to end it, without someone to interact with the user task.
I thought to do that witht a MessageEvent and it is working, where I put the UserTask in a Sub Process… but is there a better way to do that?
Hi Nial,
I would say it is spacific… I don’t want the previous instance to be killed at any moment of the time, only if the previous instance is at this spot where the UserTask is.
In some other cases, it can happen that the previous instance go forward with the process and a new instance is started (before the previous one reaches the end). This should not be affected, by starting a new instance.
A signal event at the beginning would do the trick - but make sure it correlates with some kind of key specific to the process that you want to stop - by default it will stop ALL instances that are on that task.
Sure, you can build a queue mechanism if you like to ensure that all started instances will wait until the currently running instance has completed.
The example i posted above will actually stop any instances that started earlier than the current one - assuming they’re working on that particular user task.