Question

I'm using the IBM iLog.NET business rule engine (v7r1 or thereabouts) and I can't find why my rules are failing. How do I trace down what's failing, where, and why?

I've got a local object model that's calling out to my rules hosted in an IBM rules service on IIS 6.0.

About half of my rules are configured to modify one of the input objects with a new status code. The code isn't getting set when I think it should but I cannot tell conclusively which rules are getting hit.

Was it helpful?

Solution

I found that the IBM iLog.NET documentation had the answer buried deep, deep within. Persistent Google searching revealed that I can set ILOG.Rules.ExecutionServer.Trace.EventFilterCategories on my ExecutionRequest object before I send it to the server.

ExecutionRequest request = new ExecutionRequest(rulePath);
request.TraceFilter.EventFilters 
    = ILOG.Rules.ExecutionServer.Trace.EventFilterCategories.All;

...

ExecutionResponse response = session.Execute(request);
ILOG.Rules.ExecutionServer.Trace.Trace trace = response.Trace;
Debug.WriteLine(trace.SerializedExecutionTrace);

The serialized trace contains all the inputs and outputs for the call as well as all rules that were triggered during execution and the rules that weren't hit at all.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top