Intermediate Events in Camunda 7 – Complete Guide with Examples

 Intermediate Events are one of the most powerful BPMN elements used in Camunda 7. They allow you to pause, wait, catch signals, handle messages, manage timers, trigger compensations, and more — all in the middle of your process flow.

If you are building workflows in Camunda 7 (Camunda Platform), understanding Intermediate Events is essential for designing reliable, flexible, and controlled business processes.


🌟 What Are Intermediate Events?

An Intermediate Event occurs between the start and end of a workflow.
They either catch or throw something:

  • Catch events wait for something

  • Throw events send or trigger something


Types of Intermediate Events in Camunda 7

Below is a clear breakdown of each type with diagrams + examples.


1️⃣ Timer Intermediate Event (Catching)

Used when the process must wait for a specific time.

📌 Examples:

  • Wait for 24 hours

  • Run every Monday

  • Delay before sending a reminder

XML Example

<bpmn:intermediateCatchEvent id="Wait24Hours"> <bpmn:timerEventDefinition> <bpmn:timeDuration>PT24H</bpmn:timeDuration> </bpmn:timerEventDefinition> </bpmn:intermediateCatchEvent>

2️⃣ Message Intermediate Catch Event

Used to wait for an incoming message.

📌 Example:

  • Waiting for a response from an external system

  • Waiting for a user to complete an off-system task

XML Example

<bpmn:intermediateCatchEvent id="WaitForMessage"> <bpmn:messageEventDefinition messageRef="Message_Approval"/> </bpmn:intermediateCatchEvent>

3️⃣ Message Intermediate Throw Event

Used to send a message to another process or external system.

📌 Example:

  • Notify another workflow

  • Send a signal to microservices


4️⃣ Signal Intermediate Events (Throw & Catch)

Signals are broadcast, not targeted.

📌 Example:

  • When payment is completed → broadcast signal

  • All processes listening for “PaymentDone” react

XML Example

<bpmn:intermediateThrowEvent id="SignalPaymentDone"> <bpmn:signalEventDefinition signalRef="PaymentDone"/> </bpmn:intermediateThrowEvent>

5️⃣ Error Intermediate Event (Catching)

Catches an error thrown from a service task or script task.

Used to handle exceptions gracefully.

📌 Example:

  • API call failed

  • Database transaction error


6️⃣ Escalation Intermediate Events (Throw & Catch)

Used for non-fatal escalations.

📌 Example:

  • SLA about to expire → escalate to supervisor

  • Notify manager but continue workflow


7️⃣ Compensation Intermediate Event

Triggers a compensation handler.

📌 Example:

  • Undo a hotel booking

  • Cancel payment transaction


8️⃣ Conditional Intermediate Event

Triggered when a condition becomes true.

📌 Example:

  • Wait until amount > 50000

  • Auto-approve once a business rule result matches

XML Example

<bpmn:conditionalEventDefinition> <bpmn:condition xsi:type="bpmn:tFormalExpression">${amount > 50000}</bpmn:condition> </bpmn:conditionalEventDefinition>

Comparison Table





Event Type




Catch




Throw




Usage
Timer                           ✖Wait for time
Message          ✔                            Communicate between processes
Signal         ✔Broadcast to many processes
Error         ✖Handle exceptions
Escalation        ✔Raise non-error escalation
Compensation✔                           ✔Undo previous tasks
Conditional       ✖Trigger when condition is true


Real-World Example Workflow


Scenario: Loan Approval Process

  1. User submits loan application

  2. System pauses for 24-hour verification (Timer event)

  3. External system sends verification message (Message catch)

  4. If income < minimum → throw escalation

  5. If fraud detected → throw error

  6. Auto-approval triggers signal to a reporting process

  7. Final decision generated

This shows how intermediate events create real-life workflow control.


Best Practices for Intermediate Events

✔ Use Timer Events for SLAs & Reminder Flows

✔ Use Message Events for external integrations

✔ Use Signal Events only for broadcast patterns

✔ Use Error Events instead of XOR gateways for exceptions

✔ Use Conditional Events for real-time status updates

✔ Avoid mixing Signal & Message events in the same logic path

✔ Use Compensation only when the business truly needs “undo” operations


Conclusion

Intermediate Events make your Camunda 7 processes:
✔ Smarter
✔ More flexible
✔ More controlled
✔ Easy to integrate with real systems

Mastering them will greatly improve workflow designs and automation capabilities.

💼 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).


Comments

Popular posts from this blog

jBPM Installation Guide: Step by Step Setup

Scopes of Signal in jBPM

OOPs Concepts in Java | English | Object Oriented Programming Explained