Friday, June 22, 2007
Dynamically Set BizTalk 2006 Pipeline Properties
I am so very glad that BTS 2006 is capable of this!
Basically, you set properties on the message you are about to send through a pipeline and those properties will get set dynamically within the pipeline. This works both for stock and customer pipeline component properties.
John
Thursday, February 01, 2007
Calling A Receive Pipeline Inside an Orchestration in BizTalk 2006
This is a quick example of how to call a receive pipeline from within a BizTalk 2006 orchestration.
Here's the gist of it:
InputPipeline = Microsoft.XLANGs.Pipeline.
XLANGPipelineManager.ExecuteReceivePipeline
(typeof(CallReceivePipeline.ReceivePipeline),msgFullMessage);InputPipeline.MoveNext()
msgSingle = new System.Xml.XmlDocument();
InputPipeline.GetCurrent(msgSingle);
Wednesday, January 31, 2007
Tuesday, January 23, 2007
BizTalk - Make the Port Operation Unique
This is a compelling article on why the operation property of an orchestration port should be uniquely named.
Monday, January 22, 2007
How to Debug a BizTalk Rules Policy in Code
I was experiencing an unreported error when I was trying to dynamically call a BizTalk 2006 rules policy in C# code. The policy ran and gave me no exception information and was annoying me to no end!
It turns out the issue had to do with facts and namespaces. I didn't discover this, however, until I learned from the link above how to put a debug trace into the policy so it would tell me what was going on.
Here's a snippet:
TypedXmlDocument typedResult = new TypedXmlDocument("ValidationResult", validationResult);
TypedXmlDocument typedTransaction = new TypedXmlDocument("Transaction", transaction);
System.Collections.ArrayList FactList = new System.Collections.ArrayList();
FactList.Add(typedResult);
FactList.Add(typedTransaction);
DebugTrackingInterceptor debug = new DebugTrackingInterceptor(@"D:\trace.txt");
Policy rulePolicy = new Policy("ValidateTransaction");
rulePolicy.Execute(FactList.ToArray());
rulePolicy.Dispose();
Wednesday, January 17, 2007
Passing an Array of Facts into the Rules Engine
The last piece of the puzzle for me in working with generic messages to do away with a TON of duplication is to dynamically call a rules policy to validate outbound EDI messages.
This is some sample code I found on the blog mentioned above:
//System.Collections.ArrayList List;
sCon = "Initial Catalog=Northwind;Data Source=(local);Integrated Security=SSPI;";
con = new System.Data.SqlClient.SqlConnection(sCon);
dcNorthwind = new Microsoft.RuleEngine.DataConnection("Northwind", "ShipperCountry", con);
List.Add(dcNorthwind);
xmlDocument = msgShippingRequest;
typedXmlDocument = new Microsoft.RuleEngine.TypedXmlDocument("RoleLinkSample.ShippingRequest",xmlDocument);
policy = new Microsoft.RuleEngine.Policy("ShippingPolicy");
List.Add(typedXmlDocument);
policy.Execute(List.ToArray());
msgOutgoingShippingRequest = typedXmlDocument.Document;
policy.Dispose();
typedXmlDocument = null;
dcNorthwind = null;
Tuesday, January 16, 2007
Dynamic Mapping (Transforms) in Biztalk Orchestrations
This is how we call maps dynamically in Biztalk 2006.
tMapType = System.Type.GetType("DynamicMaps.Map_A, DynamicMaps, Version=1.0.0.0, Culture=neutral, PublicKeyToken=faed587cb93de4ea");
construct Out_Xml
{
transform (Out_Xml) = tMapType(In_Xml);
BizTalk Correlation of Untyped Messages
This is VERY cool...
I had two choices: created fifty separate orchestrations to handle all of the types and scenarios I needed to cover, or find a way to correlate untyped (XmlDocument) messages. I searched for the latter and found this article.
public IBaseMessage Execute(IPipelineContext pc, IBaseMessage inmsg)
{
string trackCode = Convert.ToString(System.Guid.NewGuid());
inmsg.Context.Promote("TrackingID", "http://Microsoft.Demo.Customer.CustomerPropertySchema", trackCode);
return inmsg;
}
Sweet!
Wednesday, January 10, 2007
MSDN TV: Introduction to Analysis Services 2005
MSDN TV: Introduction to Analysis Services 2005
SQL Server Query Performance Tuning
http://www.sql-server-performance.com/statistics_io_time.asp