Maintaining Continuous Processing in a Single Agent

How to:

Reference:

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 currently 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.

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


Top of page

x
Procedure: How to Maintain Continuous Processing in a Single Agent
  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 will be executed within the process flow at the point where it is encountered.

  3. Double-click the flow object to open the Properties attribute pane.
  4. Select the Run as Stored Procedure check box to execute the flow in the running agent. For details, see Properties Attribute Pane .
  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 will 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 attribute pane, the code shows EX flow name and keeps the same agent open for processing.


Top of page

x
Reference: Properties Attribute Pane

To access the Properties attribute pane shown in the following image, double-click a flow object.

Flow Properties

The Properties attribute pane has the following fields and options:

Flow Name

Displays the name of the directory in which the flow is stored, and the name of the flow.

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.
Get Parameters using Synonym

Select this check box to obtain parameters using a synonym, instead of entering them in the properties panel.

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.

File Name

Enter or select the application directory and name of a synonym for DataMigrator 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.

Parameters

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

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

Run as Stored Procedure

Select this check box if you wish to run the flow in the agent that is currently running, rather than by connecting to a new agent. For example, you would use this method to maintain continuous processing:

  • If one data flow creates a temporary flat 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.
Display Name

Displays the name of the flow.

Notes

Add notes describing the purpose of the flow.


Top of page

x
Reference: Properties Attribute Pane for Procedures

To access the Properties attribute pane shown in the following image, double-click a procedure object.

The Properties attribute pane has the following fields and options:

Procedure Name

Displays the name of the directory in which the procedure is stored and the name of the procedure.

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

Check this box to obtain parameters using a synonym instead of entering them in the properties panel.

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.

File Name

Enter or select the application directory and name of a synonym for DataMigrator to use for obtaining parameters. This option only appears when the Get Parameters using Synonym option is selected.

Parameters

Indicates any parameters to use when the procedure is run.

Display name

Displays the name of the procedure.

Notes

Add notes describing the purpose of the procedure.


iWay Software