-
1. Re: BPMN process with XML input - XSLT transformation - XML output
swiderski.maciej May 10, 2013 1:26 AM (in response to amizzo)1 of 1 people found this helpfulI guess you will be better off with Switchyard or Apache Camel as they are cover integration scenarios out of the box.
HTH
-
2. Re: BPMN process with XML input - XSLT transformation - XML output
amizzo May 10, 2013 4:26 AM (in response to swiderski.maciej)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) 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?
-
3. Re: BPMN process with XML input - XSLT transformation - XML output
swiderski.maciej May 13, 2013 1:48 AM (in response to amizzo)Check these examples, might become handy for your case:
and test cases that use these processes are here.
HTH
-
4. Re: BPMN process with XML input - XSLT transformation - XML output
amizzo May 13, 2013 3:51 AM (in response to swiderski.maciej)Many many thanks.
That's exactly what I was looking for!
-
5. Re: BPMN process with XML input - XSLT transformation - XML output
amizzo May 17, 2013 5:13 AM (in response to swiderski.maciej)Thanks again.
Although the examples you provided are very useful, when I changed them to fit to the purpose, jBPM throwed an exception.
I think the issue is related to the xpath condition and the XPath implementation available in jBPM 5.4.
A real xml example is:
<?xml version="1.0" encoding="utf-8"?>
<MSG xmlns="xxx.it" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="xxx.it C:\MySchema.xsd">
<DURATION>PTM34.07S</DURATION>
<TIMESTAMP1>2010-11-28T16:44:13.00</TIMESTAMP1>
<TIMESTAMP2>2010-11-28T17:09:17.00</TIMESTAMP2>
<RESULT/>
</MSG>
and I need to put into <RESULT/> the value TIMESTAMP1 + DURATION
if TIMESTAMP1 + DURATION > TIMESTAMP2
but I am not able to write this condition into the "conditionExpression"
I suspect that jBPM 5.4 does not support XPath 2.0. Is this correct?