In a bpel (2.0) process I have a for-each loop iterating through a list in the original input document. Within that loop I need to construct an input document for a call to a web service based on data in the current node of the list objects I am looping through.
Constructing the input document via BPEL assign activity copies within the for-each loop is an option but due to the complexity of that document I would prefer to use XSL. But I don't know how to pass the index information (ie. the for-each counter) into XSL and use it there (and I would prefer not to have to do so, since that will prevent use of the XSL GUI in jdev), so I would prefer to send the current node of the list as input to XSL instead.
Is it possible to pass a sub-section of an XML document (e.g. one node in the array) as input into XSL rather than the whole document? In other words, I would like to send the current array element from the original input document rather than the entire original input document because I will be using the data within that array element to create the web service input document.
Example:
<forEach parallel="no" counterName="i"
name="ForEachEntry">
<startCounterValue>1</startCounterValue>
<finalCounterValue>$numTimeEntries</finalCounterValue>
If I used the BPEL assign activity to populate the input document I would need lots of copies similar to this:
<copy>
<from>$inputVariable.OteStgTimecardCollection/ns3:OteStgTimecard[1]/ns3:oteStgTimecardDetailCollection/ns3:OteStgTimecardDetail[$i]/ns3:origtransactionreference</from>
<to>$InvokeOteDetailAbsenceErrorStatusService_OteAbsenceDetailFailureService_InputVariable.OteAbsenceDetailFailureServiceInput_msg/ns19:OrigTransactionReference</to>
</copy>
I would prefer to send the current list object as an input variable into an XSL transform:
$inputVariable.OteStgTimecardCollection/ns3:OteStgTimecard[1]/ns3:oteStgTimecardDetailCollection/ns3:OteStgTimecardDetail[$i]
Is there syntax in bpel that would do that?
Thanks