ITA Business Rules Admin v1.01 has been released, and it comes with some cool features:
1. You can now register your rules to run in Pre-Validation, in Pre-Operation, or in Post-Operation
Why is this important? Those stages correspond to the plugin execution stages, and, depending on what happens behind the scene, Post-Operation data may be different from what initially comes in.
Another advantage is that Post-Operation data has already been stored in the database, so you can use it in the queries (of course this would often be handled by utilizing Pre/Post Images, but ITA Business Rules are relying on the queries for now)
2. You can chain multiple queries together and feed the output of the previous query into the next one
Notice how FetchXML used in the second query is getting parameterized with the output of the first:
The order of query execution is controlled by the “Query Order” parameter of each query (yes, it may make sense to make it a bit more user-friendly in the future)
3. You have control over what happens for each query
- Error When Empty: the rule will fail with the query-specific error message when that query produces no results
- Error When Not Empty: the rule will fail with the query-specific error message when that query produces some results
- Success When Empty: the rule will succeed when that query produces no results
- Success When Not Empty: the rule will succeed when that query produces some results
4. You can also enable/disable debugging errors
When the setting above is “Off”, FetchXml syntax errors will be hidden, and, when/if they occur, the rule will silently ignore them and it will not present any validation errors