When it comes to orchestrations there are a couple of do's and don'ts. This article will provide you with useful information and resources on best practices for BizTalk orchestrations.
BizTalk developers sometimes easily tend to use an orchestration to solve a problem or fulfill a requirement, while a messaging only solution would be more suitable. A rule of thumb for every developer should be to minimize the use of orchestrations when it comes to increasing the overall throughput of messages and reduce latency.
You may wonder why should always use multi-part messages. Well when logical ports and Receive/Send shape are using multi-part message types, you can easily change the underlying schema if necessary without having to disconnect the port from the receive shape. This enhances productivity. See also one of best article's on BizTalk programming: 8 Tips And Tricks For Better BizTalk Programming.
With orchestrations you have to keep performance in mind when you expecting a large workload. There are some key considerations you have to bear in mind:
There are a number of patterns available that can help you create stable and robust orchestration, see Implementing Design Patterns in Orchestrations.
With BizTalk you have a couple of options when it comes to configuring a port in the orchestration designer: Specify now, Specify later, Direct and Dynamic, see Port Bindings. Direct-Bound ports are an excellent way of sending a message from BizTalk to BizTalk. These ports are self-configured, without sacrificing flexibility or performance. No configuration is necessary to bind them to psychical ports, enhance re-usability and are easier to redeploy independently. There are three Direct-Bound port types: Message Box Routing, Self-Correlating, and Orchestration-to-Orchestration (also called Partner Ports). See MSDN Working with Direct Bound Ports in Orchestrations.
Handling exceptions inside orchestration is the similar of doing a “catch { }” block in C#, and it enhances the stability of the orchestration. It is recommended that you include all orchestration shapes in one or multiple scopes (non-transactional scopes whenever possible) and create at least the following exception handler blocks:
Read suggested related topics:
Steef-Jan Wiggers edited Revision 28. Comment: Added resource link
Sandro Pereira edited Revision 27. Comment: Change Title
Steef-Jan Wiggers edited Revision 25. Comment: Fixed Typos
Steef-Jan Wiggers edited Revision 22. Comment: Added tags
Steef-Jan Wiggers edited Revision 20. Comment: Formatting
Steef-Jan Wiggers edited Revision 19. Comment: Added topic checklist
Steef-Jan Wiggers edited Revision 18. Comment: Added text
Steef-Jan Wiggers edited Revision 17. Comment: Added text and links
Steef-Jan Wiggers edited Revision 16. Comment: Added text
Steef-Jan Wiggers edited Revision 15. Comment: Formatting, errata
Steef-Jan Wiggers edited Original. Comment: Added resource link
Mandi Anez Ohlinger [MSFT] edited Revision 2. Comment: I added a link to "BizTalk Orchestration Performance: Thoughts from BizTalk Support". Thank you for compiling these links!
Steef-Jan Wiggers edited Revision 3. Comment: Formatting
Steef-Jan Wiggers edited Revision 4. Comment: Changed title
Steef-Jan Wiggers edited Revision 5. Comment: Added text
Steef-Jan Wiggers edited Revision 6. Comment: Added text
Steef-Jan Wiggers edited Revision 7. Comment: Added topic Always Use Multi-Part Message Types and text
Steef-Jan Wiggers edited Revision 8. Comment: Added resource link
Steef-Jan Wiggers edited Revision 9. Comment: Added text and links
Steef-Jan Wiggers edited Revision 10. Comment: Added text and link to patterns topic
Steef-Jan Wiggers edited Revision 11. Comment: Added resource link
Steef-Jan Wiggers edited Revision 12. Comment: Added text and links to exception handling topic
Steef-Jan Wiggers edited Revision 13. Comment: Added text and links
Steef-Jan Wiggers edited Revision 14. Comment: Added text and links