Biztalk Development Series (36) orchestration single instance execution

Source: Internet
Author: User
Tags biztalk

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.

Biztalk Development Series (36) orchestration single instance execution

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.