How to loop payload attributes in xpath
Summary: In ApproveAdjustment BPM task we have a requirement to validate the multiple target projects in SPLIT AND TRASFER scenario. If we use the below string function in Xpath expression by explicitly mentioning the sequence it is working.
string(distinct-values(/task:task/task:payload/[local-name()='getAdjApprovalTargetProjectInfoResponse']/[local-name()='result'][1]/*[local-name()='ProjectNumber']))
string(distinct-values(/task:task/task:payload/[local-name()='getAdjApprovalTargetProjectInfoResponse']/[local-name()='result'][last()]/*[local-name()='ProjectNumber']))
as we are not sure on how many target projects will be there, we want to keep all target projects in a loop and pass it to a bind parameter in xpath like below.
string-join(/task:task/task:payload/