To build scalable BizTalk solutions, you should treat your orchestrations like functions in code. Instead of building one massive process, you can break logic into smaller, reusable child orchestrations. The key to this is mastering Orchestration Parameters.
When you use the Call Orchestration shape, you often need to send data into the sub-process (Input) and receive a result back (Output). You can specify what parameters your orchestration should take in the Orchestration View window. An orchestration can take the following items as parameters:
- Messages
- Variables (including objects)
- Correlation sets
- Role links
- Ports
Parameters can be passed between orchestrations as input or output parameters.
- In parameters can be passed by value or by reference.
- Out parameters can only be passed by reference.
📝 One-Minute Brief
Passing data between BizTalk orchestrations is a fundamental skill for building modular solutions. This post demonstrates how to add Input and Output parameters to an orchestration, allowing you to pass variables, messages, and objects when using the Call Orchestration shape. By defining these parameters in the Orchestration View, you can create reusable “sub-routines” that return processed data to a parent process, significantly reducing code duplication across your BizTalk projects.
To set orchestration parameters
- In the Orchestration View window, use the Orchestration Parameters folder to add variables, messages, and ports.
- For each item added to the Orchestration Parameters folder, use the Properties window to specify the Direction property:
- In – a parameter passed in by value.
- Ref – a parameter passed in by reference.
- Out – a parameter passed out by reference.
The “Call” vs. “Start” Limitation
Keep in mind that parameters behave differently depending on how you invoke the orchestration:
- Call Orchestration: Supports In, Out, and Ref. It is synchronous, so the parent waits for the result.
- Start Orchestration: Only supports In parameters. Since it is asynchronous (fire-and-forget), it cannot return data via parameters.
Using parameters effectively turns your orchestrations into a library of reusable tools. This not only makes your code cleaner but also makes debugging much easier by isolating specific business logic.
Hope you find this helpful! If you liked the content or found it useful and would like to support me in writing more, consider buying (or helping to buy) a Star Wars Lego set for my son.
Sandro you are the best!! Thank you!
Can we pass Parameters only through Call Orchestration Shape?