Workflow completion conditions

I am using a sample process with one “critical path” and a task (Test) hanging off to the side. I am not signalling Test task completion deliberately. The workflow reaches the end state successfully, but since Test task is still not completed, the entire workflow is technically still running. Operate shows the end task being reached (gray check mark), (which I find a little bit confusing - since glancing at it may look like workflow is done):

I can think of multiple uses of this type of modeling - for example, to implement a check-list style of tasks, which can be completed in any order after a certain part of the workflow is reached, but I can’t help questioning BPMN “correctness” in modeling it this way. Is this ok - or do I have to add tasks to a path? If my workflow, for example, is 1) Go to store - 2a) Buy bread 2b) Buy milk 2c) Buy lottery ticket 3) Checkout - 2a/b/c tasks should be able to be completed in any order, so I would normally draw a parallel gateway, split the paths, then combine them again at some point. The way I have this one done is less “academic”, but seems to still work as intended. Advantage is that it doesn’t introduce any dependencies in workflow path (and we gain flexibility in performing certain tasks (Test in this case) at any point of the workflow - as long as all the tasks are done, the workflow would complete. Do you see any issues with this from Zeebe perspective?

Although this is formally allowed (and I think as well supported by Zeebe), it is generally recommended against.

In your example, the end event is completed while the workflow is still active (i.e. there is still an active task for which the job has not been completed). We can consider whether it is semantically correct to signal that the workflow has ended while at the same time keeping the workflow active.

I would propose something like this:

It adds clarity on when the process (and even each path) completes and allows the bottom tasks to be performed at any time.

I hope this helps.

1 Like