I am using WSO2 BPS and WSO2 DSS
.
DSS has 2 services
as below:
(1) Returns list of status and
(2) Inserts a record into table.
I succeeded invoking both the DSS services from BPEL Workflow
. But I need to achieve the following thing.
My 1st DSS will return "List of Status". I have to iterate(using 'forEach' or 'while'
or ...) that response and pick particular node(StatusDescription
) from it and use it for the next DSS call. My 1st DSS response is below.
<Response xmlns="http://ws.wso2.org/dataservice">
<Status>
<StatusId>1</StatusId>
<StatusDescription>Active</StatusDescription>
</Status>
<Status>
<StatusId>2</StatusId>
<StatusDescription>Inactive</StatusDescription>
</Status>
</Response>
Can anyone suggest some tutorial or code snippet that would iterate through above DSS response? i.e, My bpel:finalCounterValue
will be '2' as there are 2 'Status' nodes in the above XML.
Thanks in Advance.