1.3.2.1 Business Rules Check

The Business Rules Check processor enables users to check data against a set of business rules, which can be defined and maintained outside of EDQ. Validation errors can be output for each record checked.

The Business Rules Check processor is used to apply potentially complex validation rules to data in a single processor. The business rules can be defined in reference data or in an external file, allowing the rules to be maintained externally to EDQ.

The following tables describe the configuration options:

Configuration Description

Inputs

The processor accepts:

  • A set of attributes of any type to be validated by the processor, and

  • A single attribute containing an array of rule IDs to be applied to the attributes. If this array is not supplied, all the rules in the rules document will be applied to the reference data.

See Defining Business Rules for information on how to define business rules.

Options

Specify the following options:

  • Configuration Source: specifies the type of the configuration source. Valid values are Reference Data or XLS File. Default value: XLS File.

  • File Name: (only available when XLS File is in use) specifies the file which contains the business rule configuration. Default value: None.

  • Rules: (only available when Reference Data is in use) specifies the reference data containing the Rules configuration for the processor. Default value: None.

  • Conditions: (only available when Reference Data is in use) specifies the reference data containing the Conditions configuration for the processor. Default value: None.

  • Checks: (only available when Reference Data is in use) specifies the reference data containing the Checks configuration for the processor. Default value: None.

If an Excel file is used to define the business rules, it must be placed in the [Install Path]/oedq_local_home/businessrules directory, where [Install Path] represents the root of the EDQ installation, and must conform to the format specified in the Defining Business Rules topic.

Specifying Identifiers

Identifiers are used to map the input attributes of the Business Rules Check processor onto the attribute tags referenced in the business rules document. The mappings between identifiers and attributes are defined on the Identify tab of the Business Rules Check processor dialog.

For each identifier, select the appropriate input attribute from the drop-down on the right.

  • If an identifier which has no mapped input attribute is used in a rule, that rule will be ignored.

  • If an identifier with no mapped input attribute is used in a condition, the condition is assumed to evaluate to TRUE.

Note:

Unmapped identifiers are treated differently by the Business Rules Check processor, depending on the context.

Configuration Description

Outputs

Describes any data attribute or flag attribute outputs.

Data Attributes

The following data attributes are output:

  • ErrorCodes: stores the error codes generated by validating the record. Possible value is an array of the error codes associated with the business rules which failed for the record. The error codes are defined as part of the business rule configuration.

  • ErrorSeverities: stores the severities of the errors generated by validating the record. Possible value is an array of the error severities associated with the business rules which failed for the record. The error codes are defined as part of the business rule configuration.

  • ErrorMessages: stores the error messages generated by validating the record. Possible value is an array of the error messages associated with the business rules which failed for the record. The error codes are defined as part of the business rule configuration.

Flags

The following flags are output:

  • RulePass: indicates whether or not the record passed all of the validation rules. Possible values are Y or N.

  • RuleFailures: indicates the number of rules that failed for the record. Possible values: integer.

  • RuleFailureIDs: indicates, by ID, the rules which failed for the record. Possible value is an array of rule IDs corresponding to the rules which failed for the record.

  • RuleFailureLabels: indicates, by label, the rules which failed for the record. Possible value is an array of rule labels corresponding to the rules which failed for the record.

  • AttributeNames: indicates, by name, the attributes which caused validation to fail for the record. Possible value is an array of attribute names which caused the rules to fail for the record.

This processor always appears with a re-run marker, indicating that it will be completely re-executed each time the process is run, regardless of whether or not its configuration has changed. This will also mean that processors that are downstream of the processor will need to be rerun. This is because there may be changes made outside of the EDQ application that could lead to different results on subsequent executions.

The following table describes the statistics produced by the profiler:

Statistic Description

Pass

The number of records which passed the logic check.

Fail

The number of records which failed the logic check.

Output Filters

The following output filters are available from a Logic Check:

  • Records which passed the business rule check

  • Records which failed the business rule check

Example

In this example, the user wants to use an Excel file called contactDetailsCheck.xls to validate some of the contact details in their customer data. This file contains rules which check that:

  • The surname field contains some data;

  • The surname contains only letters;

  • That at least one of Town and County is specified in the address;

  • That the postcode is valid;

  • That the telephone number is valid.

The summary data:

Pass Fail

11211

1045

A drill down on records failing the check shows how those records break the rules, and displays the error codes, severities, and error messages defined as part of the business rules configuration.