# Exclusive Gateway Node

The **Exclusive Gateway Node** is used to **control the direction of a process or microflow based on conditions**.\
It allows the execution flow to branch into **one and only one path** at runtime, depending on which condition evaluates to true.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2F3mlvPXPSGwxninNwAJGS%2Fimage.png?alt=media&#x26;token=6b9ce3e8-9719-409c-9a30-2ee8a20c23bf" alt=""><figcaption></figcaption></figure>

***

### Purpose

**Gateway Nodes** are used to **branch a flow based on decision logic** and are represented by a **diamond‑shaped notation**.

An **Exclusive Gateway** evaluates conditions on outgoing paths and ensures that:

* Only **one path** is taken
* The first path whose condition evaluates to **true** is executed
* All other paths are ignored

This makes Exclusive Gateway ideal for **business decision flows**, such as approval, rejection, or routing logic.

***

### Exclusive Gateway Behavior

An **Exclusive Gateway** is commonly used to define **conditional paths** in both Microflows and Process Flows.

Typical characteristics:

* Mutually exclusive paths
* Condition‑based evaluation
* Deterministic execution (single outcome per execution)

Examples:

* Approve vs Reject
* Valid vs Invalid
* Success vs Failure

***

### Gateway Properties

The **Gateway Configuration Panel** consists of two tabs:

#### General Tab

The **General** tab displays generic information about the gateway, such as:

* Title
* Task ID
* Description (optional)

These properties help identify and document the gateway within the flow.

***

#### Gateway Tab

The **Gateway** tab defines gateway‑specific behavior.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2F1qxgdyQz0ZJo9VSuSQ1s%2F1?alt=media" alt=""><figcaption></figcaption></figure>

| Property     | Mandatory | Default | Description                                          |
| ------------ | --------- | ------- | ---------------------------------------------------- |
| Gateway Type | Yes       | —       | Only **Exclusive** gateway is available in Microflow |

***

### Defining Conditions on Gateway Paths

When multiple outgoing paths are created from an **Exclusive Gateway**, each path must have its own condition defined.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2Fr7yelkxiMmx57O0VK58X%2Fimage.png?alt=media&#x26;token=17137bfd-91cf-46cc-a631-031a2e8eb91f" alt=""><figcaption></figcaption></figure>

Each outgoing link supports the following properties:

| Property    | Mandatory | Default   | Description                                               |
| ----------- | --------- | --------- | --------------------------------------------------------- |
| Name        | No        | —         | Friendly name for the path (e.g. **Approve**, **Reject**) |
| Type        | Yes       | Exclusive | Gateway path type                                         |
| Description | No        | —         | Description of the condition                              |

***

### Condition Editor (Formula Editor)

The **Condition** button in the **Gateway Parameter Tab** opens the **Formula Editor**, where users can:

* Define new conditions
* Edit existing conditions
* Use expressions and parameters to evaluate logic

The Formula Editor enables visual and expression‑based condition definition, consistent with other mapping and transformation features in ONEWEB.

> Formula Editor reference:\
> <https://docs.oneweb.tech/oneweb/design-and-develop-oneweb-apps/design-and-develop-process/process-components/formula-editor>

***

### Best Practices

* Ensure conditions are **mutually exclusive** to avoid ambiguity
* Clearly name outgoing paths for readability
* Always define a default or fallback path when possible
* Keep gateway logic simple; move complex logic to Microflow or Process logic

Clear gateway design improves flow predictability and maintenance.

***

### Summary

The **Exclusive Gateway Node** is a core decision‑making construct in ONEWEB integration and workflow design.

It allows developers to:

* Route execution based on conditions
* Model business decisions cleanly
* Ensure predictable, single‑path execution
* Maintain readable and maintainable flows

Exclusive Gateway is essential for building **robust, condition‑driven integrations and business processes** within ONEWEB.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.onewebstack.com/designer-reference/microflow-designer/activity-nodes/exclusive-gateway-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
