jBPM Workflow Tutorial: 🔀 All Gateways Explained
🚀 Introduction
Gateways in jBPM are decision and control nodes that define how process flows diverge and converge. They allow workflows to branch, merge, or synchronize.
In this blog, we’ll explore all major gateways with examples:
❌ Exclusive (XOR): pick one path
-
🟢 Inclusive (OR): pick one or many
-
➕ Parallel (AND): run all paths in parallel
-
⏳ Event-Based: wait for external events
-
⚙️ Complex: advanced conditions/synchronization
🛠️ Prerequisites
-
💻 jBPM/Business Central & KIE Server bundle
-
☕ JDK 11+
-
🌐 Access:
http://localhost:8080/business-central
❌ Exclusive Gateway (XOR)
📌 Purpose
Chooses one outgoing path based on conditions.
🎨 Example Flow
🔵 Start → 👤 Human Task → ❌ Gateway → ✅ Approve End / ❌ Reject End
⚙️ Condition Example
or
👉 Use when only one path should be taken.
🟢 Inclusive Gateway (OR)
📌 Purpose
Can take one or multiple outgoing paths depending on conditions.
🎨 Example Flow
🔵 Start → 🌀 Gateway → 📧 Email / 👤 Review / ✅ End
⚙️ Condition Example
-
If
sendEmail == true→ 📧 path -
If
reviewNeeded == true→ 👤 Review path -
Both can trigger at once.
👉 Use when more than one branch may execute simultaneously.
➕ Parallel Gateway (AND)
📌 Purpose
Splits the process into multiple parallel paths, no conditions required.
🎨 Example Flow
🔵 Start → ➕ Gateway → 📊 Report Task & 📧 Email Task → ➕ Join → ✅ End
👉 Use when tasks must happen at the same time (e.g., notify & generate report).
⏳ Event-Based Gateway
📌 Purpose
Waits for events and chooses a path depending on which event occurs first.
🎨 Example Flow
🔵 Start → ⏳ Event Gateway → 📩 Message Event / ⏰ Timer Event → ✅ End
👉 Use when process flow depends on external events (e.g., user reply or timeout).
⚙️ Complex Gateway
📌 Purpose
Used for advanced synchronization logic (rare in simple processes).
🎨 Example Flow
-
Wait for 2 of 3 incoming paths before continuing.
👉 Use only when other gateways cannot model the behaviour.
👉 Watch jBPM Gateway Examples Practical in Action better:
📊 Quick Comparison of Gateways
| Gateway | Symbol | Behavior | Example Use Case |
|---|---|---|---|
| ❌ Exclusive (XOR) | One path only | Approve/Reject decision | |
| 🟢 Inclusive (OR) | One or many paths | Send email AND/OR request review | |
| ➕ Parallel (AND) | All paths in parallel | Run reporting + notification together | |
| ⏳ Event-Based | Waits for event | User response OR timeout | |
| ⚙️ Complex | Advanced logic | Custom join (e.g., 2 of 3 tasks complete) |
🎯 Conclusion
Gateways are the decision-makers of jBPM processes.
-
❌ Exclusive → pick one path
🟢 Inclusive → pick one or many
-
➕ Parallel → run all paths in parallel
-
⏳ Event-Based → wait for external events
-
⚙️ Complex → advanced conditions
By mastering gateways, you can design workflows that mirror real-world business logic — from simple approvals to complex event-driven automation.
💼 Professional Support Available
If you are facing issues in real projects related to enterprise backend development or workflow automation, I provide paid consulting, production debugging, project support, and focused trainings.
Technologies covered include Java, Spring Boot, PL/SQL, Azure, and workflow automation (jBPM, Camunda BPM, RHPAM).
📧 Contact: ishikhanirankari@gmail.com | info@realtechnologiesindia.com
🌐 Website: IT Trainings | Digital metal podium
Comments
Post a Comment