Skip to Main Content

Integration

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Assign one complex element from payload issue in 11g BPEL

user623606Jul 28 2010
Upgraded BPEL 10.1.3.4 to 11g (11.1.1.3.0) and I know the compiler is stricter and all, but I haven't been able to get this working. The requirement is loop through the elements of a payload in a while loop and "do something" with each. Here is a sample of the element structure:

- <ns2:costCenter>
<ns2:costCenterNo>683-01-I/4.3.8.8.04/990000</ns2:costCenterNo>
<ns2:costCenterName>683-01-I/4.3.8.8.04/990000</ns2:costCenterName>
<ns2:level1>683-01-I</ns2:level1>
<ns2:level3>990000</ns2:level3>
<ns2:address />
<ns2:city />
<ns2:state />
<ns2:zip />
</ns2:costCenter>
- <ns2:costCenter>
<ns2:costCenterNo>683-01-I/4.3.8.8.06/990000</ns2:costCenterNo>
<ns2:costCenterName>683-01-I/4.3.8.8.06/990000</ns2:costCenterName>
<ns2:level1>683-01-I</ns2:level1>
<ns2:level3>990000</ns2:level3>
<ns2:address />
<ns2:city />
<ns2:state />
<ns2:zip />
</ns2:costCenter>

I want to pick out one "costCenter" structure at a time. Here is the Assign code that worked in 10.1.3.4:

<assign name="GetCurrentCostCenter">
<copy>
<from expression="bpws:getVariableData('GetAsentinelCostCenters_FindCostCenter_OutputVariable','FindCostCenterResponse','/ns1:FindCostCenterResponse/ns1:costCenter')[bpws:getVariableData('LoopInd')]"/>
<to variable="CurrentCostCenter"
part="FindCostCenterResponse"
query="/ns1:FindCostCenterResponse/ns1:costCenter"/>
</copy>
</assign>

I thought I found the solution when I came acorss the 11g samples and in particular "bpel-102-AssignActivities". I tried the CopyList, which ends up copying over ALL the costCenter elements and "ignores" the LoopInd variable. I tried the simple assign, but get the error about result returns too many nodes:

"XPath query string returns multiple nodes. The assign activity part and query are returning multiple nodes. The assign activity part and query named in the error message returned multiple nodes. It should return single node. According to BPEL4WS specification 1.1 section 14.3, the assign activity part and query named in the error message should not return multiple nodes. Verify the part and xpath query named in the error message at line number 160 in the BPEL source."

I think I've tried every combination that I can think of. I've resulted to posting here in case someone has a similar requirement and has it working in 11g.

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 25 2010
Added on Jul 28 2010
0 comments
659 views