Async Before / After in Camunda — Why Your Process Freezes

 One of the most common production complaints in Camunda:

“My process sometimes freezes… but no error is visible.”

This usually happens because the process is running inside a single transaction.

Camunda executes multiple BPMN steps in one database transaction unless you tell it not to.

So, when one step blocks → the entire process stops.

The solution: Async Before / Async After


What is Async in Camunda?

Async creates a transaction boundary.

Instead of executing everything in one go:

Task A → Task B → Task C

Camunda stores the state in DB and continues later via Job Executor.


Without Async (Single Transaction)

Everything runs in one DB transaction.

Problem

If Task B takes 20 seconds:

  • DB lock held

  • UI stuck

  • Other instances blocked

  • Possible deadlock


Async Before

Creates checkpoint before task execution

Behavior

Process state saved → job created → executed later

Use When

  • Calling external API

  • Slow logic

  • Network calls


Async After

Checkpoint after task completes

Use When

  • Before gateway evaluation

  • Avoid optimistic locking

  • Parallel flows


Critical Production Scenario

Without Async

Service task → gateway

Gateway evaluated inside same transaction
If another instance updates → optimistic locking exception

With Async After

Gateway evaluated safely in new transaction


Where You MUST Use Async

BPMN ElementNeeded
External APIAsync Before
Parallel GatewayAsync After
User Task creationAsync After
External TaskAsync Before
Long Java DelegateAsync Before

Common Mistake

Only adding async at process start

This does nothing for internal blocking tasks.

Async must be placed at risk points.


Architecture Rule

Every remote call must be async
Every parallel gateway must be async

Debug Tip

If process freezes and DB CPU high → missing async boundary.


📚 Recommended Reading

Improve Camunda stability:

👉 https://shikhanirankari.blogspot.com/search/label/English

Read especially:

These relate directly to async configuration.


Final Advice

BPMN is fast.
Transactions are slow.

Async boundaries protect your engine.

Correct async placement = stable production system.


💼 Need Help with Camunda, Jira, or Enterprise Workflows?

I help teams solve real production issues and build scalable systems.

Services I offer:
• Camunda & BPMN workflow design and debugging  
• Jira / Confluence setup and optimization  
• Java, Spring Boot & microservices architecture  
• Production issue troubleshooting  


📩 Email: ishikhanirankari@gmail.com | info@realtechnologiesindia.com

✔ Available for quick consulting calls and project-based support
✔ Response within 24 hours


Comments

Popular posts from this blog

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

OOPs Concepts in Java | English | Object Oriented Programming Explained

Scopes of Signal in jBPM