How can I tell which rules in a BRE Policy failed?

905 views Asked by At

I am following a sample program from CodeProject that gives some examples of using the BizTalk BRE to test some rules. I completed the sample just fine and am in the process of creating a WCF service to allow users to test an object from a remote server. The problem is, I want to know WHY a item failed and what rule it failed.

In the sample referenced, there is an applicant object. The rules say if the applicant is between 18 and 36, and the loan amount is less than or equal to 20000, then approve the application. There are other rules then that give a risk status.

I want to know why the applicant failed the rules. So say an applicant is 39. Is there a way i can tell which predicate failed?

Do i need to implement some kind of custom Tracking Interceptor?

I am using BizTalk 2013 if it makes any difference, though i haven't seen much difference in the BRE from version to version.

1

There are 1 answers

1
DTRT On

First, you are correct in that the BRE is essentially unchanged in BizTalk Server 2013.

For what you're looking for, yes, you would need to implement a Tracking Interceptor which will log the Policy execution steps, including Rule evaluations.

However, you would only create your own Tracking Interceptor for executing Policies in custom code. BizTalk Server already provides a Tracking Interceptor when executing Policies with the Call Rules Shape. The log of those Policies is available in the Message Flow of the Orchestration instance in BizTalk Administrator.

You have to enable Tracking on the Policy first in the Policies node of your application.