UseCase: Here, we will show you how to split an input, received as comma separated string values( here, emails) into array of values using create-nodeset-from-delimited-string() function.
Logic steps:
- Create a rest trigger connection
- Create an app driven integration and configure using request and response jsons
- Map the request to response using create-nodeset-from-delimited-string() function.
Input json:
{
"Emails":""
}
output json:
{
"Emails":[{
"Email":"",
},{
"Email":""
}]
}
XSLT code:
<nstrgmpr:executeResponse>
<nstrgdf1:response-wrapper>
<nstrgdf1:Emails>
<xsl:for-each select="oraext:create-nodeset-from-delimited-string('{http://test.com/sample/xml}value',/nstrgmpr:execute/nstrgdf1:request-wrapper/nstrgdf1:Emails,',')">
<nstrgdf1:Email>
<xsl:value-of select="."/>
</nstrgdf1:Email>
</xsl:for-each>
</nstrgdf1:Emails>
</nstrgdf1:response-wrapper>
</nstrgmpr:executeresponse>
Details steps with screenshots:
Test:
Note: we can also use oraext:create-delimited-string() XSLT function to convert nodes to delimited string.