Validating Address Records
To verify that a set of address records are valid for postal delivery, add an address validation mapplet to the action in a rule statement. Link the rule statement to another rule statement that analyzes the mapplet output.
For example, you might select a mapplet that returns a delivery status code for each address in a data set. Configure a condition to verify that the address data column is not null. Configure an action to apply the mapplet to the data. Configure an additional rule statement to evaluate the status codes that the mapplet generates.
To identify the mapplet to use, discuss the business rule requirements with a Developer tool user.
1. Select a rule set in a rule specification.
2. In the rule set properties, click Rule Logic.
3. Click Add Rule Statement.
4. Select an input for the rule statement.
- - If the rule specification does not contain an input that you can use, create an input. Configure the input properties to represent a line of address data. Set a maximum length for the input that can accommodate the address line.
5. Select an operator to validate the results of the condition analysis.
6. Select the type of action to apply to the data that satisfies the condition logic.
- - To use a mapplet, select the following action type:
function
7. Configure the action to apply the mapplet to the input data.
- - Open the Define Action dialog box.
- - Select Rules, and then select Rule.
- - Browse to the address validation mapplet.
- - Connect the address line data input to the mapplet. Optionally, connect other rule specification inputs to the mapplet. You can also enter a constant value as a mapplet input.
- - Select a mapplet output as the result of the action. For example, select the status code data that the business rule specifies.
- - Click OK.
Note: The mapplet that you select can run with a single input. If you do not connect an input on the mapplet, the input uses null data. The mapplet might contain multiple outputs. You select a single output as the result of the action. The mapplet does not generate data on the outputs that you do not select. Ask the mapplet developer to identify the inputs and the outputs on the mapplet.
8. Select Add Rule Statement Using Result from the rule statement menu. The Analyst tool adds a rule statement under the current rule statement.
The output from the current rule statement becomes the input to the second rule statement. An arrow connects the rule statements, and the rule statements use the same identifier.
9. Select an operator to validate the results of the condition analysis.
- - To specify that the input data must match the data that you enter, select the following operator:
is
10. Select an operator to validate the results of the condition analysis.
- - To compare the result of the previous rule statement to a list of status codes, select the following operator:
is within
11. Select the type of condition to apply to the input.
- - To specify a list of values, select the following operator:
function
12. Configure the condition to compare the mapplet output to a range of status codes. The status code uses an alphabetic character to indicate the type of validation that the mapplet performed. The code uses a digit to indicate the accuracy of the address.
13. Select the type of action to apply to the data that satisfies the condition logic in both rule statements.
- - To return a string value, select the following action type:
string value
14. Enter the value that the action returns. For example, enter VALID_ADDRESS.
15. Save the rule specification.