cancel
Showing results for 
Search instead for 
Did you mean: 

Interprocess communication [Message flow]

nommyravian
Champ in-the-making
Champ in-the-making
Hi,
I found here that it's not possible to use message flow to send and receive messages among different processes in current version of Activiti Engine. I've a few questions.

1) If we can't communicate from one process(pool) with another process(pool) then why pools are there in Activiti? Because 2 pools will behave like 2 different processes.
2) If there is another way to send/receive messages from one process to another, what is it.?
3) I want to run two different instances of Activiti (2 fresh running deployments) on the same machine. How can I make two processes deployed to different activiti engines via activiti explorer communicating (sending/receiving messages) each other?

Please answer some or all of the questions stated above?
P.S. Currently I couldn't even make two processes communicating within one Activiti but my goal is to achieve it for two different Activiti environments(on different machines) later, if possible.

Best regards,
Salman
5 REPLIES 5

webcyberrob
Champ in-the-making
Champ in-the-making
Hi,

With regard to point 2, have you considered using a JMS queue or similar? In other words, have a task put a message on a message queue (the sender) and use a message handler on the JMS queue inspect the message, identify which process instance or type to deliver it to (correlation), and thus call the appropriate API on the receiving process instance or type.

The implication of this approach is you are effectively rolling your own event delivery and correlation outside of the core engine, but its a means to an end.

R

nommyravian
Champ in-the-making
Champ in-the-making
Hi,
I'm currently trying to achieve it through Rest API. I'm finding a way to send message from outer world to a process running in Activiti. The outer world can be another process in same Activiti or another instance of Activiti running on same machine/network.
Can anybody help me with that?

I'm still looking for the answer to Q.1, why pools are there in activiti designer (eclipse plugin) if there is no notation to pass messages?

Thanks.

jbarrez
Star Contributor
Star Contributor
Message flow is currently indeed not supported in the engine. But it is something we are looking at, but it might take us still a few months to get to something.

In the meantime, indeed the best solution is to 'use your own', using the signal method and execution id for correlation.

fcauti
Champ in-the-making
Champ in-the-making
I have more or less the same need: I have two processes which instances have to communicate each other.
More in deep, I have a "validation flow" and an "update flow" concerning documents. If the update flow starts on a document that is being validated elsewhere I must end the validation flow process instance related to that document. I thought I could do this with boundary events and messages, but since it's not possible do you suggest me to use signals? But I read that "a signal is not consumed if it is caught", so does it remain indefinitely active?

Thanks

trademak
Star Contributor
Star Contributor
Hi,

Using signals is a good way to implement this kind of logic. And the sentence you are referring to only means that if there are multiple boundary events listening for the same signal event they will all get the signal event and not only one of them.

Best regards,