Each Process in own Artifact with shared Database

Dear Communty,

given the following scenario:
I have multiple processes/workflows with service tasks and human tasks.
The simplest way to implement this, is to use one artifact, either Spring Boot (.jar) or Java EE (.war) by implementing all the logic in the corresponding artifact. However, I would like to have an own artifact for each process, so I can scale the processes independently according to the usage of the specific processes. So for example, if process A is heavily used I can launch another container just for this process.

Let’s assume I have for each process an own Spring Boot Application. This is fine as long as I use different databases. As soon as I am using a shared database each Job Executor contained in each Spring Boot Application pulls jobs from the database. So, this will lead to errors as the Job Executor from Spring Boot Application A with Process A pulls a job from Process B whose Logic is contained in Spring Boot Application B. I know I can use camunda.bpm.job-execution.enabled=false to prevent the job execution. This is useful, if I want to have the camunda webapplication in an own Spring Boot Application. But this does prevent job execution at all. So, this is no solution.

My goal that I want to achieve is, that I have for each process an own artifact that can be scaled independently for example via kubernetes. Nevertheless, the users of the cockpit, tasklist, admin ui shall have a central login where they can monitor or work on all processes.

I know you can use different process engines and configurations. Though, I have no clue how to setup these process engine to achieve my goal or if it is possible at all.

Every hint will be appreciated.

Hi @philipp.hehnle,

you have to make each job executor deployment aware: https://docs.camunda.org/manual/7.14/user-guide/process-engine/the-job-executor/#job-execution-in-heterogeneous-clusters

Here is a Video of a CamundaCon talk about all pitfalls and how to solve them: https://www.youtube.com/watch?v=Nx4I8lNMUs0

Hope this helps, Ingo

1 Like

You have to set the engine property deploymentAware to true. Then each engine will only fetch the jobs it can process.

1 Like