- Updated on 05 Mar 2019
- 3 minutes to read
This example demonstrates how to configure an Interceptor Rule. The Interceptor Rule is set up the same way that aRule Set is set up. Additionally, a Rule Set has a setting that allows anInterceptor Rule.
For more information on setting up a Rule Set , navigate to the this link Setting Up a Rule Set
This example starts with a Rule Set created for the purpose of demonstrating how the Interceptor Rule works. TheRule Set example is named "Pet Insurance". ThisRule Set is set up to evaluate the applicant's pet according to the Age and Type of the animal that the applicant is applying for.
The Completed Rule phrase that will be used asInterceptor Data Rule is displayed in the image below.
Setting up the Interceptor Rule Set
Start in a designer Folder, selectCreate Rule>Rule Set and choose Rule Set. In the Rule designer select Set up Rule Set from the Actions Panel located at the bottom of the Rule designer page. In the Setup Rule Set in the Rule Set Data section underInputs add the Inputs (Age, Int32 and Pet Type, String).
Next in the Rule Types section under Interceptor Rules check the box next to Allow Interceptor Rules to turn this Rule type on.
In the Actions Bar located at the bottom of the Rule designer select Add Rule and then chooseIntercept.
The Interceptor Rule is applied to an existingRule Set . Now, edit the Rule Set phrase to evaluate**"Not" (This condition returns the opposite result).** SelectData Element at the top of the Data Element selector and check the box next to "Not [this condition returns the opposite result]".
After you create the rule phrase select configure and add Inputs to the Rule Set. This example shows a Rule Phrase with added Inputs (Dog, Cat). Save and Close the Interceptor Rule.
This completes the Interceptor Rule Set Phrase. The next step is to create a Flow.
Create a Flow using the Interceptor Rule
The example below is a flow built for the purpose of demonstrating how Interceptor Rules are configured and how they work in a flow. As you can see the different steps used in the flow example are listed here.
- Start Step: Located in the Flow designer.
- Run Rule Set (Interceptor Rule): Rules> Run Rule Set Step
Configure The Steps
Select thStart Step and in theFlow Data section under Flow Input Data and select Show Editor to add Input Data. This example uses Pet Type and Age,.
In theRun Rule Set Step choose the Rule Set configured above, choose (Pet Insurance). In theInputs section next to Age chooseSelect From Flow andPick the correctInput
In the Inputs section next to Pet Type choose Select From Flow and Pick the correct Input. Next to Rule Set Run Description choose Null. Next to Rule Set Run Name chooseMerge Plain Text.
In the Merge Text Editor add desired Text. The example states Age (from flow Data) year old Pet Type ( form flow data). Save and exit the Flow to navigate back to the designer folders.
In the designer Folders navigate to the Rule Set Results Folder. This folder is automatically generated and will display under the created Interceptor Rules. In theRule Set Results folder locateRule Breaks. Under Rule Breaks is where theInterceptor Rule will store caught data. Select one of the results to Edit Rule, change the Rule to evaluate True or False. After the Rule has been edited and changed the Rule will be saved with the edits. Save the changes and the flow will finish.
Edit the Rule and add bird to the list of Pet Types to evaluate False. Now the Flow will finish and the Rule will not be caught in Rule Set Results folder.
The Rule has been edited and is now saved with the changes made. The Rule now evaluates False for "bird (Pet Type) is Not in list".
Complete the flow by selecting the Rule Sets Result report in the designer Folder and select a result in the Intercepted data, choose Run Rules and pick from either All Intercepted Data orThis Instance. The Rule will run and if the Rule was edited to evaluate False it will then clear from the results report.
This complete the Interceptor Rule example, for more information on setting up Rule Sets and Interceptor Rules, see attached links.