Business processes often require making decisions based on data and conditions. FlowX.AI’s exclusive gateway nodes allow you to create branching paths in your process flow, directing the execution based on specific conditions and business rules.

Exclusive Gateway Visualization

What is an exclusive gateway?

Exclusive Gateway

An exclusive gateway (also known as an XOR gateway) creates conditional branches in your process flow. It directs the process token to exactly one of the outgoing paths based on evaluated conditions. Think of it as an “if-then-else” decision point in your process.

How exclusive gateways work

Process Flow with Exclusive Gateway

Exclusive gateways function as decision points in your process:

  1. When the process flow reaches an exclusive gateway, it evaluates conditions associated with each outgoing path
  2. The first condition that evaluates to true determines which path is taken
  3. Only one path is followed, even if multiple conditions could evaluate to true
  4. A default path can be specified to be taken if no conditions are met

Best practice is to always provide a default path to ensure your process doesn’t get stuck if none of the specified conditions are met.

Creating a flow with exclusive branches

1

Create or Open a Process Definition

  1. Open FlowX.AI Designer and navigate to your project
  2. Go to the Processes section and select your process or create a new one
  3. Click the Edit Process button to open the Process Designer
2

Add Basic Flow Elements

  1. Add a Start Node to your process canvas (if creating a new process)
  2. Add a node before your decision point (typically a task or user task node)
  3. Ensure the necessary data for your decision is available in the process at this point

The decision conditions will evaluate data that’s already in your process context, so make sure any required data is collected or calculated before reaching the gateway.

3

Add the Decision Gateway

  1. From the node palette, drag an Exclusive Gateway node onto your canvas
  2. Connect your previous node to this gateway
  3. Give your gateway a descriptive name that indicates its decision purpose (e.g., “Evaluate Credit Score”)

You must connect all outgoing paths from the exclusive gateway before configuring the decision conditions.

4

Create Outgoing Paths

  1. Add the task nodes that will be the targets for each decision branch
  2. Connect the exclusive gateway to each of these nodes using sequence flows
  3. Name each sequence flow to indicate the condition (e.g., “Premium Card Path”, “Standard Card Path”)

Example of Gateway Condition Configuration

5

Configure Decision Conditions

  1. Select one of the sequence flows (arrows) from the gateway
  2. In the properties panel, navigate to the Condition section
  3. Select a scripting language from the dropdown (e.g., MVEL, JavaScript)
  4. Enter your condition expression, for example:
input.get("application.client.creditScore") >= 700
  1. Repeat for each outgoing path with the appropriate condition:
input.get("application.client.creditScore") < 700

Conditions are evaluated in the order they appear in the Designer. The first condition that evaluates to true determines the path taken, so order matters!

6

Add Converging Gateway (Optional)

If your branches need to converge back to a single flow:

  1. Add another Exclusive Gateway after your branch tasks
  2. Connect each branch endpoint to this converging gateway
  3. Continue the process flow from this gateway

A converging exclusive gateway doesn’t require conditions since it’s merely joining paths rather than splitting them.

7

Complete the Process Flow

  1. Add any additional nodes needed after the decision branches
  2. Ensure your process eventually reaches an End Node
  3. Save your process definition

Condition expression examples

Here are some example condition expressions for different decision scenarios:

Best practices

When implementing decision logic:

  • Use clear, descriptive names for gateways and sequence flows to document the decision logic
  • Keep conditions simple and focused on a single aspect of the decision
  • Ensure conditions are mutually exclusive when possible to avoid ambiguity
  • Always provide a default path to handle unexpected scenarios
  • Test each decision branch with various input data to verify correct routing
  • Document complex decision logic in the process documentation or node descriptions
  • Consider using business rule actions before the gateway for complex evaluations

Common patterns

If-Then-Else

The simplest decision pattern with two outcomes - a condition is either met or not met

Multi-Choice

Multiple conditions evaluated in sequence, with one path chosen based on the first match

Approval Flow

Branching based on approval status, typically with approve/reject/review paths

Eligibility Check

Evaluation of multiple criteria to determine if a process can proceed

Next steps

After implementing decision logic in your process, you can:

Implement Parallel Processing

Learn how to create parallel process branches with parallel gateways