BizTalk Development Series (36) Orchestration single instance execution

Source: Internet
Author: User
Tags biztalk

For more information, see the BizTalk hands-on experiment series directory.

BizTalk Development Series

BizTalk is an efficient Message Processing Engine that uses multi-thread concurrency to process messages. In other words, when a message is received, a new message processing instance is generated. However, sometimes the target system may not be capable of concurrent processing. In this case, you need to use a single instance in BizTalk to process messages. In the BizTalk pipeline, you can directly enable delivery in order. However, similar options are not provided in Orchestration. How can this problem be achieved?

In fact, this effect can be achieved in BizTalk based on the Correlation Set of the message. That is, after the first message comes in, create an Orchestration instance, initialize the relevant set, and then receive the message, if there is the same related set, it will be processed by the same Orchestration instance instead of creating a new Orchestration instance.

Next we will implement such a Demo.

Create a Schema, create an Orchestration, and create a message. Next, draw the corresponding image in Orchestration:

Bind the corresponding message to the Receive and Send shapes, and connect the receiving and sending shapes and ports. The message is not converted in this Demo. It only implements End-to-End message transmission.

So far, the entire process has been basically completed. However, we cannot implement the functions we previously expected. You also need to take the following key steps: Create and set Correlation.

1. create a Correlation Type in the Correlation Types of the Type of the Orchestration View. this Demo identifies a message received by a Receive Port. select the Correlation Properlity attribute to select BTS. receivePortName

2. Create a Correlation Set. Create it in TransferOrch of Orchestration View.

3. After the Correlation Set is created, initialize the Correlation Set. Note that the Correlation Set can only be initialized once in an Orchestration. Therefore. In this process. Set the Initializing Correlation Sets of Receive_1 to the Correlation Set you just Set.

4. Set Following Correlation Sets in Receive_2 to the Correlation Set you just Set.

So far, Singleton Orchestration has been designed. After the Assembly is signed, deployed, and set, you can see the actual running effect.

The receiving port will receive messages in batches (of course, you can choose to receive messages in order ). After the first message is Orchestration, an Orchestration instance is created. The next message will be processed using the original Orchestration instance. Of course, the message must come from the same receiving port. This is also the previously set Correlation.

This is the log information of the BizTalk runtime. we can clearly see the BizTalk processing process from the log. To re-initialize the Orchestration to initialize the instance, we need to restart the BizTalk project.

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.