BizTalk Server Applications Integration - Using the BizTalk Rules Engine inside a BTS 2004 map

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Applications Integration > October 2005 > Using the BizTalk Rules Engine inside a BTS 2004 map





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Using the BizTalk Rules Engine inside a BTS 2004 map
Lee Washington

2005-10-24, 10:32 am

Hi all,

Can I call the BizTalk Rules Engine from within the BTS mapper using the
scripting functoid? If so please show me a example.
--
Lee Washington
Jon Flanders[MVP]

2005-10-24, 10:32 am

You'd have to call out to a External Assembly - there is code in the SDK and
on the web - but it goes something like:


using System;
using Microsoft.RuleEngine;


public class RunRules
{
public string Run(string input)
{
Policy p = new Policy("PolicyName");
XmlDocument d = new XmlDocument();
d.Load(input);//assuming input is an element from the source schema
TypedXmlDocument d= new TypedXmlDocument("docType");
p.Execute(d);
return d.OuterXml;//assume rules modified the xml
}
}

--
Jon Flanders
http://www.masteringbiztalk.com/blogs/jon/

"Lee Washington" <lee.washington@hp.com> wrote in message
news:F36CDCE8-68AB-46EE-876E-30DC9BCAD0FB@microsoft.com...
> Hi all,
>
> Can I call the BizTalk Rules Engine from within the BTS mapper using the
> scripting functoid? If so please show me a example.
> --
> Lee Washington



Lee Washington

2005-10-26, 5:52 pm

Thanks Jon for your help and the sample code. I will try out this solution
today.

--
Lee Washington


"Jon Flanders[MVP]" wrote:

> You'd have to call out to a External Assembly - there is code in the SDK and
> on the web - but it goes something like:
>
>
> using System;
> using Microsoft.RuleEngine;
>
>
> public class RunRules
> {
> public string Run(string input)
> {
> Policy p = new Policy("PolicyName");
> XmlDocument d = new XmlDocument();
> d.Load(input);//assuming input is an element from the source schema
> TypedXmlDocument d= new TypedXmlDocument("docType");
> p.Execute(d);
> return d.OuterXml;//assume rules modified the xml
> }
> }
>
> --
> Jon Flanders
> http://www.masteringbiztalk.com/blogs/jon/
>
> "Lee Washington" <lee.washington@hp.com> wrote in message
> news:F36CDCE8-68AB-46EE-876E-30DC9BCAD0FB@microsoft.com...
>
>
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com