Biztalk Development Series (11): Execute pipeline in orchestration

Source: Internet
Author: User
Tags sendmsg biztalk

Because the development needs to sometimes execute pipeline in the process. For example, retrieve the message string from a field in the DB and construct the message in the process. You must use pipeline to update the attribute field and verify the message. This interface is already available in the BizTalk architecture: xlangpipelinemanage class. The following is an example of using the receive and send ports in the process. The Microsoft. xlangs. Pipeline component (c: \ Program Files \ Microsoft BizTalk Server 2006 \ microsoft. xlangs. pipeline. dll) must be referenced in the project)

1. Use the receiving Pipeline

  • Call executereceivepipeline () in the xlangpipelinemanage class to execute the receiving pipeline.

Method Code in xlangpipelinemangae class:

Public static receivepipelineoutputmessages executereceivepipeline (type receivepipelinetype, xlangmessage inmsg );
  • Create a new variable vrecout type in the process: receivepipelineoutputmessages
  • Create a schema with the schmsg type defined
  • The value of the constructed message expression is:
Vrecout = Microsoft. xlangs. pipeline. xlangpipelinemanager.
Executereceivepipeline (typeof (testpipelines. myrecpipeline), inputmsg );
Schmsg = NULL; // initialize the Output Message.
Vrecout. movenext (); // default method of ielement.
Vrecout. getcurrent (schmsg );

Testpipelines. myrecpipeline is the queue's fully qualified name (fully qualified name), including the namespace and class name.

Inputmsg is the input message, that is, the message to be sent to the MPs queue.

2. Use a sending Pipeline

  • Call executesendpipeline () to execute the sending pipeline.

Method Code in xlangpipelinemangae class:

Public static void executesendpipeline (type sendpipelinetype, sendpipelineinputmessages inmessages, xlangmessage outxlangmsg );
  • Create a new variable in the process. The vinmsgs type is sendpipelineinputmessages.
  • Create a message whose sendmsg type is "Send Pipeline.
  • The value of the expression used to construct a message is:
Vinmsgs. Add (inputmsg );
Sendmsg = NULL;
Microsoft. xlangs. pipeline. xlangpipelinemanager. executesendpipeline (typeof (testpipelines. mysendpipeline), vinmsgs, sendmsg );

Testpipelines. mysendpipeline is the queue's fully qualified name (fully qualified name), including the namespace and class name.

Inputmsg is the input message, that is, the message to be sent to the MPs queue.

Note:To construct a message, you must execute it in the constructor shape and select the message to be constructed in the constructor shape. Otherwise, the following error is reported:

Illegal attempt to update the value of part 'part' in XLANG/s message 'inputmsg 'after the message construction was complete

Biztalk Development Series (11): Execute pipeline in orchestration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.