I have about 40 user tasks in my process.
I want to set multiple (After 1, 5, 10 minutes) timer boundary event for every task. What is the best option to do that ? then create some message event (I want to send notifications).
It is very ugly if I model everything in my bpmn. I will receive 120 event and accordingly 120 send message task.
Create a Parse listener that will add the timers to your user tasks when you deploy. Search the forum for “parse listener” and will find many examples.
Basically what happens is when you deploy the BPMN is parsed by the engine and the listener will modify the BPMN to add the various timers.
Actually - it wouldn’t need to because after a user task has been finished the token will go back to the User task has been started conditional event. It will wait until another task starts. So in the meantime you could run a bunch of other stuff before the next user task is activated.
Edit: Sorry - i get your question now - if i had parallel tasks this would not work
I’m trying to do exactly this because the number of timers I need to add to each task (service task but also startEvent and userTasks) is not fixed. I’m able to add the required execution listeners following examples about BPMN Parse Listener.
However, I don’t find how to modify the BPMN and add a new timer boundary event once the “notify” method of the ExecutionListener is invoked.