You can create a property rule that overrides an existing property rule (one with the same name and the same or subclass Applies To key part) that is in a lower version of the ruleset or in a ruleset and version that is lower on your ruleset list. However, Pega Platform restricts the Type values for the new property.
Allowed property type changes
The following table shows which property type changes are allowed. These changes are allowed because they do not result in data loss. For example, if a database expects a decimal for a given field and Pega Platform provides an integer, the data is safe. However, if a database expects a decimal and the system provides a Boolean, data is lost.
|To type||Date Time||Date||Time of day||Integer||Decimal||Double||True or false||Text|
|Time of day||✔|
|True or false||✔|
For example, if the original property has a type of DateTime, you cannot override it with a new property that has a type of Double. If you try, an error message similar to the following is displayed:"Definition required to conform to Cahaba-Work-CPM-Claims.Prop1 instance created 20050831T162223.149 GMT."
In this case, you can override the DateTime property in a higher ruleset version with a type of Date or TimeOfDay. Similarly, you can “specialize” a property of type Text.
It is a best practice to make such overrides when no work objects or other saved instances have a value for the property.
You can use two methods to change the property type. To avoid validation issues and other processing errors, only override properties that are not yet saved in work objects.
Method 1: Delete and recreate the property using the new property type
If the field you want to change does not exist on production, you can delete the property rule in every system (such as application, testing, and production) and then recreate the property using the correct type.
For example, assume that you created a property named Prop1 with the type Integer in the 01-01-01 ruleset version, locked the version and continued development in 01-01-02. You now realize you need to change the type of Prop1 from Integer to Text. If you change the property and attempt to resave into 01-01-02 with the new type a general error occurs:
Definition required to conform to Cahaba-Work-CPM-Claims.Prop1 instance created 20050831T162223.149 GMT
In this case, you can delete Prop1 and recreate it using Text as its property type.
- User input on an HTML form is placed on the clipboard.
- The Page-Validate method is applied to a page containing the property, or to the property if it has mode Page.
- An Edit Input rule and Property-Validate method is applied to the property.
Method 2: Create a new property and block the old one
You can create a new property with a different name and use it going forward. Copy
the old property with an availability setting of Blocked in a
new ruleset version to prevent further use of it.