-
1. Re: Switchyard invoking BPM signal-event
dward May 10, 2013 9:40 AM (in response to dckes)The event id that shows up in the tooling is actually the signalRef in the bpmn2 file. So, if you have this in bpmn2:
<signalEventDefinition id="SignalEventDefinition_1" signalRef="test"/>
Then do this in your switchyard.xml:
<implementation.bpm...>
<actions>
<action id="test" operation="myOperation" type="SIGNAL_EVENT">
</action>
</actions>
...
</implementation.bpm>
If this doesn't work for you, please attach your bpmn2 and switchyard.xml files.
-
2. Re: Switchyard invoking BPM signal-event
dckes May 10, 2013 11:31 AM (in response to dward)Hi David,
I think I am still doing something wrong. It does not seem to work.
In my switchyard file I added the ID attribute according to the signalRef in the bpmn file.
See attached my switchyard.xml and bpmn file.
A process instance is started by invoking the submitOrder operation. In the SOAP message I added a processInstanceId field.
In a subsequent SOAP call I invoke the receiveOrderAcknowledgement operation which is supposed to invoke the signal event in my bpmn process.
In the Switchyard message trace I can see that Switchyard receives the message correctly. Unfortunatelly, the Task script in the bpmn process is not invoked.
Do I perhaps have to pass the processInstanceId to the bpmn process? Or do I also have to add an extra SOAP header field like processEvent? Should the process be persistent?
What am I missing in my configuration?
thanks!
-
switchyard.xml 3.8 KB
-
ProcessOrderFlow.bpmn.zip 1.4 KB
-
-
3. Re: Switchyard invoking BPM signal-event
dward May 10, 2013 11:40 AM (in response to dckes)When you start a process instance, the response soap message will have the newly created processInstanceId in the soap headers. You HAVE to send that back in the subsequent (signalling) request as a soap header, otherwise SwitchYard (and thus jBPM) won't know which process instance to signal.
Try that, and if you still have problems, please copy/paste here your MessageTrace output from both of your requests/responses.
Aside, if you are using SwitchYard 0.8, you don't have to have the <workItemHandlers> section in your switchyard.xml. The SwitchYard runtime now always auto-registers the SwitchyardServiceWorkItemHandler.
-
4. Re: Switchyard invoking BPM signal-event
dckes May 10, 2013 3:50 PM (in response to dward)Hi David,
Your signalRef-id suggestion did the trick!
Apparently, I had to solve some other problems before it worked:
- I changed back the SOAP Header Type from XML to Value (unwrapped payload)
- I printed the process instance ID in a task in my processflow (kcontext.getProcessInstance().getId()), to make sure I passed the correct processInstanceId in order to invoke the event in my flow.
- My JAXB tranformation failed, so the bpmn process was not reached.
Thanks for your help!
-
5. Re: Switchyard invoking BPM signal-event
dward May 10, 2013 3:58 PM (in response to dckes)No problem. Glad it's working for you now!