How to stop if more then one appropriate SequenceFlow condition


#1

Hi guys,

Need ideas.
I have a requirement to build a process tree.
From each gateway can output several sequence flows.
Most cases just one of the conditions on outgoing sequence flows is true.
There might be a case when more then one condition is true.
This case is invalid, the system should stop and inform a user about this, asking him to select most appropriate one.

Thanks a lot

Diana


#2

So, if you use an XOR gateway it will evaluate each sequence flow, once it finds one that matches the process will continue along that flow and no longer check the other flows. Meaning - if two independent conditions are true one of them will be arbitrarily chosen.
One way to solve the problem you described is to make sure the expression on the sequence flows are very specific. e.g.

#{conditionOne && !conditionTwo && !conditionThree}

In order to catch the scenario where no conditions match - you can then add a default flow to the process.


#3

Hi Niall,

Great idea, thanks so much for such quick response.
I just don’t understand one thing:
‘Choose a bunch of things’ is standing before the XOR gateway.
Doesn’t it means that the flow will always stop on it first?


#4

It does indeed - the goal of it would be to let users change their choices. But you can model it without the task if you like. the gateway semantics are the important thing.


#5

I see.
In the system I am building the default processing is automatic.
Only in case the above issue is detected the system should stop and request user’s opinion