You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

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/

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!