Maintaining Continuous Processing in a Single Agent

By default, each time you run a flow, either standalone or as a component in a process flow, a new agent is started. However, you may want to run a flow in the agent that is running, rather than start a new agent. Suppose, for example, that you run a procedure that issues a FILEDEF, a SET command, or that creates a global (&&) variable, and you want to reference the setting or variable in the flow that follows the procedure. Since a flow that runs in a new agent will not recognize or be able to use these settings or variables, you need to maintain continuous processing in the same agent.

ibi Data Migrator supports the run-time requirement. To ensure that the continuous connection is maintained at runtime, you can request that a flow that creates the input required by another flow be marked to Run as Stored Procedure. See Maintain Continuous Processing in a Single Agent.

Maintain Continuous Processing in a Single Agent

    Procedure
  1. From the navigation pane, select a flow, and drag it into the process flow workspace. The flow may be a data flow or another process flow.
  2. Right-click the object to the left of the flow and, holding the mouse button down, drag from the left object to the right object, creating a connecting arrow. Release the mouse button.

    The procedure is ran within the process flow at the point where it is encountered.

  3. Double-click the flow object to open the Properties pane.
  4. Select the Run as Stored Procedure checkbox to run the flow in the running agent. For details, see Properties Pane for Flows and Procedures .
  5. Close the window.
  6. Click the Save button to update the process flow.
Tip: If you switch to Text View and examine the underlying execution code for a flow, you see EX CMASAP as the flow name. CMASAP triggers a connection to a new agent. If you select Run as Stored Procedure in the Properties pane, the code shows the EX flow name and keeps the same agent open for processing.

Properties Pane for Flows and Procedures

To access the Properties pane, double-click a flow object or procedure.

The Properties pane has the following fields and options:

Flow or Procedure Name

Displays the name of both the object and the directory in which the flow or procedure is stored.

If you drag a Flow icon from the toolbar, you can enter:

  • The name of an existing procedure and its application directory.
  • The name of a new procedure that you must build and save.
Note: If you have already created and saved the procedure, the application directory and procedure name appear when you open the window.
Get Parameters using Synonym

Select this checkbox to obtain parameters using a synonym, instead of entering them in the Properties pane.

When this option is used, a variable is automatically generated with the name of each field in the selected synonym. If the associated data source of the synonym has more than one row, the flow is submitted once for each row, with values for the variables obtained from each row.

For an example of using this option, see Iterating Through Multiple Tables. If you select this option, the following fields are available:

  • File Name. Enter or select the application directory and name of a synonym for ibi Data Migrator to use for obtaining parameters. This option only appears when the Get Parameters using Synonym option is selected.
  • Parallel Run. When this option is selected and the associated data source of the synonym has more than one row, flows are submitted asynchronously. This option only appears when the Get Parameters using Synonym option is selected and is only available for flows.
Parameters

Indicates any parameters that should be used when the flow or procedure is run.

Clicking the ellipsis opens the Parameter Editor for setting the parameter values. For more information, see Pass Parameters in a Process Flow.

Run as Stored Procedure

Select this checkbox if you wish to run the flow in the agent that is running, rather than by connecting to a new agent. This option is only available for flows. For example, you would use this method to maintain continuous processing:

  • If one data flow creates a temporary fixed format file that is used as an input to the next flow.
  • If a procedure creates a global variable, or issues a FILEDEF or SET command that you need to reference in the new flows.
Do not allow multiple instances

Select this option to prevent this flow from running if another instance is already running. This option is only available for flows.

Display Name

Displays the name of the flow or procedure.

Notes

Add notes describing the purpose of the flow or procedure.