- 20 May 2021
- 2 Minutes to read
- Updated on 20 May 2021
- 2 Minutes to read
Interceptor Rules are Rules that catch invalid data in the workflow process. These Rules take place in the process that needs to validate data using the Rule Set Engine. Interceptor Rules save intercepted data to be reviewed and fixed manually or automatically. Fixed Data runs through the Set of Rules and passes to the target system.
Interceptor Rules should be used in the workflow process at the point where live data is present (to know what the data is) and before it is sent to the target systems. At this point in the workflow, the set of Rules should be executed and Interceptor Rules should stop data that may not be handled properly in the target system.
The Interceptor Pattern process implements the technology of Learning Rules. In this process, intercepted data is being analyzed and appropriate handling is being implemented. Then, when the same data validation problem occurs, invalid data is not being intercepted because it is either rerouted to the appropriate workflow branch or fixed with a data transformation automated process and passed to the target system.
This example will evaluate an applicant's submission for pet insurance according to the age and type of the animal that the applicant is applying for.
- In the Designer Project, click CREATE RULE, select Rule Set, and click CREATE. Name the Rule (Pet Insurance) and click CREATE.
- Click SETUP INPUT DATA.
- In the Data Definitions window, add a String [Text] type (Pet Type) and an Int32 [Number] (age) and click CLOSE.
- In the Rule Designer, click Setup. In the Setup Rule Set dialog window, select the Allow Interceptor Rules option under RULE TYPES and click SAVE.
- On the action bar, click ADD RULE and select Intercept. Name the Intercept Rule (Pet Rule) and click CREATE RULE.
- The Interceptor Rule automatically takes the inputs that were configured for the Rule Set. Configure the Rule to evaluate if the Pet Type in the list is not a Dog or Cat. Then, click Save and close the Rule Designer.
- Navigate to the Designer Project, click CREATE FLOW on the Global Action Bar and select Flow. Name the Flow (Pet Rule Flow) and click CREATE.
- Select the Start Step. On the Properties panel under the FLOW INPUTS category, select SHOW EDITOR.
- In the Flow Inputs dialog window, configure an Int32 [Number] (Age) and a String [Text] (Pet Type) as Flow input. Then, click Save and close the window.
- Click the Done path on the Start step. Navigate to Flows, Rules, Forms and Reports > Rules and select the Run Rule Set step. Then, click ADD.
- With the Run Rule Set selected, click PICK from under the RULE SET CONFIGURATION category and select Pet Insurance. Then, click PICK.
- Click Unknown next to the Rule Set Run Name field and select Merge Plain Text. Then click SHOW EDITOR.
- Configure the Editor to display "Age year old Pet Type" and click SAVE.
- Connect the Done path to the End step. Then, click Save to save changes.
- Navigate to the Designer Project. Right-click on the Flow and select Run Flow.
- In the Flow Form, enter "0" for the Age and "Bird" for the Pet Type and click RUN.
- Navigate to the Designer Project. Navigate to Pet Insurance > Rule Set Resultsand notice that a dashboard is available with the collected Intercepted Results and Rule Breaks.The Intercepted Results show recorded data for the information that was just submitted for a 0-year-old Bird and who it was created by. The Rule Breaks show where the Interceptor Rule performed to evaluate a true result since Bird is not In List.