Support Article
Empty nodes in request XML even though "Is Optional" checked
SA-6981
Summary
Optional elements in XML with no value in corresponding field create empty nodes, instead of than no nodes.
Error Messages
Not Applicable
Steps to Reproduce
- Create Connector rules.
- Call the service with blank source properties.
Root Cause
A defect in Pegasystems’ code or rules:
Is-present() API does not work for auto-generated XML content.
Resolution
Perform the following local-change:
- Clear the auto-generated check box selection. Use the XML content from XML tab of XML Stream rule
- Replace <pega:when test="$is-present(.address)"><pega:withEmbedded name=”.address”><ns2:address> with <pega:when test=".address!=''"> < address > <pega:reference name=". address " mode="normal"/> </ address > </pega:when>
Published October 21, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.