Problem with xor gateway
The xor gateway is not behaving as expected, an example with optional approvals, where one of the approvers validate the process, the flow should continue, but this not happening, follows a image with the model, on my tests when one of aproval activities is executed the other aproval activity still open. sample
I just created a small process example with a And and a Xor gates. It is available in the Projects section: http://community.bonitasoft.com/project/xor-example
Could you please tell me if it works ?
Comments
Hi Antoine
I execute your model, below step by step
User - Start the process
Portal - Show 1º activity (Disclaimer)
User -Execute 1º activity (Disclaimer)
Portal - Show activities (Step1,Step2,Step3)
User - Execute activity Step1
Portal - Show activities (Step2,Step3 and Confirmation)
The activities Step2,Step3 should not have been aborted?
I understand, if I execute the confirmation step, the terminate event kill all others activities.
Can you confirm the information below?
1) The behavior of the XOR gateway (on version 6.x) changed compared to what it was (on version 5.x).
2) When triggered by any one of the entries XOR gateway triggers the output, but WITHOUT aborting other activities connect with XOR gateway.
domenico.giordano said no, but as I said on comments, I have not found on documentation one affirmation that confirm it, but i found on workflows patterns some cases where an activity could cancel another in parallel.
Hi Again,
I just tested you first diagram (with both AND and XOR gateway), and just made some changes like as following : http://dl.free.fr/kQ3pudzif
It works fine on my side, and we can see that the second step is aborted by the system : http://dl.free.fr/kukhu2mYG
I used a 6.3.0 version, but there should be no issue with previous version of 6.X. Just give it a try on your side and keep us informed.
Regards, LL
Comments
I just tested you first diagram (with both AND and XOR gateway), and just made some changes like as following : http://dl.free.fr/kQ3pudzif
--- I try with your model and the error happened again…
It works fine on my side, and we can see that the second step is aborted by the system : http://dl.free.fr/kukhu2mYG
--- The second activity was aborted only because you executed the third activity that sent the process to an** Terminate End Event** that aborted any activities that were open… (Run your process and execute only one of this activities… (Etape1 or Etape2) the other should be closed on this moment… )
I used a 6.3.0 version, but there should be no issue with previous version of 6.X. Just give it a try on your side and keep us informed.
---I tried version 6.3 and the error happened again…
1) I try with this model and the error happened again…
2) The second activity was aborted (on your case) only because you executed the third activity that snet the process to an Terminate End Event that aborted any activities that were open… (Run your process and execute only one of this activities… (Etape1 or Etape2) the other should be closed on this moment…, but it is not)
3) I tried version 6.3 and the error happened again…
Hello angelobochini,
Thanks for the image of the diagram. Just a note about the modeling : if you have an AND opening gateway, you should have also an AND gateway instead of the XOR gateway. That explains why your expected behaviour doesn't work.
By the way, if you want some parallel approvals, I would suggest you to have a look to the the multi-instanciation feature. More information here about the iteration mechanism : http://documentation.bonitasoft.com/iteration
Hopefully it helps.
Best regards, LL
Comments
The two approvals are not mandatory, the execution of one is enough. (Its one or other…)
In the business model there are two approvers and either may execute, for monitoring reasons we individualized activities. but if one is executed the other is aborted.
On version 5.10 and previous the behavior is as described above
How I can do this now on version 6.x?
you should also set a default gateway (it adds a small line on the transition arrow)
If there is only one output on the gateway it should be the default, but anyway I've also tried and did not work.
I checked, tested and commented on other answer.
Comments
Hi, according with BPMN specification, once the token reach the parallel gataway it is cloned in two and this two tokens still remain openend even if one of two reach the XOR gateway. It is up to the designer make a diagram in order to be sure that only one incoming token will reach the exclusive gateway. Your diagram is not correct. you can re-model it using for example a multi-instatiated task with a check out condition or a sub-process with terminate end event on both parallel path or whatever other solution you can adopt in order to avoid to have this indeterminate situation. Hope I am clear enough. Ciao Domenico
Hi Domenico
I searched on the BPM specification document of omg.org in "http://www.omg.org/spec/BPMN/2.0/PDF" and not found the definition ".. once the token reach the parallel gateway it is cloned in two and this two tokens still remain opened even if one of two reach the XOR gateway .. " could you tell me the page where is this definition?
In workflow patterns document "http://www.omg.org/bpmn/Documents/Notations_and_Workflow_Patterns.pdf" exists a section on "CANCELLATION PATTERNS" (page 22 figure 45) that brings some samples of how the execution of a activity may cancel another in parallel, using a signal. But I think that this is not implemented on Bonita.
The model process that I includes as an example, is a simplification of the problem, not the real process, on the actual processes the parallel activities are not the same, then the multi-instatiated option can not be applied.
The use of parallel processes will be the last option, because dozens of processes will have to be refactory.
Hi Angelo
Cancellation can be achived by timer, exception (as reported in your picture), messages catch event and signal catch event. If you use these events in a boundary way you will obtain the cancellation of the task.
I repeat: in your example a mult-iinstantiated approval task with the right join condition should solve your problem. Hope that now I am more clear. Regards.