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

Importing XSD creating duplicate rules

SA-31686

Summary



Import the XSD two times. First times it creates the required rules. Second time it again tries to create new rule instead of overriding the existing rules.


Error Messages



No error messages, just the duplicate classes gets created with number appended to it.


Steps to Reproduce



Steps To Reproduce:
 
  1. Open Connector and Metadata wizard
  2. Import the XSD
  3. Check if gets imported successfully
  4. Again, re-import the same XSD and check it tries to create duplicate rules.
  5. Expectations are it should should override the existing rules.


Root Cause



A defect or configuration issue in the operating environment:

It appeared to be the issue with the XSD as the issue is not reproducible in any other similar environment.


CURRENCY class is getting duplicated because in new XSD, derives from class is different than in the old XSD.

Non working class example: CURRENCY

CURRENCY definition is as follows,

acord-pcs-v1_27_0-nodoc-nocodes.xsd:

<xsd:complexType name="CURRENCY">
<xsd:complexContent>
<xsd:extension base="CURRENCY_NoID">
<xsd:attribute name="id" type="ID"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>

Here CURRENCY is derived from CURRENCY_NoID

pega_bre_hanover_acord_extension_MOD.xsd:

<xsd:complexType name="CURRENCY">
<xsd:complexContent>
<xsd:extension base="CURRENCY">
<xsd:attribute name="PreviousValue" type="xsd:string"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>

Here CURRENCY is derived from CURRENCY.

As derives from class is different, a new class with CURRENCY2 is getting created.

Working class example: C-10

C-10 definition is as follows,

acord-pcs-v1_27_0-nodoc-nocodes.xsd:

<xsd:complexType name="C-10">
<xsd:simpleContent>
<xsd:extension base="C-10_NoID">
<xsd:attribute name="id" type="ID"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>

Here C-10 is derived from C-10_NoID

pega_bre_hanover_acord_extension_MOD.xsd:

<xsd:complexType name="C-10">
<xsd:simpleContent>
<xsd:extension base="C-10_NoID">
<xsd:attribute name="PreviousValue" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>

Here C-10 is derived from C-10_NoID

As derives from class is same (C-10_NoID) in both XSDs, duplicate class is not getting created.

 

Resolution



Perform the following local-change:

The solution for this problem is to use the same derive from class as that it is used in the original XSD, in this case CURRENCY_NoID. Using the same derive from class in the new XSD have resolved the issue.
 
Suggest Edit

Published December 24, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

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

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