Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

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

  1. Create Connector rules.
  2. 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:
  1. Clear the auto-generated check box selection. Use the XML content from XML tab of XML Stream rule
  2. 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

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us