To create and run a rule engine for .NET object, you create the engine object, build the working memory, set the parameters, and execute.
The following example shows you how to create and execute a rule engine.
To create and execute a rule engine for .NET object:
Here is the entire code sample.
RuleFlowEngine engine = engineDefinition.CreateEngine();
ICollection<Object> wm = new List<Object>();
wm.Add( myObject1 );
...
wm.Add( myObjectN);
EngineInput input = engine.CreateEngineInput();
input.WorkingMemory = wm;
input["myParameter"] = myValue;
try {
EngineOutput output = engine.Execute( input );
catch ( Exception e ) {
...
}