About Interceptor Rules
- Updated on 07 Oct 2019
- 1 minute to read
Interceptor Rules are Rules that catch invalid data in business workflow process. These Rules take place in the process that needs to validate Data using Rule Set Engine.
If think about the data going through the Rule Engine, there are two natural interactions:
- To ‘Stop’ Data from going through.
- To record the fact that Data was passed for later analysis and Rules.
Write a Rule that intercepts the Data, a User can be directed to review and write a Rule based on the Data. An example of this might be getting messages where an account ID is not found. The account ID might not be found based on a different schema or structure of the ID. The Rules could be used to ‘intercept’ these. Additional Rules could be used to correct this data or provide additional User interaction.
By definition, Interceptor Rules are less defined by the ‘Rule’ and more by the ‘point that a Set of Rules are executed’. The nature of an Interceptor Rule Set is that Rules should evolve based on additional data as they are used. While a Set might start off with a Set of very basic Rules, as additional details are discovered about the interaction, more Rules are added.
Interceptor Rules should be used in the workflow process at the point where live data is present (so we know what the data is) and before it is sent to the target Systems. At this point in the workflow Set of Rules should be executed and Interceptor Rules should Stop data that may not be handled properly in the target System.
Interceptor Rules save intercepted Data. Then, this Data may be reviewed and fixed manually or automatically. Fixed Data runs through the Set of Rules and passes to the target System.
Interceptor Pattern process implements 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 appropriate workflow branch or fixed with Data Transformation automated process and passed to the target System.