I've been running into a problem the past two days; here's the situation: I'm running jBoss ESB with jBoss jBPM. I've got a process definition running, and I'm calling a service on the buss from that process for serializing an object and attaching it to the message. When I get to the next node of the process however, this attached object is gone.
I know what the problem is, I've had the same thing about three months back , but the same solution does not seem to apply, mainly because the labels changed, most likely ^^
Here's the post I made back then, in essense the same problem with an older ESB version: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4079172#4079172
I'm currently running Jboss ESB4.2 MR3 with jBPM integrated.
Basically, the two main components in this application are the bus definition(jboss-esb.xml) and the jBPM definition (process.xml)
The node where things go bad in the process definition:
<node name="ZorgringFormatConversionNode"> <event type="node-enter"> <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler"> <esbCategoryName>ZorgRingConnectServices</esbCategoryName> <esbServiceName>ConversionToZorgringFormatService</esbServiceName> <millisToWaitForResponse>5000</millisToWaitForResponse> <jbpmToEsbVars> <mapping jbpm-name="theBody" esb-name="BODY_CONTENT" /> <mapping jbpm-name="zorgringformat" esb-name="defaultEntry" /> </jbpmToEsbVars> <returnVars> <mapping jbpm-name="theBody" esb-name="BODY_CONTENT" /> <mapping jbpm-name="zorgringformat" esb-name="defaultEntry" /> </returnVars> </action> </event> <transition name="" to="MEDFormatConversionNode"/> </node>
This node calls a service on the bus, this service calls an actionclass which attaches the object to the message and returns the message to the service. Next, the process goes to the next node. By then, the object is gone.
I'm sure this has to do with the jbpmToEsbVars and returnVars I'm declaring. I do this on the ESB once when initialising the business process:
<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="processMessageDefinition"/> <property name="esb-to-jbpm"> <variables> <variable esb-name="eVar1" jbpm-name="counter" value="45" /> <variable esb-name="BODY_CONTENT" jbpm-name="theBody" /> <variable esb-name="defaultEntry" jbpm-name="zorgringformat" /> </variables> </property> </action>
And I declare the same jbpmToEsbVars and returnVars on each node. When I'm adding the object, I attach it with the label "zorgringformat"(retrieving it in the same actionclass right after I added it works, so it's simply lost in the process somewhere). Any idea what I'm doing wrong?