The Complex Gateway is a special BPMN element used only in rare situations. Most Business Processes can be modeled with the standard Gateways:
However, sometimes you need behavior that is more flexible and more precise than these Gateways can provide. This is when the Complex Gateway becomes useful.

A Complex Gateway is a customizable Gateway that lets you define exactly when it should activate and which paths it should take. It is shown as a diamond with an asterisk (*).
Unlike other Gateways that follow fixed rules, the Complex Gateway uses expressions to decide:
This makes it powerful, but also harder to understand without extra explanation.
The Complex Gateway relies on three main attributes:
| Parameter | Meaning | Example / Notes |
|---|---|---|
| activationCondition (activationExpression) | A rule (true/false) that tells the Gateway when to proceed | “Continue when at least 2 of 3 parallel Tasks are finished.” |
| activationCount | A live counter of how many incoming tokens arrived | You can reference this value inside the activation expression |
| waitingForStart | Flag showing the internal state of the Gateway | true → waiting to activate false → waiting to reset |
All these values are stored inside the gateway’s internal attributes - they are not visible on the BPMN diagram. Because of this, it’s a good idea to add a text annotation next to the Complex Gateway that explains the activation rule in plain language. This helps anyone reading the diagram quickly understand the logic without digging into technical details.
The Complex Gateway always works in two steps:
The gateway monitors all incoming flows. When your activation rule becomes true, it:
Now the gateway waits for the rest of the incoming flows (the ones that did not send a token earlier). Once they arrive - or are confirmed not to arrive - the gateway resets and is ready for the next cycle.

When used to split the flow, the Complex Gateway works just like an Inclusive Gateway:
Nothing special happens here.

The real power of the Complex Gateway is on the incoming side. Here, you can define custom rules for when the process should continue.
Examples:
This custom merging behavior is what makes the Complex Gateway irreplaceable in some situations.
Below are simple, real-life Business Process scenarios that illustrate how a Complex Gateway can be used.

A customer submits a high-priority request. The system triggers three parallel actions:
You want the Process to continue as soon as the first person responds, because that person will take ownership of the case.
Why a Complex Gateway?

A new security incident is reported. As soon as it enters the incident-management system, the workflow launches three assessments in parallel:
Management wants the investigation to continue as soon as any two assessments are completed, because two independent confirmations are enough to proceed with consolidating the findings. The third assessment, if still running, becomes optional and does not delay the process.
Why a Complex Gateway?

A bank processes a loan application with three parallel checks:
Normally, all checks are required.
But if the customer is a long-term client with a high reliability score, the bank may allow the process to continue once credit and income are available.
The rule might be:
Why a Complex Gateway?
It can evaluate both:
This allows the Gateway to synchronize differently based on the context.
The BPMN specification says that the Complex Gateway can express several advanced workflow behaviors. Below is a simplified explanation.
| Pattern | Meaning |
|---|---|
| Structured Discriminator (WCP-9) | Continue after the first branch finishes |
| Blocking Discriminator (WCP-28) | Like the above, but block all other tokens until the Gateway resets |
| Structured Partial Join (WCP-30) | Continue after N out of M branches finish |
| Blocking Partial Join (WCP-31) | Same as N-of-M, but block extra tokens until reset |
In short: ➡️ The Complex Gateway can wait for any number of branches you choose, and it can ignore or absorb the rest.
You should avoid the Complex Gateway when a simpler Gateway can do the job because:
Use it only when absolutely necessary.
| Gateway Type | When It Fires | Typical Use |
|---|---|---|
| Exclusive (XOR) | When one token arrives | Choose one path |
| Parallel (AND) | When all tokens arrive | Synchronize parallel Tasks |
| Inclusive (OR) | When all activated tokens arrive | Optional parallel paths |
| Complex | When your custom rule becomes true | Advanced merging, N-of-M joins, first-arrival wins |
The Complex Gateway fills an important gap in BPMN. It lets you define custom synchronization rules that standard gateways cannot express. This makes it perfect for:
However, this power comes with responsibility. Use the Complex Gateway only when simpler gateways cannot handle the scenario, and always document your rules clearly so that others can understand your model.
Used wisely, the Complex Gateway helps keep your process both flexible and accurate, while still remaining understandable to the people who maintain it.