Sharing flow processing between App Connect on IBM Cloud and App Connect Enterprise or Integration Bus

To share processing, a message flow can call another flow directly, as a callable flow, regardless of where the flows are running. If both flows are running in IBM® App Connect Enterprise on IBM Cloud®, they can communicate as soon as you deploy them. If one flow is running in App Connect on IBM Cloud and the other flow is running in App Connect Enterprise (or IBM Integration Bus) on premises, you have to configure secure connectivity between them.

A message flow that you create in the toolkit of IBM App Connect Enterprise or IBM Integration Bus can complete many different actions. If any of those actions are process-intensive, you can split them from the main flow and complete them in another message flow (configured as a callable flow) somewhere else, on cloud or on premises. Some parts of a message flow might logically belong in a specific location. For example, if your flow queries an on-premises database, performance is better if that part of the flow remains on premises. But if part of your flow queries a website multiple times, performance might be improved by running that part of the flow in the cloud. You can call the cloud-based flow from your on-premises flow, and the flow in the cloud does not use any of your on-premises resources.

For example, in the following figure a message flow in Application 1 running in IBM App Connect Enterprise on premises calls a message flow in Application 2 running in IBM App Connect Enterprise on IBM Cloud. Secure connectivity between the message flows was enabled by downloading the agent configuration file from IBM App Connect Enterprise on IBM Cloud and saving the file into an agentx directory for the integration server on premises.

Note: This topic is about using the callable flow technique between App Connect Enterprise message flows. You can also use the callable flows technique with on-cloud event-driven flows and from API flows in IBM App Connect on IBM Cloud. Such on-cloud event-driven flows can be called by a CallableFlowInvoke node in a message flow, and such on-cloud flows can use the Invoke action node to call other on-cloud event-driven flows (that have the Input event node) or message flows (that have the CallableInput node) either on cloud or on premises.

You can deploy both flows to the same IBM App Connect Enterprise instance (such as your IBM App Connect on IBM Cloud instance), or you can deploy one flow to IBM App Connect on IBM Cloud and the other flow to another instance like IBM App Connect Enterprise on premises (or in a private cloud).

If both flows are running in App Connect Enterprise on IBM Cloud, they can communicate with each other as soon as you deploy them.

If one flow is running in App Connect on IBM Cloud and the other flow is running in App Connect Enterprise on premises, you have to configure secure connectivity between them. For information about configuring secure connectivity between flows on App Connect on IBM Cloud and flows in App Connect Enterprise on premises, see Configuring secure connectivity between flows on IBM Cloud and on premises.

Configuring secure connectivity between flows on IBM Cloud and on premises

If you’re sharing flow processing between App Connect on IBM Cloud and either App Connect Enterprise or Integration Bus, you have to configure secure connectivity between them.

Your flows can then communicate by using a Switch server and connectivity agents. The Switch server is already created in IBM App Connect on IBM Cloud. The connectivity agents contain the certificates that your flows require to communicate securely with the Switch server.

You must download an agent configuration file (agentx.json) from the cloud, and use it to configure the connectivity agent. Your flows use this agent, and the Switch server, to communicate securely between between App Connect on IBM Cloud and App Connect Enterprise or Integration Bus.

Note: If your callable flows are both deployed to App Connect Enterprise or Integration Bus, or both running in App Connect on IBM Cloud, they can communicate with each other as soon as you deploy them.

The following instructions describe how to create a secure connection between flows in App Connect on IBM Cloud and flows in App Connect Enterprise or Integration Bus. You can split your flows into multiple callable flows, but for simplicity, this tutorial assumes that you’re creating just two flows: a calling flow and a callable flow.

First, find or create everything you need

  • These instructions assume that you have IBM App Connect Enterprise or IBM Integration Bus installed on premises, and have configured an integration server on premises. For example, see Creating an integration server in the App Connect Enterprise documentation.

Configure connectivity between your flows on premises and in App Connect on IBM Cloud

  1. In App Connect on IBM Cloud, open the Callable flows page; for example, on the Dashboard, click the Callable flows icon .

    If you’ve not configured callable flows before, the list will be empty.

  2. Click Connect callable flows.

    A dialog box opens to set up your agent.

  3. Click Download the configuration.
  4. Update the agent
    • For App Connect Enterprise, save the agent configuration file (agentx.json) to the config iibswitch\agentx directory of the integration server in App Connect Enterprise.
      • For an independent integration server, the agentx directory is within the work directory for the server:
        IntegrationServerWorkDirectory\config\iibswitch\agentx

        (If you don’t see this directory, you’ll need to create the work directory for your integration server by running the mqsicreateworkdir command in App Connect Enterprise. For more information, see Configuring an integration server in the App Connect Enterprise Knowledge Center.)

      • For an integration server under an integration node, the agentx directory is within the directory for the integration node:
        installdir\config\nodename\servername\iibswitch\agentx
    • For Integration Bus, save the agent configuration file (agentx.json) to the same computer where Integration Bus is running. Start an IBM Integration Bus command environment, then run the following mqsichangeproperties command for the integration server that contains your callable flow.
      • On Windows:
        mqsichangeproperties integrationNodeName -e integrationServerName -o ComIbmIIBSwitchManager -n agentXConfigFile -p filepath\agentx.json
      • On Linux®:
        mqsichangeproperties integrationNodeName -e integrationServerName -o ComIbmIIBSwitchMan

    Make sure that the integration server is running, so that the secure connectivity can be tested and used.

  5. In App Connect on IBM Cloud, click Test your agent to ensure that your flows that are split between the cloud and on premises can communicate with each other. If the test is successful, you should see a green tick and a statement of the number of agents connected to the instance of IBM App Connect on IBM Cloud; for example:

    Close the dialog box.

You've configured secure communication between your split flows on premises and in the cloud.

Note: If a message flow in one on-premises integration server calls a message flow in other on-premises integration servers, and one of those integration servers also uses the callable flows technique to interact with flows in IBM App Connect on IBM Cloud, you need to copy the downloaded agentx.json file to all those on-premises integration servers (so that they all continue to use the same Switch server on IBM Cloud).

For example, consider the initial on-premises scenario where a flow on server A calls a flow on server B, with both servers configured with the local agentx.json (to use the on-premises Switch server). Later, a flow in IBM App Connect on IBM Cloud is added to call the flow on server B, so server B needs to be configured with the agentx.json downloaded from the cloud (to use the on-cloud Switch server). Also, to continue to use the same Switch server as server B, server A needs to be configured with the agentx.json downloaded from the cloud (to use the on-cloud Switch server).

What next

Refresh the Callable flows page. For running flows that are configured as callable flows or contain nodes that invoke callable flows, details are shown on the Callable flows page. For example:

Figure 1. Callable flows page showing callable flows and the flows that call them.

(Click image to view full size.)

For some examples of sharing flow processing between App Connect on IBM Cloud (event-driven flows) and App Connect Enterprise on premises, see the following tutorials:

To learn more about callable message flows, see the following topics: