Adding a Saved Procedure to a Process Flow

How to:

Reference:

You can add any previously saved procedure to the process flow you are currently designing. The procedure may be:


Top of page

x
Procedure: How to Add a Flow to the Process Flow
  1. Right-click an application directory in the navigation pane and select New then Flow.
  2. Click the Process Flow tab. A new workspace containing a Start object opens in the right pane.
  3. From the Procedures button of the navigation pane, select a flow Flow Button and drag it into the process flow workspace. The flow may be a data flow or another process flow.
  4. Right-click the object to the left of the flow and, holding the mouse button down, drag from the left 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.

  5. Click the Save button to update the process flow.

Top of page

x
Procedure: How to Add a Stored Procedure to the Process Flow
  1. Right-click an application directory in the navigation pane, select New and then Flow.
  2. Click the Process Flow tab. A new workspace containing a Start object opens in the right pane.
  3. From the Procedures button of the navigation pane, select a stored procedure Stored Procedure Button and drag it into the process flow workspace. For related information, see Stored Procedures and Flows.
  4. Right-click the object to the left of the stored procedure 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.

  5. Click the Save button to update the process flow.

Top of page

x
Reference: Stored Procedures and Flows

In the course of developing a flow (either a data flow or a process flow), you may need to perform a variety of specialized tasks, from setting up the environment parameters and variables to copying files. The DMC provides an editing window in which you can type your 4GL code or SQL. When you save the file, it is stored in the Procedures button of the navigation pane, identified by the icon Procedures Button.

Then you can:


Top of page

x
Procedure: How to Create a Stored Procedure

To create a stored procedure:

  1. Right-click an application directory in the navigation pane and select New then Stored Procedure.
  2. A text editing window opens. Type the procedure code, which may be either FOCUS or SQL.

    For example, create a stored procedure named PRODPARMS that has two parameters, &PTYPE and &CAT, as shown in the image.

    Stored Procedure Example

    You are responsible for the accuracy of the syntax you enter. However, any errors that are generated will be displayed in the Server Messages tab below the workspace when you execute the stored procedure.

  3. Choose Save As from the File menu or click the Save button on the toolbar. Enter a procedure name in the Save As window.

    The procedure is listed in the navigation pane under an application directory, where it is preceded by the stored procedure Stored Procedure Iconicon.

    From here you can drag it into a process flow at any point. For details, see Adding a Saved Procedure to a Process Flow.


iWay Software