Yes, we are working on the quickstarts now to illustrate this.
However, the team that is focused on jBPM+ESB integration (myself & Kurt) are both gone all of next week.
In any case, look at the unit test for this capability. if you dig hard enough you'll find a "signal" command which allows your inbound message to fire/signal an existing instance.
Good deal ... Thanks Burr - I will take a look ;-)
Some quick research shows that the signal command is expecting to find the following:
where 10 is token to the current business process instance. Note: when jBPM calls the ESB via the ESBActionHandler this item is injected into the message.
Good answer Burr. ESBActionHandler makes your life a lot easier. It does however use BpmProcessor under the covers
Just so I get this straight ... you are saying:
1) I receive a message that I am listening for that ultimately will 'signal' a process instance to the next transition
2) I do some magical code on my end to get the process instance
3) I add it to the message with
and then my next action in the chain should be:
<action name="signal_the_new_process_instance" class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor"> <property name="command" value="SignalCommand" /> <property name="process-definition-name" value="processDefinition2"/> <property name="esb-to-jbpm"> <!-- esb-name maps to getBody().get("eVar1") --> <variables> <variable esb-name="eVar1" jbpm-name="counter" value="45" /> <property name="process-definition-name" value="processDefinition2"/> <variable esb-name="BODY_CONTENT" jbpm-name="theBody" /> </variables> </property> </action>
Is this right?
Also - I am wondering if there is anyway that I could set the process instance ID that I want to use in the beginning? Obviously it would be unique each time.
I am trying to get this continuance to work and have tried to set both:
Essentially - I am creating a process instance (only one) - then I trigger a new listener and since I know there is only one - I do a quick lookup on both the process instance id and/or token id. I set them in the message then in the action pipeline I go to signal the process instance and follow that up with seeing if the process instance has transitioned.
I am not seeing it transition. I will take a look at the processor code and see what I can find....
I can see that it is looking for a couple of tags - but when I set them, it is not signaling ...
09:38:18,466 ERROR [STDERR] java.lang.Exception: Either <jbpmTokenId> or <jbpmProcessInstId> object must be specified in Message body to know who to signal 09:38:18,466 ERROR [STDERR] at org.jboss.soa.esb.services.jbpm.actions.impl.DefaultCommandExecut orFactoryImpl$8.execute(DefaultCommandExecutorFactoryImpl.java:270) 09:38:18,466 ERROR [STDERR] at org.jboss.soa.esb.services.jbpm.actions.CommandInterpreter.proces s(CommandInterpreter.java:78) 09:38:18,466 ERROR [STDERR] at org.jboss.soa.esb.services.jbpm.actions.BpmProcessor.process(BpmP rocessor.java:64) 09:38:18,466 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source) 09:38:18,466 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodA ccessorImpl.java:25) 09:38:18,466 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585) 09:38:18,466 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessorMethodInfo.pro cessMethods(ActionProcessorMethodInfo.java:102) 09:38:18,466 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.OverriddenActionLifecycleProc essor.process(OverriddenActionLifecycleProcessor.java:74) 09:38:18,466 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.proc ess(ActionProcessingPipeline.java:262) 09:38:18,466 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.MessageAwareListener$1.run(Me ssageAwareListener.java:297) 09:38:18,466 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPool Executor.java:650) 09:38:18,466 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExec utor.java:675) 09:38:18,466 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595) 09:38:18,466 WARN [ActionProcessingPipeline] Unexpected exception caught while processing the actio n pipeline org.jboss.soa.esb.actions.ActionProcessingException: java.lang.Exception: Either <jbpmTokenId> or <j bpmProcessInstId> object must be specified in Message body to know who to signal
Got it ... did not have a proper transition to my end state in my process definition.