Reputation: 33
I have just started exploring Activiti, so my question may be noobish.
I have a process definition wherein I have defined a subprocess. Subprocess has 2 user tasks defined. After completion of 1st user task(UT1), second one(UT2) starts. Subprocess in itself has following confg:
<subProcess id="..." name="...">
<multiInstanceLoopCharacteristics isSequential="false" activiti:collection="#{parameters.ids}" activiti:elementVariable="input"></multiInstanceLoopCharacteristics>
<userTask id="UT1" name="..." activiti:candidateGroups="..." activiti:category="..." activiti:priority="...">
...
</userTask>
<userTask id="UT2" name="..." activiti:candidateGroups="..." activiti:category="..." activiti:priority="...">
...
</userTask>
...
...</subProcess>
So, for every n UT1 tasks, there are equal number(n) of UT2 tasks.
Now I need to change this arrangement in a way that for n UT1 tasks, only a percentage of n tasks are created for UT2. So, for every n UT1 tasks, there are x% of n UT2 tasks.
Is this possible by changing process definition file itself? Or do I need to take some alternate approach, like running some batch?
Upvotes: 1
Views: 64
Reputation: 1268
Use decision table for logical interpretation, which will decide when the second user task should be started.
Upvotes: 0
Reputation: 3240
Obviously there is a condition of some sort that will determine if a UT2 task is required. Therefore, you should be able to use a decision step to determine whether to create a UT2 task based on some logic.
Upvotes: 1