# Gateway

A **Gateway** is used to **control and direct the flow of a process** into one or more execution paths.\
It defines **decision points** in the process where the flow can branch, merge, or execute concurrently based on defined conditions.

In ONEWEB **Process Designer**, a Gateway is represented by a **diamond‑shaped BPMN node**, as shown below.

<figure><img src="https://2015371994-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FMpDjHWFRUtZ5nJcSfVXd%2Fuploads%2FQ7VYqXKsAvO6TH1jalfO%2Fimage.png?alt=media&#x26;token=e2b41c3e-2382-4a32-963d-acb95caaeead" alt=""><figcaption></figcaption></figure>

***

### Purpose

**Gateway Nodes** are used to **branch or synchronize** process flows based on logic and conditions.

They allow a process to:

* Evaluate conditions and choose a path
* Execute multiple paths in parallel
* Combine or synchronize different execution paths

Gateways do **not perform work by themselves**; instead, they define **how the flow proceeds** from one activity to another.

***

### Types of Gateways in Process Designer

ONEWEB Process Designer provides **three types of Gateway decision nodes**:

1. **Exclusive Gateway**
2. **Parallel Gateway**
3. **Inclusive Gateway**

Each type supports a different flow‑control pattern and is described briefly below.

***

#### Exclusive Gateway (XOR)

The **Exclusive Gateway** routes the process flow to **exactly one outgoing path**, based on a condition.

Characteristics:

* Only one condition can be true
* Only one outgoing path is taken
* Often used for decision‑making logic (if / else)

**Example use cases**

* Approve vs Reject
* Yes / No decisions
* Single outcome selection

***

#### Parallel Gateway (AND)

The **Parallel Gateway** splits the process flow into **multiple paths that execute simultaneously**.

Characteristics:

* All outgoing paths are executed
* No condition evaluation is required
* Often used to perform tasks in parallel

Parallel Gateways are also used to **synchronize** parallel paths, ensuring all incoming branches are completed before proceeding.

**Example use cases**

* Execute multiple checks at the same time
* Run independent tasks concurrently

***

#### Inclusive Gateway (OR)

The **Inclusive Gateway** routes the process flow to **one or more paths**, depending on conditions.

Characteristics:

* Multiple conditions may evaluate to true
* One or more outgoing paths can be taken
* Combines flexibility of Exclusive and Parallel gateways

Inclusive Gateways can also be used for synchronization, waiting for all active incoming paths before continuing.

**Example use cases**

* Optional task execution
* Conditional multi‑path workflows

***

### Usage Guidelines

* Use a Gateway whenever the process flow must **branch or merge**
* Clearly define conditions for Exclusive and Inclusive Gateways
* Avoid placing heavy logic directly on Gateway nodes
* Ensure every branch eventually rejoins or terminates properly
* Clearly label outgoing paths for better readability

***

### Summary

The **Gateway** component controls how a process flow **branches, synchronizes, and merges**.

Key points:

* Gateways define flow control, not execution logic
* Represented as diamond‑shaped nodes
* THREE gateway types are available:
  * Exclusive (XOR)
  * Parallel (AND)
  * Inclusive (OR)
* Essential for modeling real‑world decision logic

Understanding and using Gateways correctly is critical for building **accurate, predictable, and maintainable business process workflows** in ONEWEB Process Designer.


---

# 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/process-designer/process-designer-component/gateway.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.
