Rational Developer for System z

Step 3.1: Verify the contents of the recorded flow

In this step you will verify the contents of the recorded flow CheckItemAvailability.seqflow.

This step is not required by the service flow project tools to build the sample program but rather is included in this tutorial as a convenience, to allow you to verify that the flow that you recorded in Step 2.4 contains the nodes that it ought to contain at this point in the tutorial and to explain the function of each node.

Arrange the nodes on the flow editor canvas

In this substep you will arrange the nodes of the flow CheckItemAvailability.seqflow on the canvas of the flow editor. This arrangement has no effect on the functionality of the flow. It is done only to make it easier for you to view the nodes.

To arrange the nodes:
  1. In the EST Project Explorer, right-click CatalogSample > Flows > CheckItemAvailability.seqflow and click Open > Flow Editor. The flow editor opens.
  2. On the canvas of the flow editor, verify that Invoke screen operations nodes are not displayed as thumbnails but as icons. For example:
    Thumbnail of an application screen
    If the nodes are displayed as thumbnails, then click the Toggle Terminal Thumbnails/Icons icon Stop Flow Recording in the toolbar of the flow editor to display the nodes as icons.
  3. On the main menu of the workbench click View > Zoom Out. This zooms out the view of the flow editor canvas by one step.
  4. Arrange the nodes into a pattern similar to the one in Figure 1:
    Figure 1. CheckItemAvailability.seqflow
    Flow editor canvas
  5. Verify that your recorded flow has the same nodes and the same connections as Figure 1 (see Verify the nodes in the flow).
  6. Close the flow editor when you have finished.

Verify the nodes in the flow

This subtopic briefly describes the nodes and connections shown in Figure 1.

  • The Receive node and the first Assign node:

    The Receive node i_CheckItemAvailability is the entry point into the flow and is the first node to be performed when the flow is invoked. By default this Receive node is named after the input message of the flow.

    The Assign node variableAssignInput is used to copy the value of the input parameter itemNumber from the input message to the variable message. The actual copy operation will be done by a mapping that you add to the mapping routine of the Assign node.

  • The first Invoke screen operation node:
    The Invoke screen operation node Dfh0xs1.Exmenu_Exmenu contains the processing that is done to manage the Main Menu screen. This node has one input terminal and three output terminals:
    • The input terminal contains a mapping that generates the user input for the application screen (type "1" and press Enter).
    • The first output terminal is connected to the input terminal of the parse node (parse_variable0). The flow of control goes through this output terminal if the Exit Loop screen is recognized instead of the first application screen of the loop (see Init node, While node, and parse node).
    • The second output terminal is connected to the input terminal of the init node (init_variable0). The flow of control goes through this output terminal if the first application screen of the loop is recognized (see Init node, While node, and parse node).
    • The third output terminal is null. The flow of control goes through this output terminal if the currently displayed application screen does not match either the Exit Loop screen or the first application screen. The runtime stops processing the flow and generates an error message.

  • Three nodes associated with the While loop:
    The init node, the While node, and the parse node manage the While loop (see Init node, While node, and parse node).
    • The init node initializes the loop variable to the string TRUE (see The loop variable).
    • The While node performs the following cycle:
      1. The While node evaluates its loop expression, which tests whether the loop variable is set to the string TRUE.
      2. If the result is Boolean true then the While node does the following:
        1. It invokes a flow that performs one iteration of the loop (see The invoked flow).
        2. It repeats the cycle starting with Step 1.
      3. If the result is Boolean false then the While node terminates and the flow of control passes to the next node, which in this recording is a parse node.
    • The parse node in this loop recording guides the flow of control in two respects:
      • Its input terminal provides a neutral junction for two connections, the connection from the output terminal of the Invoke screen operation node Dfh0xs1.Exmenu_Exmenu and the connection from the output terminal of the While node.
      • Its first output terminal provides a gate to the Exit Loop node: the flow of control goes out through this output terminal when the recognized application screen is the Exit Loop screen. (The output terminal of a While node does not perform any screen recognition, so a parse node is needed in this case to recognize the Exit Loop screen.)

  • The Exit Loop node:

    The Invoke screen operation node Dfh0xs2.Exinq_EndPage is the Exit Loop node, which manages the first application screen that occurs after the loop has terminated (see Loop controls).

  • The second Assign node and the Reply node:

    The Reply node o_CheckItemAvailability is the normal exit point from the flow. By default this Reply node is named after the output message of the flow.

    The Assign node variableAssignOutput will be used to copy the value of the variable available from the variable message to the output message. The actual copy operation will be done by a mapping that you add to the mapping routine of the Assign node.


Feedback