Discussion:
[jboss-user] [jBPM] - BPMN process with XML input - XSLT transformation - XML output
Massimiliano Izzo
2013-05-07 10:37:59 UTC
Permalink
Massimiliano Izzo [https://community.jboss.org/people/amizzo] created the discussion

"BPMN process with XML input - XSLT transformation - XML output"

To view the discussion, visit: https://community.jboss.org/message/816475#816475

--------------------------------------------------------------
Hi all,

I am a newbie to jBPM, so hope to not put a trivial question...
I am designing a software system to integrate several systems exchanging messages through JMS. All the systems defined a common XML data frame validated through an XML schema. The integration system needs to do some computation on specific XML tags.
As an example, if I receive the following xml:
<msg>
<a>5</a>
<b>6</a>
</msg>
I have to transform the xml into
<msg>
<a>5</a>
<b>6</a>
<sum>11</sum>
</msg>

My question is: Can I design a jBPM5 process to handle this task without developing a Java task to get the XSLT transformation? Is there any out-of-the-box feature of jBPM5 to model such scenario?

Thanks in advance for your assistance
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/816475#816475]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-05-10 05:26:37 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: BPMN process with XML input - XSLT transformation - XML output"

To view the discussion, visit: https://community.jboss.org/message/817099#817099

--------------------------------------------------------------
I guess you will be better off with http://www.jboss.org/switchyard Switchyard or http://camel.apache.org/ Apache Camel as they are cover integration scenarios out of the box.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/817099#817099]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Massimiliano Izzo
2013-05-10 08:26:44 UTC
Permalink
Massimiliano Izzo [https://community.jboss.org/people/amizzo] created the discussion

"Re: BPMN process with XML input - XSLT transformation - XML output"

To view the discussion, visit: https://community.jboss.org/message/817117#817117

--------------------------------------------------------------
Thanks for the reply.
I had a look at Switchyard, but I prefer to not include additional frameworks to do something that I thought was simple.
After some Googling it seems that I could use XPath for dataInputAssociation (as described in https://community.jboss.org/thread/177695 https://community.jboss.org/thread/177695) but I had no luck in finding any example on this.
For instance, with regard to my sample XML document, I would like to assign <a> and <b> to a task variable (eg. a script task) and use the task to get the sum and assign it to the <sum> tag (this tag could not be present in the original xml document).
Also, I am trying to understand if I can use a condition (eg. a < b) for a sequence flow, where the condition affects the values of the xml tags.
Have you any BPMN 2.0 xml example to do this?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/817117#817117]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Maciej Swiderski
2013-05-13 05:48:20 UTC
Permalink
Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: BPMN process with XML input - XSLT transformation - XML output"

To view the discussion, visit: https://community.jboss.org/message/817314#817314

--------------------------------------------------------------
Check these examples, might become handy for your case:

- https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/resources/BPMN2-XpathExpression.bpmn2 condition with xpath
- https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/resources/BPMN2-DataInputAssociations-xml-literal.bpmn2 data input association

and test cases that use these processes are https://github.com/droolsjbpm/jbpm/blob/master/jbpm-bpmn2/src/test/java/org/jbpm/bpmn2/DataTest.java here.

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/817314#817314]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Massimiliano Izzo
2013-05-13 07:51:49 UTC
Permalink
Massimiliano Izzo [https://community.jboss.org/people/amizzo] created the discussion

"Re: BPMN process with XML input - XSLT transformation - XML output"

To view the discussion, visit: https://community.jboss.org/message/817338#817338

--------------------------------------------------------------
Many many thanks.
That's exactly what I was looking for!
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/817338#817338]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Massimiliano Izzo
2013-05-17 09:13:43 UTC
Permalink
This post might be inappropriate. Click to display it.
Loading...