Trying to model (and execute) something with CMMN/Camunda that I am not sure if it is possible.
Need to model a case with several repeatable human tasks that need to be activated in parallel, i.e. I need to have several instances of each task that might be executed by different users. Any thoughts? examples?
By the way, I am not using a BPMN process because the sequence is not known in advance.
You can change the transition in which the repetition rule is evaluated by using the Camunda extension attribute named camunda:repeatOnStandardEvent1. You could try to set the camunda:repeatOnStandardEvent to create and provide a repetition rule. This could look as follows
In that case 10 human tasks are created, which exists in parallel.
Note: You have to take care, that you have a condition which stops creating human tasks at a certain point (for example if there are already 10 tasks available - therefore you have to count the number of already created tasks), otherwise you would end in an infinite loop. As a result, you would get a StackOverflowException.
Thanks for the help.
The code worked fine and I just had to handle the create event to increment the variable. To be honest I was close to the same solution but using a different event.
Now I am trying to achieve the same results but using a sentry with a VariableOnPArt https://docs.camunda.org/manual/7.6/reference/cmmn11/sentry/. According to the documentation if I update the variable within another task, this will trigger the sentry evaluation. I am using caseExecution.setVariable(“count”, count) to update the variable count but the sentry does not move. Any thoughts?
You have to register a case execution listener 1, which listen to a specific event. Once the event occurs the listener is invoked and you can increment the count variable.