Create a calling message flow that contains a CallableFlowInvoke node. Create a callable message flow that
contains CallableInput and CallableReply nodes.
About this task
The following steps describe how to create a calling flow
and a callable flow that can send information to each other. For information about calling a flow asynchronously, see Developing asynchronously callable message flows.
Procedure
- In the IBM Integration Toolkit, create the calling message flow, which must
include a CallableFlowInvoke node.
The CallableFlowInvoke node parses the incoming message in
full so that it is in a suitable format to send to the CallableInput node. Therefore, you should validate the message
before it reaches the CallableFlowInvoke node. If the message
fails validation at this point, it can be rolled back.
- In a different application, create a callable message flow, which must begin with a CallableInput node, and contain a CallableReply node.
A CallableFlowInvoke node calls a callable flow by
referring to the endpoint name on the CallableInput node, and
the application that contains the callable flow. Therefore, you must include all callable flows in
applications.
- On the CallableInput node of the callable flow,
use the Endpoint Name property to provide a name for the callable flow.
Application and endpoint name pairs must be unique on a single integration server. You can have
multiple callable flows that share the same application and endpoint names, but they must be in
different integration servers. In this case, the Switch server acts as a load balancer.
- On the CallableFlowInvoke node of the calling
flow, set the following properties.
Table 1. CallableFlowInvoke node properties
Property |
Value |
Target Application |
Set this property to the name of the application that contains the callable flow. |
Target Endpoint Name |
Enter the name of the Endpoint Name property of the CallableInput node. This name is case sensitive. The
Target Endpoint Name must match the Endpoint Name of the CallableInput node exactly. |
Request timeout (sec) |
Set the time within which the callable flow must be called, in seconds. If the callable flow
is not called within the specified time, an error message is issued. |
Call Preference |
- If your main and callable flows are in the same integration server, set this property to
Prefer local calls.
- If your flows are split between different integration servers, or between IBM Integration Bus and IBM App Connect on IBM Cloud, set this
property to Remote calls only.
|
- Package the applications that contain your message flows
into BAR files.
- Deploy the BAR files to the appropriate integration servers.
If you are splitting processing between IBM Integration Bus and IBM App Connect on IBM Cloud, deploy one BAR file on premises and upload the other to
the cloud. For more information about deploying BAR files to IBM App Connect on IBM Cloud, see the IBM App Connect Enterprise on IBM Cloud
documentation.
Results
When you pass a message into the main message flow, the CallableFlowInvoke node sends the contents of the message body
and local environment folders to the CallableInput node of
the callable flow. When the callable flow completes processing, the CallableReply node returns the message body and local environment
folder data to the CallableFlowInvoke node of the main
flow.
What to do next
If your callable flows are in different integration servers,
you need to create a Switch server (which routes data) and connectivity
agents to allow the flows to communicate securely. For more information,
see Preparing the environment for callable flows.