Per-instance pipeline configuration
I was reading the Biztalk Documentation and came across a interesting piece of functionality in Pipelines, which I had not used so far.
You might very well know that you can stick custom pipelines in Receive Locations or Send Ports, what is new is you can override the public properties set for the pipeline in Designer in each of the Receive location or send port i.e) you can make the pipeline work differently per each instance. Check it out here
To me it sounds great, several projects I have seen so far had Receive/Send pipelines duplicating similar kind of tasks, for ex. I had two receive pipelines for two different partners with Flat file Disassembler
Flat file Disassembler1
Document Schema : docschema1
Header Schema : headerschema1
Trailer Schema : trailerschema1
Flat file Disassembler2
Document Schema : docschema2
Header Schema : headerschema2
Trailer Schema : trailerschema2
Essentially the two pipelines above just had the public properties different in the flat file dis-assemblers, but needs two different pipelines to do the job. Instead now I can have one pipeline and override the public properties in each of the receive locations.
Sounds good? Yes, but to make this work you cannot use the Biztalk Explorer GUI instead you might have to use the Biztalk Explorer OM by code to tweak it. See the following Code for setting the xml file in a receive location
BtsCatalogExplorer objCatalog = new BtsCatalogExplorer();
objCatalog.ConnectionString = "Server=" + YOURMGMTDBSERVERNAME +
";Initial Catalog=" + YOURMGMTDBNAME
+ ";Integrated Security=SSPI;";
foreach(ReceivePort objreceivePort in objCatalog.ReceivePorts)
{
foreach(ReceiveLocation objlocation in objreceivePort.ReceiveLocations)
{
if(objlocation.Name.ToUpper() == YourReceiveLocationName.ToUpper())
{
objlocation.ReceivePipelineData = YOURXMLSTRINGDATA;
}
}
}
objCatalog.SaveChanges();
You might very well know that you can stick custom pipelines in Receive Locations or Send Ports, what is new is you can override the public properties set for the pipeline in Designer in each of the Receive location or send port i.e) you can make the pipeline work differently per each instance. Check it out here
To me it sounds great, several projects I have seen so far had Receive/Send pipelines duplicating similar kind of tasks, for ex. I had two receive pipelines for two different partners with Flat file Disassembler
Flat file Disassembler1
Document Schema : docschema1
Header Schema : headerschema1
Trailer Schema : trailerschema1
Flat file Disassembler2
Document Schema : docschema2
Header Schema : headerschema2
Trailer Schema : trailerschema2
Essentially the two pipelines above just had the public properties different in the flat file dis-assemblers, but needs two different pipelines to do the job. Instead now I can have one pipeline and override the public properties in each of the receive locations.
Sounds good? Yes, but to make this work you cannot use the Biztalk Explorer GUI instead you might have to use the Biztalk Explorer OM by code to tweak it. See the following Code for setting the xml file in a receive location
BtsCatalogExplorer objCatalog = new BtsCatalogExplorer();
objCatalog.ConnectionString = "Server=" + YOURMGMTDBSERVERNAME +
";Initial Catalog=" + YOURMGMTDBNAME
+ ";Integrated Security=SSPI;";
foreach(ReceivePort objreceivePort in objCatalog.ReceivePorts)
{
foreach(ReceiveLocation objlocation in objreceivePort.ReceiveLocations)
{
if(objlocation.Name.ToUpper() == YourReceiveLocationName.ToUpper())
{
objlocation.ReceivePipelineData = YOURXMLSTRINGDATA;
}
}
}
objCatalog.SaveChanges();
0 Comments:
Post a Comment
<< Home