Understanding Exclusive (XOR) Gateway
An exclusive gateway (also called XOR gateway) represents a decision point in your process where exactly one outgoing path is selected based on conditions. This is one of the most common routing mechanisms used in business process modeling. Core principles of Exclusive Gateways When designing decision logic with exclusive gateways, consider these guiding principles:Exclusive Choices - Only One Path
Exclusive Choices - Only One Path
Condition Evaluation - Logic Drives Flow
Condition Evaluation - Logic Drives Flow
Condition Compatibility - Avoid Overlap
Condition Compatibility - Avoid Overlap
Which Path Should Be Taken?
Which Path Should Be Taken?
Testing and Validation - Prove It Works
Testing and Validation - Prove It Works
Decision Points - Clear Divergence
Decision Points - Clear Divergence
Default Path - Don't Leave the Process Hanging
Default Path - Don't Leave the Process Hanging
Clear Logic - Keep It Understandable
Clear Logic - Keep It Understandable
Maintainability - Keep Logic Aligned with Reality
Maintainability - Keep Logic Aligned with Reality
Configuring an Exclusive Gateway node


Exclusive Gateways single

Exclusive Gateways multiple
General configuration
- Node name: Give your node a meaningful name.
- Can go back: Enabling this option allows users to revisit this step after completing it.
- Stage : Assign a stage to the node.

Exclusive Node Config
Gateway decisions
- Language: When configuring conditions, you can use JavaScript, Python, MVEL, or Groovy expressions that evaluate to either true or false.
- Conditions: In the Gateway Decisions tab, you can see that the conditions (if, else if, else) are already built-in and you can select the destination node when the condition is true.

Exclusive Gateway Decisions

Exclusive Gateways Multiple Flows
JavaScript examples
Getting input from a Switch UI element
Letβs consider the following example: we want to create a process that displays 2 screens and one modal. The gateway will direct the token down a path based on whether a switch element (in our case, VAT) is toggled to true or false.
Exclusive Gateway JavaScript Example


- Language: JavaScript
- Expression:
input.{{key from where you want to access a value}}
. In simpler terms, itβs a way to verify if a particular property within your input data structure (input.application.company.vat
key attached to Switch UI element) is set to the value true. If it is, the condition is met and returns true; otherwise, it returns false.application.company.vat
key corresponds to the switch UI element.
Getting input from multiple UI elements
Consider another scenario in which the process relies on user-provided information, such as age and membership status, to determine eligibility for a discount. This decision-making process utilizes multiple conditions, and depending on the input, it may either conclude or continue with other flows.

Exclusive Gateway JavaScript Example
input.application.client.age
and input.application.client.membership
keys, which correspond to the user input collected on the initial screen.-
Users under 18 with standard membership are not eligible (redirected to not_eligible_modal):
-
Users 18 or older with standard membership are not eligible due to membership level (redirected to not_eligible_membership):
-
Users 18 or older with gold membership qualify for a discount (redirected to discount_applied):
-
Users 18 or older with platinum membership also qualify for a discount (redirected to discount_applied):
- Any other combinations are sent to needsValidation for further review.