Validation in PolicyCenter
Within PolicyCenter, use the validation rules to identify problems with data that the user must fix before PolicyCenter permits the user to submit the item for further processing. You can use validation rules to do the following:
- Ensure that the user enters data that makes sense
- Ensure that the user enters all necessary data
- Manage relationships between data fields
For example, one validation check verifies that a producer code (501-002554) has at least one role associated with it. If it does not, PolicyCenter displays a warning:
ProducerCode has no roles. A role is required to permit users to be assigned to '501-002554'.
Guidewire makes the following distinction between warnings and errors.
Warning |
Warnings are non-blocking, for information purposes only. The user can ignore (clear) a warning and continue. |
Error |
Errors are blocking. The user cannot ignore or clear an error. The user must fix all errors before continuing. |
Use the reject method—in one of its many forms—to prevent continued processing of the object, and to inform the user of the problem and how to correct it. The following table describes some of the more common forms of the reject method.
Method form |
Description |
|---|---|
|
Indicates a problem and provides an error message, but does not point the user to a specific field. |
|
Indicates a problem with a particular field, provides an error message, and directs the user to the correct field to fix. |
|
Similar to |
The method signature can take one of the following forms:
reject(errorLevel, strErrorReason, warningLevel, strWarningReason)
rejectField(strRelativeFieldPath, errorLevel, strErrorReason, warningLevel, strWarningReason )
rejectFieldWithFlowStep(strRelativeFieldPath, errorLevel, strErrorReason, warningLevel, strWarningReason,
flowStepId)
The following table lists the reject method parameters and describes their use. Issues or problems that the rules identify are either errors (blocking) or warnings (non-blocking). You can indicate a failure as both an error and a warning simultaneously. However, if the failure is both an error and a warning, use different error and warning levels for the failure.
Method parameter |
Description |
|---|---|
|
Corresponding level effected by the validation error. |
|
Job wizard step to
which this error applies, if any. PolicyCenter uses this field only if
validating against the If used, PolicyCenter filters out the validation error unless the user is on that particular wizard step.
|
|
Message to show to the user, indicating the reason for the error. |
|
Relative path from the root entity to the field that failed validation. Using a relative path (as opposed to a full path) sets a link to the problem field from within the message shown to the user. It also identifies the invalid field on-screen. |
|
Message to show within PolicyCenter to indicate the reason for the warning. |
|
Corresponding level effected by the validation warning. |
