Problem with using arrays in BPEL
xakac May 17, 2010 9:31 AMHi all,
I have a problem to use arrays in BPEL. In the past I used GlassFish as App Server with integrated bpel service engine. It was very easy to use arrays in BPELs on GlassFish. Now on JBoss with RiftSaw I have troubles to do that in similar way. For example I try to prepare in BPEL a call for webservice method to create an Item that should have two or more InputFields with different names and values.
Initial I defined the createItemIn variable:
<bpel:variable name="createItemIn" messageType="ns1:Integrity_2009_createItem"/>
Then I "preinit" this var:
<bpel:copy insertMissingToData="yes">
<bpel:from>
<bpel:literal>
<arg0 transactionId="" Type="" xmlns="">
</arg0>
</ns1:createItem>
</bpel:literal>
</bpel:from>
<bpel:to variable="createItemIn" part="createItem"/>
</bpel:copy>
In the next step I try to set values for createItemIn that should been of Type "DemoTypeA" and have two ItemFields named "PartnerID" and "Summary":
<bpel:assign name="Ass_ItemType">
<bpel:copy insertMissingToData="yes">
<bpel:from><bpel:literal>DemoTypeA</bpel:literal></bpel:from>
<bpel:to>$createItemIn.createItem/arg0/@Type</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:assign name="Ass_PartnerID">
<bpel:copy insertMissingToData="yes">
<bpel:from><bpel:literal>PartnerID</bpel:literal></bpel:from>
<bpel:to>$createItemIn.createItem/arg0/int:ItemField[1]/@Name</bpel:to>
</bpel:copy>
<bpel:copy insertMissingToData="yes">
<bpel:from>12</bpel:from>
<bpel:to>$createItemIn.createItem/arg0/int:ItemField[1]/int:integer</bpel:to>
</bpel:copy>
</bpel:assign>
<bpel:assign name="Ass_Summary">
<bpel:copy insertMissingToData="yes">
<bpel:from><bpel:literal>Summary</bpel:literal></bpel:from>
<bpel:to>$createItemIn.createItem/arg0/int:ItemField[2]/@Name</bpel:to>
</bpel:copy>
<bpel:copy insertMissingToData="yes">
<bpel:from><bpel:literal>harcoded BPEL Summary</bpel:literal></bpel:from>
<bpel:to>$createItemIn.createItem/arg0/int:ItemField[2]/int:shorttext</bpel:to>
</bpel:copy>
</bpel:assign>
In GlassFish BPELs does it work without any problems, but not in RiftSaw on JBoss. I believe the problem is in arrays ItemField[x], because if I define a createItemIn with only one ItemField without array bracket [] it works fine! But I can not accept this, because I have to create Items that contains several ItemFields.
Is there an other option how I can use arrays in RiftSaw BPELs?
Thanks in advance!