We seem to solve the problem with adding plan items based on discretionary items to a plan of a case instance in run-time phase. But several questions still remain unresolved. One of them is how to define an execution sequence of the added items.
It is simple at design phase. For example, if Alice should perform the task after Bob completed his one, we can design something like that:
But when we are in the middle of execution of a case, we have only a discretionary task (which can be assigned to Bob and/or Alice), and we have decided that in the particular situation we need Bob and Alice to complete their tasks in exactly this order. It is possible to add two tasks: one for Bob and another one for Alice. But how to set the sequence? CMMN tells nothing about it.
It seems there are two options:
- The logic of the sequence should be controlled by application, and a developer should invent a suitable solution every time.
- It should be a part of the process engine which allows to register and control the sequence like this.
What do you think about this?