Rule Dialog

The Rule dialog enables you to add a new business rule or maintain an existing rule. A business rule is a reusable object that specifies a DataFlux expression. The expression evaluates the values in one or more table fields. Events can be triggered based on the results that are returned by the rule. A business rule can be used in one or more profiles or data jobs. For more information about creating rules, see Creating a Rule that Compares Two Fields.

Name - Specifies the name of the rule.

Rule label - Specifies descriptive text for the rule. Some interfaces, such as the Monitor Viewer that is available from the Information riser, display the label as well as the name. The label might be easier to understand than the name alone.

User name - Specifies the login of the person who created the rule.

Description - Specifies more descriptive text for the rule.

The Type section enables you to specify the current rule as one of the following types:

Row - A row rule checks every row in a table to see whether one or more fields meet certain criteria. For example, a row rule might check every row in a table for a null value in a certain field. The rule would return the number of rows where the field contained a null value. The check in a row rule is a DataFlux expression. A row rule is the only type of rule that can be used in a profile.

Set - A set rule checks all values in one or more fields to see if the values meet certain criteria. For example, a set rule might check to see if the sum of all values in a field is greater than 1000. The check in a set rule can be a standard metric or a custom metric (a user-defined DataFlux expression). A set rule cannot be used in a profile, but it can be associated with a task, and the task can be called from a Data Monitoring node in a data job.

Group - A group rule checks a group of related values in a field. To specify a group of related values, click Group By and select one of the generic fields that have been defined in the Business Rules Manager. For example, if you were to select a generic field named State, the rule would be applied to groups of values from the same state. The check in a group rule can be a standard metric or a custom metric. A group rule cannot be used in a profile, but it can be associated with a task, and the task can be called from a Data Monitoring node in a data job.

The Definition section includes the following panes:

Checks - Enables you to add and maintain checks, which are expressions that specify generic fields that have been defined in the Business Rules Manager. If any checks have been defined for the current rule, they appear in the Checks pane. To add or edit a check for the current rule, click Builder to display the Expression Builder.

Expression - Enables you to view or update the expression that underlies any checks that have been specified for the current rule.

Click Fields to see a list of the generic fields that have been defined in the Business Rules Manager. Click the icons at right to toggle between a list of individual fields and a list of folders that contain sets of fields. Use the arrow at right to move a selected field to the Expression pane. If the current rule is Set rule or a Group rule (as selected above), DataFlux Standard and Historical metrics are available for each field. Metrics in the Standard folder evaluate the current run of a Data Monitoring node. Metrics in the Historical folder evaluate the previous run of a Data Monitoring node. These two kinds of metrics could be used to compare the current value and the previous (historical) value of a field.

Click Function to see a list of the available DataFlux functions. Select a function to see a brief description of that function. Use the arrow at right to move a selected function to the Expression pane.

Click Clear to delete the expression for the current rule. Click Validate to validate the expression.

Fields - Enables you to view a list of the generic fields (field aliases)that are used in the current rule. Fields used in an expression are added automatically. You can manually add other fields that will make output from this rule more meaningful. For example, suppose that you create a rule that checks for null values in a generic State field. In addition to the State field which is added automatically, you could manually add a generic field Primary Key to the Fields tab for the rule. Later, when you specify a task for the rule, you can specify that every time the rule is violated, a message is written to the repository. You could specify that the message would include the State value and the Primary Key value of the row where the violation occurred.

Custom Metrics - Enables you to view or update the inputs and outputs for any custom metric that is associated with the current rule.