Creating a subflow

Create a .subflow file, in which you can define subflow content to include in your message flow applications. Use .subflow files to create subflows that you can deploy to an integration server as individual resources, independent of the message flows that use the subflow. You can create one or more subflows and deploy them to one or more integration servers.

Before you begin

  • You can create an application, library, or integration project at the same time as creating a subflow, or you can create the container before you create the subflow. To create a container first, follow the instructions in the following topics: When an application or shared library references other shared libraries, all the subflows for a broker schema must be in a single container. Subflows for a broker schema must not be in both an application (or shared library) and a shared library that is referenced by that application (or shared library). Subflows for a broker schema must not be in two or more shared libraries that are referenced by a single application or shared library. All the subflows in a broker schema must be either in the main application or shared library, or in a single referenced shared library.
  • One of the steps involved in creating a subflow is to select an existing broker schema, or create a new one. Subflows in shared libraries cannot be in the default broker schema. To use a particular broker schema with your subflow, create the schema by following the instructions in Creating a broker schema.

About this task

You can create subflows to define content that provides a subset of function (for example, a reusable error processing routine) that you can reuse in your message flow applications. You can create subflows either in .subflow files or in .msgflow files. For more information about subflows and the differences between subflows that are defined in .subflow files and subflows that are defined in .msgflow files, see Subflows. The information in this topic describes how to create a .subflow file.

The subflow and its resources are stored in a file system or in a shared repository. A file system can be on the local drive, or a shared drive. If you store files in a repository, you can use all the available repositories that are supported by Eclipse; for example, CVS.

The mode that your integration node is working in can affect the number of message flows that you can use; see Restrictions that apply in each operation mode.

To create a .subflow file, complete the following steps:

Procedure

  1. To open the New Subflow wizard, click File > New > Subflow.
    Alternatively, right-click an application, library, or integration project and click New > Subflow.
  2. Specify the application, library, or integration project in which to create the subflow. Either select an existing container from the list, or create a container by clicking New.
    If you right-clicked a particular container in step 1, the name of that container is selected automatically.
  3. In the Subflow name field, enter a name for the new subflow.
    You can use all valid characters for the name, but it is helpful to choose a name that reflects its function, for example, ErrorProcessing.
  4. Decide whether you want to create a default broker schema.
    By default, a default broker schema is created. Subflows in shared libraries cannot be in the default broker schema. If you do not want to create a default schema, clear the check box and select an existing schema from the list. However, if no schemas exist in the project, you must create a schema at this point.
  5. Click Finish.

Results

The new subflow file (subflow_name.subflow) is displayed in the Application Development view, under the application, library, or integration project. The subflow opens in the Message Flow editor so that you can define the subflow content by adding, configuring, and connecting message flow nodes. An Input node and an Output node are added to the subflow.

What to do next

  1. Define the content of the subflow by following the instructions in Defining message flow content. Every Input node defined in the subflow represents an In terminal on the subflow node. Every Output node defined in the subflow represents an Out terminal on the subflow node. You can use these terminals to connect the subflow node to other nodes in the parent flow. You cannot add the following nodes to a subflow that is defined in a .subflow file:
    • Nodes representing subflows that are defined in .msgflow files
    • User-defined nodes created from subflows that are defined in .msgflow files
    • MQOptimizedFlow nodes
  2. Add your subflow to a message flow; see Adding a subflow.