How to compare integer count with for-each counter in WSO2 BPS BPEL

361 Views Asked by At

I found problem to compare result of count function with for-each counter. I have input XML with multiple elements. I get count($PartnerLink1Response.return/Body/Object) at the start into unsignedInt variable which returns

<temporary-simple-type-wrapper>2.0</temporary-simple-type-wrapper>

This value I want to compare inside ForEach loop with loop variable Counter which is unsignedInt too but it returns value

<tns:result xmlns:tns="http://wso2.org/bps/sample">2</tns:result>  

This two values in If condition never match. How to compare this two values to match.

I am using WSO2 BPS 3.2.0

1

There are 1 best solutions below

0
On BEST ANSWER

I found that although you cannot compare

count($Response2.return/Body/Object) = $Counter

comparing

count($Response2.return/Body/Object) - $Counter = 0  

works