Question

1
Replies
955
Views
Sudhanshu Kumar Yadav (SudhanshuY)
Labb Consulting
Lead System Architect
Labb Consulting
NL
SudhanshuY Member since 2013 15 posts
Labb Consulting
Posted: March 20, 2018
Last activity: March 28, 2018
Posted: 20 Mar 2018 12:37 EDT
Last activity: 28 Mar 2018 4:42 EDT
Closed

How Substitution Work for XML Stream Rule

What XSD Contains:



<element name="Position" type="tns:PositionType"/>


<element name="Creation" type="tns:Creation" substitutionGroup="tns:Position"/>


<element name="Change" type="tns:Change" substitutionGroup="tns:Position">




And XSD Defines PositionType as abstract type as below



<complexType name="PositionType" abstract="true">




Now when we are running the wizard, pega is creating below



Position XML stream rule in VDF-Int-COM-PositionType class for element Position with root tag as OrderPosition


Position XML stream rule in VDF-Int-COM-Creation class for element Creation with root tag as Creation


Position XML stream rule in VDF-Int-COM-Change class for element Change with root tag as Change



with Position PageList Type Property created with Page “VDF-Int-COM-PositionType”.


What XSD Contains:

<element name="Position" type="tns:PositionType"/>

<element name="Creation" type="tns:Creation" substitutionGroup="tns:Position"/>

<element name="Change" type="tns:Change" substitutionGroup="tns:Position">

And XSD Defines PositionType as abstract type as below

<complexType name="PositionType" abstract="true">

Now when we are running the wizard, pega is creating below

Position XML stream rule in VDF-Int-COM-PositionType class for element Position with root tag as OrderPosition

Position XML stream rule in VDF-Int-COM-Creation class for element Creation with root tag as Creation

Position XML stream rule in VDF-Int-COM-Change class for element Change with root tag as Change

with Position PageList Type Property created with Page “VDF-Int-COM-PositionType”.

Now when the above XML stream rule is getting referred from Main root XML stream rule as the Position property is of type class VDF-Int-COM-PositionType its referring to the abstract type XML stream rule it means the tag name will be Position but external System is expecting Change as tag name in this case.

Now I have one solution to update the Position property to class VDF-Int-COM-Change and it will start referring the correct XML stream rule. But this will lead to problem when we will import next version of the XSD, pega will again create the property which will start referring again to VDF-Int-COM-PositionType and we need to update it manually again.

​Is the above is Pega recommended way if not how should we configure it?

***Updated by moderator: Lochan to add Categories; add SR details***

Enterprise Application Development Dev/Designer Studio Case Management Data Integration Support Case Exists
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.