当前位置: 动力学知识库 > 问答 > 编程问答 >

apache - Use Array in BPEL

问题描述:

I would like to create an array using XSD and use the same in my BPEL(Apache ODE) and insert values into the same.

XSD:

<complexType name="datesOfActivation">

<sequence>

<element name="dates" type="date" maxOccurs="unbounded" minOccurs="0"> </element>

</sequence>

</complexType>

<element name="TaskDates" type="tns:datesOfActivation">

</element>

Here is how I am trying to insert values in it (BPEL):

<bpel:copy>

<bpel:from>$date</bpel:from>

<bpel:to>$TaskDates/tns:dates[$counter]/text()</bpel:to>

</bpel:copy>

Counter is a variable which starts with 1. date is a simple variable whose value I want to pass in the array. When I execute it I get only a single value in array in the end. (I increase the counter value)

What am I doing wrong?

网友答案:

Please try using while instruction bellow.

<while condition="bpws:getVariableData('var1', 'TestPart') &lt; 10">
    <assign>
       <copy>
         <from expression="bpws:getVariableData('var1', 'TestPart') + 1"/>
         <to variable="var1" part="TestPart"/>
      </copy>
    </assign>
   </while>
分享给朋友:
您可能感兴趣的文章:
随机阅读: