Rational Developer for System z

Step 1.3: Create the interface operation for the top-level flow

In this step you will create an interface operation, associate the interface operation with the top-level flow, add two Assign nodes and two Invoke nodes to the top-level flow, and connect the nodes of the flow in the order in which you want them to be performed.

Create an interface operation for the flow

An operation is an artifact that specifies the information required to invoke a flow, a nonterminal application, or an outbound Web service. An operations file is a named storage container for operations (see How an operation uses messages).

An operations file contains port types, which in turn contain operations. An operation contains references to an input message, an output message, and a fault message (optional) (see Information accessible through an operation).

An operation associated with a flow is called an interface operation because it defines the programming interface of the flow (see Basic information about operations).

To create an interface operation for CatalogOrder.seqflow:

  1. Create an operations file to contain the operation:
    1. In the EST Project Explorer, right-click the CatalogSample.Interface subproject.
    2. Click New > Operations File. The New Operations File wizard opens.
    3. In the New Operations File wizard:
      1. In the File Name field, type CatalogOrder.
      2. In the Destination project list, make sure that the item CatalogSample.Interface is selected.
      3. In the Operation Name field, type CatalogOrder.
      4. Click Finish. The wizard performs the following actions:
        1. It creates the new operations file CatalogOrder.wsdl.
        2. It initializes the new operations file to contain the following components:
          Table 1. Components in the new operations file
          Type of component: Name of component:
          Port Type CatalogOrder
          Operation CatalogOrder
          Input section (empty) Input
          Output section(empty) Output
          Faults section(empty) Faults
        3. It opens the new operations file in the operations editor.

  2. Inside the new operation CatalogOrder, add a reference to an input message and a reference to an output message.
    1. Add to the new operation a reference to the input message:
      1. Under Operation - CatalogOrder, right-click Input.
      2. Click Add Input. The Select Message window opens.
      3. In the Select Message window:
        1. Click CatalogSample > CatalogSample.Interface > Messages > i_CatalogOrder.sfmxsd > i_CatalogOrder.
        2. Click OK.
        3. In the operations editor, a reference to i_CatalogOrder is added under Input.
          Note: Although only the name of the message is displayed, the operations editor also saves the name of the message file in which the message is located.
    2. Add to the new operation a reference to the output message. This substep is similar to the substep that you just performed with the input message, except that now you are creating a reference to the output message
      1. In the operations editor, under Operation - CatalogOrder, right-click Output.
      2. Click Add Output. The Select Message window opens.
      3. In the Select Message window:
        1. Click CatalogSample > CatalogSample.Interface > Messages > o_CatalogOrder.sfmxsd > o_CatalogOrder.
        2. Click OK.
        3. In the operations editor, a reference to o_CatalogOrder is added under Output.
          Note: Although only the name of the message is displayed, the operations editor also saves the name of the message file in which the message is located.
  3. Close the operations editor.

Associate the operation with the flow

Associating an operation with a flow means simply that you tell the service flow project tools that you want a particular operation to be used with a particular flow. In this subtopic you will associate the operation CatalogOrder with the flow CatalogOrder.seqflow.

To associate the new operation with the flow:

  1. Open the flow:
    1. In the EST Project Explorer, under CatalogSample, expand the Flows folder.
    2. Right-click CatalogOrder.seqflow.
    3. Click Open With > Flow Editor. The flow editor opens.

  2. Associate the operation with the flow:
    1. Right-click over any white space in the flow editor.
    2. Click Select Interface Operation. The Select Operation window opens.
    3. In the Select Operation window:
      1. Click CatalogSample > CatalogSample.Interface > Operations > CatalogOrder.wsdl > CatalogOrder. This is the operation that you created in the previous subtopic.
      2. Click OK.
    4. The flow editor performs the following actions:
      1. It associates the selected operation with the flow.
      2. It renames the Receive node to i_CatalogOrder, which is the name of the input message of the selected interface operation.
      3. It renames the Reply node to o_CatalogOrder, which is the name of the output message of the selected interface operation.
  3. Leave the flow editor open for the next step.

Position the nodes, add Assign nodes and Invoke nodes, and connect the nodes

