vrijdag 20 april 2012

Call pipelines from an orchestration

Calling a pipeline from an orchestration is quite easy.

First of all you need to add a reference to the Microsoft.XLANGs.Pipeline.dll and Microsoft.BizTalk.Pipeline.dll assemblies. When this is done you'll be able to execute a receive pipeline as follows:
ReceivePipelineOutput = Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteReceivePipeline
(typeof(ShemasAndPipelines.ReceiveCustOrdres), OrdersInputInterchange);
To get all messages coming out the pipeline, you'll have to loop over the batch and get all messages like this:
 ReceivePipelineOutput.GetCurrent(OrdersInputMsg);
For the execution of a send pipeline you'll need to create a variable of type Microsoft.XLANGs.Pipeline.SendPipelineInputMessages. then call the method add on this variable which adds message of type Microsoft.XLANGs.BaseType.XLANGMessage.
SendPipelineInputMessages.Add(OrderSummary);
To execute the send pipeline, you'll have call the ExecuteSendPipeline method with the just created SendPipelineInputMessages and the output message as follows:
Microsoft.XLANGs.Pipeline.XLANGPipelineManager.ExecuteSendPipeline(typeof
(ShemasAndPipelines.SendCustOrdersPipeline), SendPipelineInput, OrdersOutputInterchange);
This way of executing pipelines will execute the pipelines using the default settings for all pipeline properties. How to execute pipelines from an orchestration with custom settings for the pipeline properties will be explained in my next blogs.

a more detailed explanation can be found here

9 opmerkingen:

  1. Hi,

    Thanks for the concise explanation. I was wondering if there are any performance penalties while executing pipelines from orchestrations ? Does this go against BizTalk development best practices ?

    Thanks in advance for your reply

    BeantwoordenVerwijderen
    Reacties
    1. There shouldn't be to much performance impact, but nonetheless I would recommend to try to avoid this. Unless there is no other possibility, I would say to keep with the normal executions of pipelines on port artifacts.

      Verwijderen