Release Notes 9.1.0 “Friendly Iterations”

Jan 23, 2023. Release 9.1.0 essentially simplifies how OpenRules customers may iterate over collections of business objects. In previous releases every iteration required at least two tables, and with Release 9.1.0 one intuitive table is sufficient. For example, previously the following two tables

allowed you to iterate over the array of Employees applying to each Employee the rules EvaluateOneEmployee that labeled the current Employee with Salary >= 120000 as a High-Paid Employee.

Now the same results can be achieved with only one table:

The phrase [for each Employee in Employees] at the end of the decision table first row replaced the first table and made the entire iteration much simpler.

The installation of the release 9.1.0 includes a special sample project “Iterations” that demonstrates different types of iterations.

How to Iterate over All elements of a collection of Employees:

or

How to Lookup for some Employees and Break when at least one such employee is found:

How to deal with Nested Loops to calculate how many employees live at a certain Zip code assuming that employees may live multiple location:

A more complex example described in the standard project “ICD10Challenge” that deals with two nested loops and searches a CSV file. Now it looks much simpler now if you compare it with a previous implementation:

Iterations in OpenRules Diagrams and Debugger

OpenRules Explorer shows the iteration nodes like in this diagram for the project “Iteration”:

Every iteration node is marked by a “loop” and the arrow leading to this node describes the collection it iterates over.

When you debug the iteration process, OpenRules Debugger will show the current elements of the collections over which you iterate:

For example, let’s debug the sample “Iterations”. When you reach the nested loops over Employees and their Locations you may keep clicking on the button “Next Rule” to see the current elements with their indexes: the red circle shows the current Employees[1] and underneath Locations[0] with their attributes.

Other Improvements

Simplified Sorting. Instead of two tables

now you may use only one table

See the example “SortPassengers” in openrules.samples.

Deployment with Azure 4. The standard project “VacationDaysAzure” now works with MS Azure version 4. Note that Azure Functions Core Tools – 2.x should be installed.

Backward compatibility. The old iterations and sorting facilities continue to be supported but we highly recommend to use the latest iteration/sorting mechanisms.

You may install and try the latest release 9.1.0 from here.