0

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.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
SpaceCowboy74
  • 1,367
  • 1
  • 23
  • 46

1 Answers1

2

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.

Johns-305
  • 10,908
  • 12
  • 21
  • That's what i thought. These rules would be implemented in a WCF service that takes Business Objects, puts them through the rules and returns an object with an "isValid" bool set. I added a Tracking Interceptor that checks the TrackConditionEvaluation and looks for if the result is true or false. If false, it writes the expression to a string list. What I would really like though is to know the rule name that is being tested. – SpaceCowboy74 Nov 26 '13 at 20:36