How to associate jobWorkers with a bpmnFile

Hello ,
I have a use case where i will deploy 3-4 different bpmn files , for handling these processes i will create different springboot Application (Microservices) having the implementation of different jobWokers .
For example:
If i have two process ProcessA and ProcessB and both have a service task to execute , but in both processes the serviceTask Definition type is same , which is used to define Job Worker to subscribe that Job and work upon that.

So situation is like that
There are two Processes ProcessA and ProcessB . To execute these processes we have Two microservices MicroServiceA and MicroServiceB , In microService we have JobHandler which have identical name.
How zeebe will differentiate that which jobWorker it have to call because both JobWorker have same name (Ofcourse JobWorker implementation is different).
Is there any way to associate JobWorkers with BPMN?

Hi @Ansh_Kumar
I believe that the multi-tenancy concept can serve your needs.
You can configure a job worker to pick up jobs belonging to one or more tenants

https://docs.camunda.io/docs/self-managed/concepts/multi-tenancy/#isolation-of-data-and-processes

https://docs.camunda.io/docs/apis-tools/spring-zeebe-sdk/configuration/#control-tenant-usage

https://docs.camunda.io/docs/next/apis-tools/java-client/job-worker/#multi-tenancy

Hi @hassang
This MultiTenancy requires Identity which comes with licensed version , I dont want to buy license , I am planning to move to production without licensed version , i will use only zeebe in production. Is there any other way by which i can use MultiTenancy(without buying license) in production environment?

Before you go too far, have a solid read about the license changes coming in 8.6 https://camunda.com/blog/2024/04/licensing-update-camunda-8-self-managed/

But realistically, if two tasks have the same name, but a different type, that’s fine. If two tasks have different names, but the same type, then one job handler should be able to do either task.

    <bpmn:serviceTask id="ThisIsTheID" name="This is the Name">
      <bpmn:extensionElements>
        <zeebe:taskDefinition type="CallMicroServiceA-Action1" />
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_0bsov0x</bpmn:incoming>
    </bpmn:serviceTask>
  </bpmn:process>

In this way, MicroService A and MicroServiceB can both have an Action1, but you would have different handlers that call each one.

If the interface (both the call and the return) of the two microservices is the same, you can write a Template, where the microservice endpoint can be swapped in at run time… But that’s a much bigger discussion.