Andy Peer [https://community.jboss.org/people/Andy00] created the discussion
"jBPM - jBoss ESB integration" To view the discussion, visit: https://community.jboss.org/message/790355#790355 -------------------------------------------------------------- Hi, I have a process which calls an esb service and I pass to this service some variables. What I can't do, is to send back a variable to jbpm. This is a snippet from processdefinition.xml <node name="ESB State 2"> <action class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler"> <esbServiceName> TestProcess </esbServiceName> <esbCategoryName> EntityServices </esbCategoryName> <bpmToEsbVars> <mapping bpm="praticaTest" esb="praticaTest"></mapping> </bpmToEsbVars> <esbToBpmVars> <mapping bpm="ESBexception" esb="ESBexception"></mapping> </esbToBpmVars> </action> <transition to="Service call ok?"></transition> </node> <decision name="Service call ok?" expression="#{(ESBexception eq 'ESBexception' ? 'to Exception State' : 'to END')}"> <transition to="Exception State" name="to Exception State"></transition> <transition to="END Test" name="to END"></transition> </decision> This is from jboss-esb.xml <service category="EntityServices" description="TestProcess JBPM service" name="TestProcess"> <listeners> <jms-listener busidref="testProcess_esb_channel" name="testProcessJMSListener"/> </listeners> <actions mep="RequestResponse"> <!-- log message in --> <action class="com.utils.esb.EsbLogger" name="EchoSoapMessage1"> <property name="message" value="Start ESB - TestProcess -"/> </action> <action class="com.esb.testProcess.handler.TestProcessHandler" name="TestProcessHandler"> <property name="esbToBpmVars"> <mapping bpm="ESBexception" esb="ESBexception"/> </property> </action> <!-- log message out --> <action class="com.utils.esb.EsbLogger" name="EchoSoapMessage2"> <property name="message" value="End ESB - TestProcess -"/> </action> </actions> </service> This is the handler defined above, TestProcessHandler: @Process public Message process(Message message) throws Exception { Body body = message.getBody(); ListString listValues = (ListString)body.get("praticaTest"); message.getBody().add("ESBexception", ""); try { logger.info("ESB TestProcessHandler - BEGIN"); if (listValues.getString().get(0).equalsIgnoreCase("103")) { throw new Exception("****** Code generated exception ***********"); } CommonAnagClient client = ClientServiceFactory.getCommonAnagClient(); CommonAnag servicePort = client.getCommonAnagPort(); servicePort.elencoRegioni(); } catch (Exception e) { logger.info("ESB TestProcessHandler - EXCEPTION"); e.printStackTrace(); message.getBody().add("ESBexception", "ESBexception"); } finally { logger.info("ESB TestProcessHandler - END"); } return message; } I can get the object praticaTest (jbpm -> esb) correctly, but in jbpm, the ESBexception value (in the decision node) is always null. The ESBexception variable is set as a process variable when I first create a process instace. What am I missing? -------------------------------------------------------------- Reply to this message by going to Community [https://community.jboss.org/message/790355#790355] Start a new discussion in jBPM at Community [https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
_______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user