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

xsd:integer field creates Integer property with max value

SA-1964

Summary



The WSDL specification of xsd:integer is creating a property of datatype integer which has a limit of 2147483647.
However, xsd:integer is defined as allowing an arbitrary number of digits based on the xsd:totalDigits attribute.

1. What’s the expected behaviour with xsd:integer? What properties should it create?
2. How to handle with the already generated properties (of which a lot are already on production). For example, the ArrangementNumber property has already been created 13 times as part of different services.
Possible options listed in email note 8.


Error Messages



2014-07-09 18:03:31,482 [ WebContainer : 8] [TABTHREAD0] [ Financing:02.01.01] ( internal.mgmt.Executable) ERROR ast01lsrv4638.linux.rabobank.nl|10.237.134.77 mveger - Exception
com.pega.pegarules.pub.PRRuntimeException: PRRuntimeException
(..)
Caused by:
java.lang.NumberFormatException: For input string: "3356925040"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:59)
at java.lang.Integer.parseInt(Integer.java:472)
at java.lang.Integer.parseInt(Integer.java:510)
at com.pega.pegarules.priv.FUAUtil.intValue(FUAUtil.java:638)
at com.pegarules.generated.model.ra_model_getloanrequest_8dade86bff1629ba28127ab7c0dfc636.updatePage_4(ra_model_getloanrequest_8dade86bff1629ba28127ab7c0dfc636.java:319)
at com.pegarules.generated.model.ra_model_getloanrequest_8dade86bff1629ba28127ab7c0dfc636.updatePage_3(ra_model_getloanrequest_8dade86bff1629ba28127ab7c0dfc636.java:306)
at com.pegarules.generated.model.ra_model_getloanrequest_8dade86bff1629ba28127ab7c0dfc636.updatePage_1(ra_model_getloanrequest_8dade86bff1629ba28127ab7c0dfc636.java:141)
at com.pegarules.generated.model.ra_model_getloanrequest_8dade86bff1629ba28127ab7c0dfc636.perform(ra_model_getloanrequest_8dade86bff1629ba28127ab7c0dfc636.java:66)
at com.pega.pegarules.session.internal.mgmt.Executable.applyModel(Executable.java:4156)
... 102 more


Steps to Reproduce



Create an xsd with this field in it. Then run the Metadata Integration accelerator and generate the data class and properties. Try to set the property to 2147483648.

<xsd:element name="ArrangementNumber">
<xsd:annotation>
<xsd:documentation>Unique identification of the arrangement in the
product administration</xsd:documentation>
</xsd:annotation>
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:totalDigits value="10"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>


Root Cause



Basically PRPC maps XSD:integer to Java int in the Accelerator as per the documentation (https://pdn.pega.com/integration/support-play-how-to-verify-and-troubleshoot-rules-created-from-xsd-or-wsdl-by-accelerators#builtins). In Java the int data type is a 32-bit signed two's complement integer, which has a minimum value of -231 and a maximum value of 231-1. This is to support the implementation within the Java programming language.
 
To enable PRPC to work with xsd:integer values greater than the Java int imp 32-bit signed, the property will need to be customized to be of a different type e.g. double


Resolution



To enable PRPC to work with xsd:integer values greater than the Java int imp 32-bit signed, the property will need to be customized to be of a different type e.g. double. 
This change can be managed locally e.g.

- Change the xsd schema to contain the element type as double or long and run the connector and metadata wizard/XSD wizard 


<xs:element name="test" type="xs:decimal"/>

<xs:element name="test" type="xs:long"/>


- This change DOES NOT need to be made at the service but can rather be made in a local copy of the XSD and uploaded to the wizard from a local file location.

- When re-importing, select a new ruleset version, in that way the parse rules and stream rules would get generated and only the extra / modified properties which differ in the new schema be added.

Using this approach the parserule would refer the properties in the lower ruleset along with the new one which just got created.

  
For already generated properties, you can try  Creating  a property on a higher Int- class that is of type Decimal or Text and then withdraw the ones in specialization classes.





 
Suggest Edit

Published January 31, 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