The Call Orchestration shape can be used to synchronously
call an orchestration that is referenced in another project. This allows for
reuse of common orchestration workflow patterns across BizTalk projects. When
we invoke another nested orchestration synchronously with the Call
Orchestration shape the enclosing orchestration waits
for the nested orchestration to finish before continuing. we can specify
parameters that will be passed to the nested orchestration. Parameters can be
messages, variables, port references, role links, or correlation sets.
Passed-in port references, role links, and correlation sets all perform like
self-addressed envelopes: they supply the nested orchestration information it
can use to send information back to the enclosing orchestration.
Some times we need to re-use the orchestration. By Call orchestration shape we can achieve this. Here I am going to show how can we do it.
Followings things are needed to make our project so first we create these.
First create a BizTalk project and give it a name “CallOrch”.
Add two orchestrations and name it “InnerOrch.odx” and “OuterOrch.odx”
Add one schema “OuterSchema.xsd” as below pic.
In the orchestration "OuterOrch.odx" create two messages "input_messge"
and "output_message" and select their type as schema "OuterSchema.xsd".
In the orchestration "InnerOrch.odx" right click on Orchestration
Parameter and add two Orchestration Messages Parameter.
Input_msg and make direction "in"
Output_msg and make direction "out"
Drag and drop a receive shape into design surface on OuterOrch.odx
orchestration and select message is Input_messge.
Now drop a call orchestration shape from toolbox and place it
below receive shape. Click the exclamation mark (tool tip) on the shape. Select
No Called Orchestration - Click to Configure. The Call Orchestration
Configuration dialog box appears.
In the Call Orchestration Configuration dialog box, select the
orchestration you wish to call, as shown in Figure 1. In this dialog box, you can also select
parameters that can be passed by an orchestration. Only orchestration types
that have Activation set to False—that
is, only orchestrations that are invoked from another process—will be available
for selection and configure it as shown in the picture.
Drop a send port and select its message is Output_message. Now
Orchestration will look as below.
Drop a Decide shape into design surface in
InnerOrch.odx. Give Descriptive names to condition branches.
Drop a construct message shape in both branches within
Decide shape. Now Drop Message assignment shapes in both construct message
shape and write following expressions.
Now InnerOrch.odx will look like below.
Now our project is ready to deploy .build it and deploy the project and make
necessary configuration in BizTalk Admin console for receive port, receive
location and send port and send location.
Now drop a test message in receive location and see the output in send