The data types configuration file

Important: If you make changes to the datatypes.xml file, you must increment the version number in extensions.properties.

PolicyCenter lets you modify certain attributes on a subset of the base configuration data types by using the datatypes.xml configuration file. You can access this file in Guidewire Studio™ from configuration > config > fieldvalidators. You can modify the values of certain attributes in this file to customize how these data types work in PolicyCenter.

This datatypes.xml file contains the following elements:

XML element

Description

<DataTypes>

Top XML element for the datatypes.xml file.

<...DataType>

Subelement that defines a specific customizable data type (for example, PhoneDataType, YearDataType, MoneyDataType) and assigns one or more default values to each one.

Warning: Modify the datatypes.xml file with caution. If you modify the file incorrectly, you can invalidate your PolicyCenter installation.

<...DataType>

The <...DataType> element is the basic element of the datatypes.xml file. It assigns default values to base configuration data types that you can customize. This element starts with the specific data type name. For example, the element for the PercentageDec data type in the datatypes.xml file is <PercentageDecDataType>.

The <...DataType> element has the following attributes:

Attribute

Description

length

Assigns the maximum character length of the data type.

validator

Binds the data type to a given validator definition. It must match the name attribute of the validator definition.

precision

scale

Used for DECIMAL types only.

  • precision is the total number of digits in the number.
  • scale is the number of digits to the right of the decimal point. The default value is 2.

The value of scale must be less than the value of precision.

For more information, see The Precision and Scale attributes.

appscale

Optional attribute for use with money data types.

For more information, see The Money data type.

Deploying modifications to the data types configuration file

If you change the datatypes.xml file, then you need to deploy those changes to the application server. Most modifications to the datatypes.xml file take effect the next time the server reboots.

  • PolicyCenter reloads the validator attribute for data type definitions upon server reboot. This is so that you can rebind different validators to data types.
  • PolicyCenter does not reload other data type attributes such as length, precision, and scale. This is because PolicyCenter applies these attributes only during the initial server boot. (It uses them during table creation in the database.) PolicyCenter ignores any changes to these attributes unless something triggers a database upgrade. For example, if you modify a base entity, then PolicyCenter triggers a database upgrade at the next server restart.

Recommendations for modifying data types

Guidewire recommends the following:

  • Make modifications to the data types before creating the PolicyCenter database for the first time.
  • Make modifications to the data types before performing a database upgrade that creates a new extension column.

PolicyCenter looks at the data type definitions only at the time it creates a database column. Thus, it ignores any changes after that point. However, any differences between the type definition and the actual database column can cause upgrade errors or failure warnings. Therefore, Guidewire recommends that you exercise extreme caution in making changes to type definitions.