Interceptor RuleLast Updated: 07/15/2016 Introduced in Verision: 2.0
Interceptor Rule is a step that behaves like an Assigned Form. With this step user can review or manually edit current Data in the Flow. Moreover, user can apply custom Rules to data or Automate data processing.
In this example we will show a simple College Application process where Interceptor Rule is applicable.
Note: Interceptor Rules Module should be installed. Navigate to System > Administration > Modules, locate Interceptor Rules, right-click it and select Install Module.
Note: to install Module in Decisions 3.5 or newer, please read the following document.
Notification pops up informing that Service Host Manager has to be restarted. Restart SHM.
Next, for our example we created a Simple Flow Structure that looks as following…
Navigate to Designer Folder and click Create Flow from Folder Actions Panel.
In the resulting window we Name our Flow and click Create to proceed to the Flow Designer.
In the Flow Designer we select Start Step on the workspace and Information Layer pops up. We click Add New link to add an Input to the Flow.
We Name our data input and define CollegeApplication as its type. Click Ok to save and continue.
When our Flow Input is defined, we can click Add Step button to start building our Flow.
First, we add Interceptor Rule step from the Flows, Rules, Forms and Reports > Rules category.
Next, we start setting this step up. This step has a behavior that is similar to the Assigned Form. Therefore, we need to pick an assignee for it. Click  Assignment.
In the resulting pop-up window in the Assign > Assign To Users section we click Add New.
Then, we pick a User and click Ok. This User will make decisions about College Application data.
Next, in the Interceptor Information section of Interceptor Rule step configurations we define Data Paths from our Step. On the Save Data Paths data will be recorded in the Interceptor Rule Data Folder.
This completes Interceptor Rule configurations. Then we add End Step from the Flow Management category in the Toolbox.
We name one End Step in our Flow ‘Reject’ and second End Step ‘Approve’.
Next, we connect Reject outcome from Interceptor Rule step to the Reject End Step and Approve outcome to the Approve End Step.
On the Need Info outcome from the Interceptor Rule step we add Show Form step from the Favorite Steps category.
In the resulting pop-up window we Name the Form and click Create to proceed to the Form Designer. This Form can be assigned to the Applicant and the assignment could be created if Interceptor assignee decides that Application data does not meet requirements and should be edited by the Applicant.
In this example we add to the Form Button component from Actions category for Applicant to be able to submit the Form back to Interceptor. Additionally, we add Data Grid component from List category. This component will display CollegeApplication data with Inline Edit Grid Mode. When we finish designing this Form, we can save and close Form Designer.
Back in the Flow Designer we configure Assign To Applicant Form step in the following manner… For application input to the Grid Component we Build Array and for the Item0 in the Array we Select Value of CollegeApplication. Next, for the EditedApplication Output from the Form we select First Item in Array and Change Value of CollegeApplication. In this way our Interceptor will receive an updated version of Application.
Then, we connect Done outcome from the Assign To Applicant Form step back to the Interceptor Rule step in our Flow.
On the Review outcome from the Interceptor Rule step we add another Show Form step from Favorite Steps category.
Name the Form and click Create to continue. This Form could be assigned to final Approver in this process.
In the Form Designer we add Data Grid component from the List category. We configure this Data Grid to display CollegeApplication type with Info Only Grid Mode.
Additionally, we add Rich Textbox component from Data category for the Approver to be able to add comments explaining why does he or she Rejected the Application. Next, we add two Button components for the Approver to either Reject Application or Approve it. When finished, we save the Form and close Form Designer.
Back in the Flow Designer we configure Reject Form step. Locate Inputs section and Build Array for the application Input. Then, for the Item0 in the Array we Select CollegeApplication Value.
Connect Reject outcome from the Review form step to the Reject End Step and Approve outcome to the Approve End Step. This completes our Flow. We can save it and close Flow Designer.
In our Designer Folder System generates a Folder for the Interceptor Rule. We navigate to this Folder.
In this Folder we can create additional Rules for Interceptor Rule or Edit Defaults. Moreover, all Interceptor Data is being Saved in this Folder. Navigate back to the Designer Folder.
Locate thumbnail for the Flow that we created previously in this tutorial and click Run Flow from thumbnail Action menu.
In the Flow Input Data pop-up window we click ellipses for CollegeAppplication input data.
Then, we fill in all College Application fields and click Ok.
Back in the Add Flow Data pop-up window we click Run.
Notification pops-up and message informs us that InterceptorRuleForm was assigned to us. We confirm that we would like to fill in assigned Form by clicking Yes button.
Then, Application opens and we can verify all fields. Because our Applicant used wrong Date Of Birth we click Need More Info Action button to send this Application back to the Applicant for editing.
Assign To Applicant Form opens and Data Grid component displays College Application with the ability to Inline Editing. Applicant edits DOB field and clicks Done to send Edited Application back to the Interceptor Rule.
New InterceptorRuleForm is being assigned to us. We confirm to fill in the form.
This time we verify that Date Of Birth was edited by the Applicant and we can send this Application to the main Approver by clicking Review.
Review Form opens and Application is being displayed on the Data Grid component with Info Only Mode. We click Approve.
Mention, that when Interceptor Rule Form opens there is Automate button in the top right corner. Click it to inspect available options.
In the Automate resulting window we are able to create Rules for each field in the Application inline. In this example we created a Rule that checks if DOB field is null. Then, for the Income field we click is Verb on the Default Rule and change it to Less Than verb from the pop-up window.
Then, we click [null] Rule Input and define Constant value. This creates a Rule that checks if Income field in the Application is less than 5000.
Next, on the right-hand side we Name our Rule and pick desirable Rule Type (in this case we pick Exit On Path option).
Finally, we provide Path Name and click Save.
Another feature of Interceptor Rule Form is that we can Edit or Map data inline.
If we check Interceptor Rule Data Folder we can see that our Rule is saved into the Folder with every Interceptor Rule Execution.