Alternative Inclusive Gateway

Hi,
I’m new to BPMN and wanted to know how could I model this scenario :

  • I have “A” as Input
  • “0” or “1” exclusively, or “no matter 0 or 1”

I can’t use the inclusive Gateway because I have an action related to “0 or 1”
Is this the unique solution to model this scenario ?

Thank you

Outgoing sequences(execution path) from exclusive gateway always selected based on either evaluated condition or default flow(if no other conditions matched). In both the gateways always one execution path will be executed.

Can you elaborate more what you are trying to achieve?

Thank you for your answer, I’m designing a web app and this is my scenario :

  • A user can awlays perform some actions : reading a text for example, if his account is activated he could remove the text and if his account is not activated, he could edit the text. I want to differentiate between :
  • What the user can always do (Account activated or not)
  • What could he do only when his account is activated
  • And what he could do when his account is not activated.
  • I don’t want to add the action “reading a text” twice to “account activated” or “not activated”

So, I need :

  • A gateway to tell if user account is activated or not or “no matter activated or not”
  • If the user account is activated, he can do some actions (Actions A).
  • If the user account is not activated, he can do some other actions (Actions B)
  • Whatever the user account is activated or not he can some other actions (Actions C)
    The user can always do C without necessarly doing A or B

You may use Inclusive Gateway to model such behavior. Just don’t forget to add a Default outgoing sequence so that default actions are always available. See Inclusive Gateway | docs.camunda.org as a reference.

In order to specify default flow you may find the ID of outgoing sequence flow and specify it as default in Inclusive Gateway declaration (see attached example).

Thank you, but with inclusive gateways, A and B can be both true, which is impossible in my case. A user cannot have an active and inactive account at the same time.
So, Should I use an inclusive gateway followed by an exclusive gateway for actions A and B ?

This wouldn’t work.
The logic of the default flow is that it is followed only when no other flow is possible.
using a single variable called selection (for example) will prevent both being triggered and an always flow will send the process at least through that sequence flow

1 Like

That’s a very good idea, thank you !