jBPM Workflow Tutorial: 🟢 Inclusive Gateway (OR)
🚀 Introduction
The 🟢 Inclusive Gateway (OR) in jBPM allows a process to follow one or more paths simultaneously, depending on conditions.
Unlike ❌ Exclusive Gateway (XOR), which picks only one path, the Inclusive Gateway can trigger multiple outgoing flows when their conditions evaluate to true.
This makes it useful for scenarios like multi-step reviews, conditional notifications, or parallel-but-optional actions.
🛠️ Prerequisites
-
💻 jBPM/Business Central & KIE Server installed
-
☕ JDK 11+ (or JDK 17)
-
👨💼 User roles with
analyst/manager -
🌐 Access to:
http://localhost:8080/business-central
📝 Step 1: Create a New Process
-
🔑 Log in to Business Central
-
📂 Create a project: inclusive-gateway-demo
-
➕ Add Business Process: InclusiveProcess
-
Id:
com.example.inclusive -
Package:
com.example
-
🎨 Step 2: Design the Workflow
-
🔵 Add a Start node
-
🟢 Add an Inclusive Gateway (OR)
-
📧 Add an Email Task (Send Notification)
-
👤 Add a Human Task (Manager Review)
-
📊 Add a Report Task (Generate Report)
-
🟢 Add another Inclusive Gateway (Join)
-
✅ Add an End node
🔗 Connect as:
Start → 🟢 Inclusive (Split) → (📧 Email, 👤 Review, 📊 Report) → 🟢 Inclusive (Join) → End
📊 Step 3: Define Data
-
Add process variables:
-
sendEmail:Boolean -
reviewNeeded:Boolean -
generateReport:Boolean
-
⚙️ Step 4: Configure Gateway Conditions
-
📧 Email path → condition:
-
👤 Review path → condition:
-
📊 Report path → condition:
👉 Multiple conditions can evaluate to true, so more than one path can run in parallel.
🔨 Step 5: Build and Deploy
-
💾 Save the process
-
🛠️ Build & Install project
-
📦 Deploy to KIE Server
▶️ Step 6: Run the Process
-
Go to Manage → Process Definitions
-
▶️ Start a new instance of InclusiveProcess
-
Set variables (
sendEmail,reviewNeeded,generateReport) as true/false -
Process follows all paths where condition = true
📌 Step 7: Outcomes
-
If only
sendEmail=true→ only 📧 Email Task executes -
If
reviewNeeded=true&generateReport=true→ 👤 Review + 📊 Report run together -
If all = true → 📧 + 👤 + 📊 all execute before merging at the Join Gateway
👉 Watch jBPM Workflow Tutorial: 🟢 Inclusive Gateway (OR) in Action better:
🛠️ Troubleshooting
-
❌ No path triggered? → Ensure at least one condition evaluates true
-
⚠️ Deadlock? → Always add a matching Join Inclusive Gateway before End node
-
🔄 Unexpected behavior? → Verify data types (Boolean vs String mismatch)
🎯 Conclusion
The 🟢 Inclusive Gateway (OR) is a powerful way to model workflows where one or more conditions can be true at the same time.
It gives flexibility beyond ❌ XOR by enabling multi-branch execution.
You can now:
-
📧 Send optional notifications
-
👤 Request reviews only when needed
-
📊 Generate reports based on conditions
By mastering Inclusive Gateways, you can design flexible, real-world processes where business rules trigger multiple actions simultaneously.
💼 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