Support Article
Null XML element showing when optional checkbox is checked
SA-43318
Summary
A developer has a requirement to not show the XML element in XML output when it has no value.
To achieve this they have checked the Optional checkbox in the XML Stream rule “MapRespCompDefaultData”.
However, empty elements are still being shown.
Error Messages
Not Applicable
Steps to Reproduce
- Define an XML stream with optional elements.
- Generate the XML stream from the clipboard with some of the optional elements missing.
- Note that empty references are generated for those optional elements.
Root Cause
A software use or operation error: The developer had not set the appropriate DSS value.
Resolution
Perform the following local-change:
1. Create a DSS(Dynamic System Setting) with the following information :
Owning Ruleset : Pega-IntegrationEngine
Purpose : StreamXML/DetectEmptyProperties
Value : true
Purpose : StreamXML/DetectEmptyProperties
Value : true
2. After creating the DSS, perform one of the following actions:
a. XML Stream rules (generated before applying the HFix) should be re-saved.
b. XML Stream rules should be re-generated (using Connector & Metadata Accelerator)
b. XML Stream rules should be re-generated (using Connector & Metadata Accelerator)
Published December 4, 2017 - 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.