How an entity triggers Validation rules

For an entity to trigger the validation rules, it must implement the Validatable delegate. This is true for an entity in the base PolicyCenter configuration or for a custom entity that you create.

PolicyCenter executes rule-based validation automatically any time that there is a bundle commit (to the database) with a direct or indirect change to a validatable entity. For example, if a user saves a newly created or modified activity (one of the validatable entities), PolicyCenter runs the Activity validation rule set. If there are any errors, the commit fails and PolicyCenter displays error messages to the user.

PolicyCenter executes the validation rules on indirect changes based on the Boolean attribute triggersValidation on foreign keys and arrays defined in a validatable entity’s metadata definition file. For example, in the base configuration, Guidewire defines the Assignment array off the Account entity as triggering validation. Any change to the Assignment array causes PolicyCenter to execute the Account validation rules during a bundle commit to the database.