cuba-platform / bpm

Business Process Management Addon
https://www.cuba-platform.com/
Apache License 2.0
43 stars 23 forks source link

Outcome conditions on sequence flows doesn't work properly inside parallel subprocesses #56

Open gorbunkov opened 5 years ago

gorbunkov commented 5 years ago

There is a process with a parallel sub-process: image

The model json: task-subprocess-test.zip

For "Yes" and "No" sequence flows the following conditions are automatically generated:

${approvalTask_result.count('yes') > 0}
${approvalTask_result.count('no') > 0}

The problem is that when the task is completed the decision is written to the global process variable approvalTask_result. The second person who completes the task sees the result of the first person. Even if the second person says "No", the "yes" condition will be true, because the approvalTask_result stores the decision of the first person.

The approvalTask_result should be saved to the scope of the subprocess.

gorbunkov commented 5 years ago

The workaround for the case is to use the outcome local process variable in the sequence flow condition:

${outcome == 'yes'}