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

Optional tag in XML stream rule showing up in the generated XML

SA-12191

Summary



In a stream XML rule an element is marked as optional. However, when the stream rule is executed using a connect SOAP and no data is entered in the UI, a blank data is passed to the property and the tag corresponding to the XML element marked as optional still gets generated.

Error Messages



Not Applicable

Steps to Reproduce



1. Run the service wizard from Pega-> Services -> Service Wizard.
2. Create a service of type SOAP.
3. The service Rule as well as the Parse and Stream XML rules will be generated.
4. Modify the Stream XML as follows and have the any one of the field as optional(AccountNumber in this case).
5. Create a flow to submit the data to the above service created.
6. Add this Section to a flow action and add an activity to the post action to connect to the SOAP service.
7. Run the Flow and Observe the tracer for the XML generated by the stream XML.
8. Open the InvokeAxis2 Activity StepPage and observe the request parameters.
9. We can see that though we do not enter any data for account number, still a tag for the same was generated.


Root Cause



The root cause of this problem is a defect in Pegasystems’ code/rules as Pega checks if property mapped to an optional scalar node/attribute exists in clipboard page and add it to streamed XML if it exists. It does not check what values do the property contain.

Resolution



This issue is resolved by hotfix item HFix-22969. 

After installing the HFix, below steps needs to be performed:

1. Create a DSS(Dynamic System Setting) with the following information : -
Owning Ruleset : Pega-IntegrationEngine 
Purpose : StreamXML/DetectEmptyProperties 
Value : true 


2. After creating the DSS, one among the below two actions to be performed : 
    2.1. XML Stream rules (generated before applying the HFix) should be re-saved.
    2.2. XML Stream rules should be re-generated (using Connector & Metadata Accelerator) 

Published July 16, 2015 - Updated October 8, 2020

Was this useful?

100% 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