Sometime, you need to apply the same pipeline in differents place in your orchestration with a modified property.
The most frequent case is that you have a port with multiple port_type within. And each Port_type need a cutom pipeline.
You’ve got two solutions : you create a spefic port for each port_type, or you set the pipeline programatically.
Let’s explore the second way.
First step, in the BizTalk console administration set the pipeline to pass thru receive or pass thru transmit on your orchestration port.
Next, create another port which will not be used by your orchestration, configure it with the first pipeline you want
Create all port you need with the previous method. You need to do that to retrieve the pipeline configuration in the next step.
Third, go in SQL Management Tool and go in BizTalkMgmt Database and retrieve your configuration :
for receive location the field is adm_receivelocation.ReceivePipelineData
For send port the filed is adm_receivelocation.SendPipelineData
Now you’ve got all your configuration, you need to apply it on your message :
|Context Property||Type of Port|
|BTS.SendPipelineConfig||Send Pipeline Configuration for a Two Way or One Way Send Port|
|BTS.SendPipelineResponseConfig||Receive Pipeline Configuration for a Two Way Send Port|
|BTS.ReceivePipelineConfig||Receive Pipeline For a Two or One Way Receive Port|
|BTS.ReceivePipelineResponseConfig||Send Pipeline for a Two way Receive Port|
sndMSG(BTS.SendPipelineResponseConfig)="<Root xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><Stages><Stage CategoryId=\"9d0e4105-4cce-4536-83fa-4a5040674ad6\"><Components><Component Name=\"Microsoft.BizTalk.Component.XmlDasmComp\"><Properties><DocumentSpecNames vt=\"8\">POCRMN_Schema.DeliveryService_tempuri_org+PreparePartnerDeliveryResponse, POCRMN_Schema, Version=126.96.36.199, Culture=neutral, PublicKeyToken=79b910a03abd9ff4</DocumentSpecNames></Properties></Component></Components></Stage><Stage CategoryId=\"9d0e410e-4cce-4536-83fa-4a5040674ad6\"><Components><Component Name=\"Microsoft.BizTalk.Component.PartyRes\"><Properties /></Component></Components></Stage></Stages></Root>";
In my case, I need this trick because i need to set dynamically the DocumentSpecName’s property of XML Receive.
This trick could be usefull but be carefull the code is not really friendly readable and be sure to have the right annotation above.