How to create a process definition between two different tenantId

Example Use case

say there is a workflow(w1) for organisation1 whereIn one of the steps which has link to another workflow(w2) in organisation2 on completion of w2 then w1 should continue. W1 does not need to know all the steps in w2 and w2 need not know all steps in w1.

w1.task1 → w1.task2 → w1.task3. → w1.task4 ----> tenantId 1
w2.task1-> w2.task2 ----> tenantId 2

Please let us know your suggestion and documents if any.

Hi senthacit,

There are several possibilities. As I understood you want to start another process for different tenant from currently running process.

  1. user rest api to start the process for different tenant.
  2. use java api (e.g. runtime service) and start the process with tenantId


Hi Martin,

thanks for replying back! I want to understand how the bpmn xml file would like for such kind of use case. we as are always deploying 1 file for 1 tenant

From runtimeService

     * Similar to {@link #startProcessInstanceByKey(String)}, but using a specific tenant identifier.
    ProcessInstance startProcessInstanceByKeyAndTenantId(String processDefinitionKey, String tenantId);

the benefit of java api is (if you are using the same jvm) is sharing the transaction,


thanks for the response !