In FlexRule, as our business rule and decision management system, we have support for varieties of logic (i.e. procedure, validation, decision, flow, workflow, decision table…).
In version 5, the aim was to make use and integration of them easier. So developers do not need to have different approaches for integration. Also, we’ve had a concept of execution plan, which developers needed to maintain the life-cycle of it. Now in version 5, all of them are simplified.

We have introduced a type called RuntimeEngine which is responsible for all of that, no matter what type of logic (e.g. procedure, validation, decision, flow, workflow, decision table) you have, you just ask RuntimeEngine to get you an instance for execution. And you just need to call Run method on the instance. RuntimeEngine is a single point of integration that lets you simply load a model from different streams and run the logic. RuntimeEngine also lets you load the logic from different types (Spreadsheet, XML…)

Integration is now 2 lines of code, loading a model and calling ‘Run’ method. No need to worry about anything else at all!

Let me show you an example here:

// Get the stream of the model
var stream = File.OpenRead(@"car.insurance.xlsx");

// Get an instance of engine
var engine = RuntimeEngine.FromSpreadSheet(stream, "CalculatePremiums");
// You can get an engine instance by other methods e.g. FromXml or FromRuleSet 

var car = new Car()
{
    ModelYear = 2015,
    Style = CarStyle.Compact,
};

// And run!
engine.Run(car);

 

You can see the full list of changes in ReleaseNote.txt file when you install FlexRule. Feel free to download the new version from http://download.flexrule.com

Last updated September 2nd, 2019 at 01:49 pm, Published March 9th, 2015 at 01:49 pm