简体   繁体   中英

Process BizTalk Message in .net Fact Assembly

We would like to handle an entire BizTalk message (preferably in the form of an XLANGMessage ) through a custom method (.net) that is exposed as a BRE Fact per this article .

Is it possible to define the data being passed to a particular BRE fact as being the entire message? If so, what steps are required to do so (other than defining the method's input parameter as an XLANGMessage )?

EDIT - We simply want to get the entire BizTalk message passed into some custom code so that we can process it - specifically inside the BRE through a vocabulary. The article linked above explains how to set up our custom code to be executed, but I am unable to find out how to set the data being passed to the aforementioned code to be the entire message being processed.

Technically, yes, as XLANGMessage is a .Net class and you can pass instances as Fasts to the Policy.

However, I don't think that would be a good idea. The BRE has it's own Xml Type, TypedXmlDocument, which is used to pass Xml Documents as Facts. This is what happens behind the scene with the Call Rules Shape.

XLANGMessage really just a container, the Part data can take many forms. If it's not XmlDocument, you should probably pass the Part data as it's native underlying Type.

Finally, that MSDN article title is a bit misleading. The BRE doesn't really use Assemblies specifically in any way. What you see there is just a Class Browser. It's the Classes in the Assemblies the BRE can use.

The BizTalk Business Rules Engine Pipeline Framework allows you to call a Business Rules Policy in a pipeline component. As boatseller answered, BizTalk usually wants message to be parsed into an XML format to process and the BRE also deals with XML facts.

(Full disclosure: The BRE Pipeline Framework is written by a colleague of mine at Datacom Systems New Zealand)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM