Rule Specification Process Flow
The steps to create and use a rule specification begin when you select a business rule to apply to the business data. The steps end when you analyze the data results and verify that the business data conforms to the business rule. When you perform the steps, you consult with other data owners in the organization.
To create and use a rule specification, perform the following tasks:
- 1. Select a business rule to convert to a rule specification.
- 2. Analyze the business rule and identify the data requirements that it defines.
- 3. Discuss the data requirements with the Developer tool user who will run a mapping on the data.
- 4. Configure the rule specification.
- - When you configure the rule specification, you also validate and test the rule specification.
- 5. Compile the rule specification.
- - When you compile the rule specification, you create a mapplet in the Model repository. The Developer tool user adds the mapplet to a mapping. The Developer tool user returns the mapping results to you.
- 6. Review the mapping results.
Preparing to Configure the Rule Specification
A rule specification represents the data requirements of a business rule. When you create a rule specification, you must understand the business rule.
Before you create a rule specification, discuss the business rules with other data owners in the organization. Verify that the business rule is valid and ready to apply to the business data.
1. Identify the business rule to represent in a rule specification.
2. Identify the business data set to validate.
3. List the business rule requirements that apply to the data. Verify that you can create a rule statement for each requirement.
- - Identify any business requirement that needs more than one rule statement in the rule specification. If one rule statement provides the input to another rule statement, you might decide to add the rule statements to rule sets at different levels.
4. Identify the data columns that the business requirements apply to. Verify that you can create a rule set input for each column.
- - If the same business requirement applies to multiple columns, you might decide to add inputs for the columns to parallel rule sets in the rule specification.
- - If multiple business requirements apply to a single column, review the business rule. You might need to simplify the business rule. A business rule establishes a single fact about each
Note: When you plan the design of a rule specification, you identify the lowest dependencies in the business rule and ensure that you add a rule set for each dependency. A rule set generates a single output, and the output from a dependent rule set becomes an input to the rule set above it in the workspace.
Contacting an Informatica Developer
When you compile a rule specification, you create a mapplet object that other users can work on. A Developer tool user adds the mapplet to a mapping and runs the mapping on the business data. contact the Developer tool user.
Before you design and compile a rule specification, verify the following items with the Developer tool user:
1. Verify the data sets that must conform to the requirements of the rule specification and the corresponding business rule.
The Developer tool user runs the mapping on each data set.
2. Verify the data types of the data columns that you want to analyze.
You identify the data types when you create data inputs in the rule specification.
3. Verify the steps to follow after each mapping runs.
The Developer tool user provides you with the results of each mapping.
can determine if the data sets meet the business rule requirements. You can also determine if you need to update the rule specification and compile the mapplet again.
Configuring the Rule Specification
After you analyze the business requirements and the business data, you can configure the rule specification.
To configure the rule specification, perform the following tasks:
1. Select Rule Specification from the New menu.
2. Enter a name for the rule specification.
3. Optionally, enter a description.
Tip: Enter the business rule as the description.
4. Select a location for the rule specification.
The Location field specifies a project in the Model repository.
5. Save the rule specification.
The rule specification opens in the Design workspace.
6. Verify the general properties.
- - Select the top-level icon in the rule, and select Rule Properties.
- - Verify that the settings are correct for the data inputs that you create.
7. Configure a rule statement in the primary rule set.
The primary rule set defines the data output from the rule specification.
8. Optionally, update the primary rule set name.
- - Select the primary rule set, and select General.
- - Update the rule set name.
9. Add any rule set that the rule specification requires.
You add a rule set below another rule set.
10. Add one or more inputs to each rule set.
- - Select the top-level icon in the rule, and select Inputs.
- - Enter an input name, and verify the input properties.
11. Add any rule statement that the rule specification requires.
You can add a rule statement to the primary rule set or to another rule set.
12. Save the rule specification.
After you configure the rule specification, test the rule specification with sample data.
After you test the rule, compile the rule to create a mapplet in the Model repository.
Validating a Rule Specification
Before you compile a rule specification, validate the rule logic. The rule logic is valid when each rule set can calculate the data outputs for each rule statement.
1. Open the rule specification.
2. Click Validate.
The rule specification highlights any rule set that is not valid. Click a rule set to read a message that describes the validation error.
Testing a Rule Specification
Test a rule specification to verify the logic that you defined in the rule specification. If possible, use business data to test the rule specification. You can test the logic in the rule specification and in the rule sets.
1. Open the rule specification.
2. Select the top-level icon in the rule specification.
3. In the rule specification properties, click Test.
The properties view displays the input columns that you configured in the rule specification.
Note: The properties view does not display the rule set outputs.
4. Enter one or more data values in an input column. You can enter data values for any rule set in the rule specification.
If you enter date data in an input column, use one of the following date formats:
- - yyyy-MM-dd
- - yyyy-MM-dd hh:mm:ss
- - yyyy-MM-dd hh:mm:ss.SSS
5. Click Test Rule.
The properties view displays the path of the data values through the rule specification.
6. Verify that the rule sets read the data values and write the outputs that you expect.
- - If you expect a data value from a low-level rule set to generate outputs on multiple rule sets, verify that the test results indicate a data value on each rule set.
- - If a data value does not generate an output on a rule set, the test results show an empty field for the rule set.
Compiling a Rule Specification
Compile a rule specification to create a mapplet object in the Model repository. The mapplet is a copy of the rule specification that a Developer tool user can connect to a data set and add to a mapping. Compile a rule specification after you validate and test the rule specification.
1. Open the rule specification.
2. Click Compile.
The Analyst tool creates a mapping in the Model repository.
If you update a rule specification that you compiled, compile the rule specification again to update the mapplet in the Model repository.