Linking different BPM instances


#1

Dear all,
I tried to synchronize two process together deployed separately.
Process A blocks on a catch event. Process B throw the event and when A catch the event it must be unlocked.
I tried but it does not work, I did not find any solution on web. Is it possible to make it working with the strictly condition that the two processes are separated (either in the modeler and in the cockpit when deployed)?


#2

Can you upload your processes so that i have a better idea what exactly you’ve tried and what you’re trying to accomplish.


#3

Here there are two examples of process that I would like to link one to another.
In the “Process PART1” you can see that after the task “T1” there is a conditional event called "Condition ‘T2 executed’ " that waits until a specific input arrives. This input should come from the “Process PART2” where there is the task “T2”. After this task is completed the process ends with a message end event that throws a message which contain the expression “T2=1” (in this case it means that the task T2 is completed).
I know that could be demanding to link two different type of event (in this case a conditional with a message) but I did not find another way to do that.
Can you help me, please?


#4

Hi @Giu,

I would exchange the condition event with a message receive event.

Hope this helps, Ingo


#5

Thank you for your suggestion.
Another question now is: how can I link those two process that are in different deployments with the message events?
So, how can the Process Part2 (when it ends with the throwing message event) sends a message to the Process Part1 (in particular to the message catching intermediate event) and let it continue to the task “T3” ?
As you can see in the next figure, the intermediate message catch event waits until an input (which notifies that “T2” is executed) comes and the process flow is blocked there.


#6

Hi @Giu,

different deployments are no issue, the engine handles this with the message names.

The send message event should execute in a Delegate Class:

runtimeService().createMessageCorrelation("message name").processInstanceBusinessKey("of the receiving process").correlate();

See https://docs.camunda.org/manual/7.9/reference/bpmn20/events/message-events/#message-api for further details.

After this your process will continue.

Cheers, Ingo