In this subtopic you will position the Receive and Reply nodes, add two Assign nodes and two Invoke nodes, and connect the nodes in the order in which you want them to be performed. At the end of this subtopic your flow editor canvas should look like Figure 1.
Figure 1. Connected nodes
Connected nodes

A Receive node Reply node is the entry point into a flow, that is, it is the first node that is performed when a flow is invoked. Similarly, a Reply node Reply node is a normal return point from a flow, a point at which a flow returns successfully to the calling program.

An Assign node Assign node is associated with a mapping routine containing mappings. Mappings allow you to retrieve, manipulate, and store data in a flow (see Mapping concepts).

At this point you should have the following nodes displayed in the flow editor:
  1. A Receive node named i_CatalogOrder.
  2. A Reply node named o_CatalogOrder.

In this subtopic you will create Invoke nodes and Assign nodes and position the nodes in the following order, left to right:
  1. Receive node i_CatalogOrder
  2. Assign node
  3. Invoke node Step0
  4. Invoke node Step1
  5. Assign node
  6. Reply node o_CatalogOrder

Perform the following actions:

  1. Delete the connection between the Receive node and the Reply node:
    1. Right-click the wire connecting the Receive node to the Reply node.
    2. Click Delete. The wire is deleted.

  2. Position the Reply node and the Receive node:
    1. Use the mouse to drag the Reply node so that it is positioned to the right of the Receive node.
    2. Leave enough space between the Receive node and the Reply node to add several nodes.

  3. Create the Assign nodes:
    1. Create the first Assign node:
      1. Expand the palette drawer by hovering the mouse pointer over the vertical Palette bar on the left side of the editor.
      2. Expand the Flow entry if it is not already expanded.
      3. Click Assign. The mouse pointer changes shape.
      4. Move the mouse pointer to an empty area of the flow editor canvas.
      5. Click once. In the place where you clicked, the flow editor creates an Assign node Assign node named Assign.
      6. Rename the Assign node to variableAssignInput:
        1. Right-click the Assign node.
        2. Click Rename. The Rename Node window opens.
        3. In the Rename Node window:
          1. In the Enter new name field, type variableAssignInput.
          2. Click OK.
    2. Create the second Assign node:
      1. Repeat the actions in the previous step to create another Assign node.
      2. Rename this Assign node to variableAssignOutput.

  4. Create the Invoke nodes:
    1. Create the first Invoke node:
      1. Expand the palette and drag Invoke to an empty area of the flow editor canvas.
      2. Rename the Invoke node to Step0.
    2. Create the second Invoke node:
      1. Expand the palette and drag Invoke to an empty area of the flow editor canvas.
      2. Rename the Invoke node to Step1.
    Note: Step0 and Step1 are plain Invoke nodes that at this point in the tutorial have no effect on the flow because they do not invoke anything. Later in this tutorial:
    • Step0 is converted to an Invoke flow node that invokes the terminal flow CheckItemAvailability.seqflow.
    • Step1 is converted to an Invoke nonterminal node that invokes a nonterminal application.
  5. Connect the nodes:
    1. Change the flow editor to Connection mode:
      The flow editor has two modes, Selection mode and Connection mode. When you open the flow editor, by default the mode is Selection mode. To change to Connection mode:
      1. Expand the palette drawer.
      2. Click Connection.
      3. The mouse pointer changes to show that the editor is in Connection mode.
    2. Connect the Receive node i_CatalogOrder to the first Assign node variableAssignInput:
      1. Click the Receive node. The flow editor displays a connection arrow anchored at the output terminal.
      2. Click the first Assign node. The flow editor anchors the pointed end of the connection arrow to the input terminal.
      Note: The flow editor remains in Connection mode.
    3. Repeat the actions in the previous step to connect each node to the node following it.
    4. Change the flow editor back to Selection mode:
      1. Expand the palette drawer.
      2. Click Selection.
      3. The mouse pointer changes to show that the editor is in Selection mode.
    5. Arrange the nodes in a horizontal row.
      Note: When you have connected all the nodes, your flow editor canvas should look something like Figure 2.
      Figure 2. Connected nodes
      Connected nodes

  6. Close the flow editor.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)