How the process engine behaves when the Job Executor is not activated

I am using Camunda in a Spring Boot application. In my BPMN models, I have some parallel gateways and asynchronous tasks. This documentation says that the job executor is NOT enabled by default in embedded process engines The Job Executor | docs.camunda.org. So far, my process instances runs without problems and I have not enabled the job executor. After reading more about the job executor, it sounds like I should activate it.

I would like to know how jobs are executed when the job executor is not activated so that I can understand why I might need to active it.

Thanks

Hey @cambarantama, i use camunda 7 also in springboot services and never had to activate the job executor, so yes, i think its enabled by default and the documentation is maybe “wrong”?!

By the way, the way your process tasks can be executed will always be in one of this two ways:

  • execute immediately on the same http thread you created the process instance. When you receive an http request and launch a process instance, it will continue to execute every task until it finds a wait state (message receiver, timer events, user task or any component with async before/after checked, etc). Thats why if any of this tasks throws an error, your process will be rolledback and never saved to the database.
  • The other way is just when you had those wait states on the process before. When the process arrives on a wait state, it saves a job to the database. Every camunda container you have will be polling these jobs on the Job acquisition thread, locking them and let their job executor threads execute each one of this locked tasks on a new transaction each. Whenever an error ocurrs in this scenario, this specific transaction of one job executor thread will be rolled back and the job will be released for another job executor to try again until the job retries goes to zero, opening an incident then.
3 Likes

Hi @cambarantama,

the Camunda Spring Boot starter overrides the default configuration and starts the jobExecutor if it is not explicitly disabled: Process Engine Configuration | docs.camunda.org.

The starter is a layer on top of the embedded process engine.

Hope this helps, Ingo

2 Likes

Thanks @ Jean_Robert_Alves and @ Ingo_Richtsmeier