I am reading data from a data table and I need to apply the Business Rules listed below to filter out the data. I do not want to hard code the rules in an “IF statement” since the rules may change or additional rules could be added. The Keys fields for the rules are Rule#/Vendor Id.
How can I store the rules in Excel or Data Table and then perform a lookup to validate against the inbound data.
If Rule# is equal to 1933 and Vendor ID is equal to 417381 or 8324 perform next step.
If Rule# is equal to 1973 and Vendor ID is equal to 417381 or 8324 perform next step.
If Rule# is equal to 1947, Vendor ID is equal to 417381 or 8324, and Penalty Due is greater than $500 perform next step.
If Rule# is equal to 1947, Vendor ID is equal to 4037, Penalty Due is greater than $500, and SCAC Code is equal to 824456, 800764, 824538, 800759, 852594, 816811, 914836, 857316 or 833326 perform next step.
Interesting use case here. Thanks for posting. This is a could be done using a Switch activity. See below Example. The Conditional values would be stored in the config file where they could be updated. I would suggest your config file be store outside the process for this project if you will need to update these rules frequently.
Thanks for the reply. My goal is to be able use variable to store the value of the Business Rules, then filter the data table based on value of the variables.