Gary Pinkham [
http://community.jboss.org/people/garyp] created the discussion
"bpmtoesbvars and esbtobpmvars..."
To view the discussion, visit:
http://community.jboss.org/message/580078#580078
--------------------------------------------------------------
I'm using 5.0.2 of the SOA-P (and therefore jBPM3)
I have a workflow that calls an ESBActionHandler.. like this (yes the exception handler is
missing):
<node name="create pdf">
<action name="action"
class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
<esbCategoryName>GeneratePDFApplicationService</esbCategoryName>
<esbServiceName>GeneratePDFApplicationService</esbServiceName>
<bpmToEsbVars>
<mapping bpm="message"
esb="BODY_CONTENT" />
<mapping bpm="masterCaseId"
esb="masterCaseId" />
</bpmToEsbVars>
<esbToBpmVars>
<mapping esb="body.pdffile" bpm="attachment"
/>
</esbToBpmVars>
</action>
<timer duedate="10 seconds" name="timeout"
transition="save pdf"/>
<transition name="save pdf" to="save pdf">
</transition>
</node>
the GeneratePDFAccplicationService is an ESB Service that runs an XSLT and a custom FOP
action.. The custom action adds a variable called pdffile to the body of the message..
like so:
message.getBody().add(this.attachmentName, baos.toByteArray());
I put in a couple of displays.. One in the custom ESB Action:
11:07:14,585 INFO [STDOUT] body variable names:
11:07:14,585 INFO [STDOUT] org.jboss.soa.esb.message.defaultEntry
11:07:14,585 INFO [STDOUT] masterCaseId
11:07:14,585 INFO [STDOUT] xslfo
11:07:14,585 INFO [STDOUT] pdffile
And we leave that node and go onto another node
11:07:21,536 INFO [STDOUT] this script is leaving node Node(create pdf)
11:07:21,545 INFO [STDOUT] this script is entering node Node(save pdf)
In this node I printed the BPM variables:
11:07:21,627 INFO [STDOUT] BPM variables:
11:07:21,627 INFO [STDOUT] message
11:07:21,627 INFO [STDOUT] jbpmProcessNodeVersionCounter21_27
11:07:21,627 INFO [STDOUT] masterCaseId
No variable called attachment.. So what happened to this:
<mapping esb="body.pdffile" bpm="attachment" />
I know the body.pdffile variable is there (as seen above).. Amd I referring to it
wrong? is it not "body."???
thanks for the help!!!
Gary
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/580078#580078]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]