cancel
Showing results for 
Search instead for 
Did you mean: 

how to invoke a message start event

aqs
Champ in-the-making
Champ in-the-making
Hi, I want to invoke a process which have a 'message start event' . However I couldnt figure out how to do it. please explain how we could do it.
I want to know how to set it up in both in the modeller, and how to pass it through the java call itself, while calling startProcessInstanceByKey().

For clarity i will explain with an example.
1. My process wants to start when it recieves a message by the name "message1".
    fig would be[img]http://img251.imageshack.us/img251/8260/screenshot1yz.png[/img]
2. i need to pass the value for it, when i invoke it from the java api call. (like startProcessInstanceByKey() )
3. so how do i do it in the java code, and how do i set the properties in the modeller as well, so that it can recieve the message correctly.
4. I would also like to see if some one could post the xml representation of a proper message start event.
1 REPLY 1

tombaeyens
Champ in-the-making
Champ in-the-making
use a plain start event.
you have to write a (jms) message listener, capture the message in a java variable.
then you can build up the map of variables from the message that you receive.  you can choose to put the whole message in there or just specific values from the message.
then you can supply that variable map in the startProcessInstanceByKey method invocation.

in the future we'll add convenience support for this kind of construct but we don't have that for now.