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

  1. 🔑 Log in to Business Central

  2. 📂 Create a project: inclusive-gateway-demo

  3. ➕ Add Business Process: InclusiveProcess

    • Id: com.example.inclusive

    • Package: com.example


🎨 Step 2: Design the Workflow

  1. 🔵 Add a Start node

  2. 🟢 Add an Inclusive Gateway (OR)

  3. 📧 Add an Email Task (Send Notification)

  4. 👤 Add a Human Task (Manager Review)

  5. 📊 Add a Report Task (Generate Report)

  6. 🟢 Add another Inclusive Gateway (Join)

  7. ✅ 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:

    sendEmail == true
  • 👤 Review path → condition:

    reviewNeeded == true
  • 📊 Report path → condition:

    generateReport == true

👉 Multiple conditions can evaluate to true, so more than one path can run in parallel.


🔨 Step 5: Build and Deploy

  1. 💾 Save the process

  2. 🛠️ Build & Install project

  3. 📦 Deploy to KIE Server


▶️ Step 6: Run the Process

  1. Go to Manage → Process Definitions

  2. ▶️ Start a new instance of InclusiveProcess

  3. Set variables (sendEmail, reviewNeeded, generateReport) as true/false

  4. 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:

Here's a quick video to help you understand jBPM Workflow Tutorial: 🟢 Inclusive Gateway (OR) in Action better: 

👉 Source code: https://github.com/LearnITWithShikha/GatewayExamples


🛠️ 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).


🎥 Learn IT with Shikha on YouTube

Prefer learning through videos? Watch practical tutorials on Kafka, Camunda, Alfresco, Java, Spring Boot, Microservices and Enterprise Architecture.

▶ Subscribe to Learn IT with Shikha on YouTube

Comments

Popular posts from this blog

Top 50 Camunda BPM Interview Questions and Answers for Developers (2026 Guide)

10 BPMN Best Practices Every Camunda Developer Should Know

OOPs Concepts in Java | English | Object Oriented Programming Explained