MSDN Policy Chaining Sample

Home Page Forums BizTalk 2004 – BizTalk 2010 MSDN Policy Chaining Sample

Viewing 1 reply thread
  • Author
    Posts
    • #20229

      I downloaded the Policy-Chaining sample code from MSDN.
      In the static Execute method, they build 3 facts.  Are these examples only, or is this required? 
      In the non-static Execute method, they pass the XML document as the one and only fact (not an array of facts).

      Unless it’s just an example, why would they construct a new poicy and put in facts[1]?
      Thanks,
      Neal

       

       

      public static void Execute(string policyName, TypedXmlDocument txd)

      {

       

      DebugTrackingInterceptor dti = new DebugTrackingInterceptor(“PolicyTracking3.txt”);

       

      Policy policy = new Policy(policyName);

       

      object[] facts = new object[3];

      facts[0] = txd;

      facts[1] =

      new Policy(“ProcessLoanRequestChained3”);

      facts[2] =

      new DebugTrackingInterceptor(“PolicyTracking4.txt”);

      policy.Execute(facts, dti);

      policy.Dispose();

      }

       

    • #20236

       I’m confirming that this code works fine:

       

      public static void Execute(string policyName, TypedXmlDocument

      txd)Policy 

      policy = new Policy(policyName);

       

      object[] facts = new object[1];

      facts[0] = txd;

       

       

      policy.Execute(facts);

      policy.Dispose();

       

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.