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:
- Create an operations file to contain the operation:
- In the EST Project Explorer, right-click the CatalogSample.Interface subproject.
- Click . The New Operations File wizard opens.
- In the New Operations File wizard:
- In the File Name field, type CatalogOrder.
- In the Destination project list,
make sure that the item CatalogSample.Interface
is selected.
- In the Operation Name field,
type CatalogOrder.
- Click Finish. The wizard
performs the following actions:
- It creates the new operations file CatalogOrder.wsdl.
- 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 |
- It opens the new operations file in the operations editor.
Inside the new operation CatalogOrder,
add a reference to an input message and a reference to an output message.- Add to the new operation a reference to the input message:
- Under Operation - CatalogOrder, right-click Input.
- Click Add Input. The Select
Message window opens.
- In the Select Message window:
- Click .
- Click OK.
- 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.
- 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
- In the operations editor, under Operation - CatalogOrder,
right-click Output.
- Click Add Output. The Select
Message window opens.
- In the Select Message window:
- Click .
- Click OK.
- 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.
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:
- Open the flow:
- In the EST Project Explorer, under CatalogSample,
expand the Flows folder.
- Right-click CatalogOrder.seqflow.
- Click . The flow editor
opens.
Associate the operation with the flow:
- Right-click over any white space in the flow editor.
- Click Select Interface Operation. The Select
Operation window opens.
- In the Select Operation window:
- Click . This is the operation
that you created in the previous subtopic.
- Click OK.
- The flow editor performs the following actions:
- It associates the selected operation with the flow.
- It renames the Receive node to i_CatalogOrder,
which is the name of the input message of the selected interface operation.
- It renames the Reply node to o_CatalogOrder,
which is the name of the output message of the selected interface
operation.
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
A Receive 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
is a normal return point from a flow, a point at which a
flow returns successfully to the calling program.
An
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:
- A Receive node named i_CatalogOrder.
- 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:
- Receive node i_CatalogOrder
- Assign node
- Invoke node Step0
- Invoke node Step1
- Assign node
- Reply node o_CatalogOrder
Perform the following actions:
Delete the connection between the Receive node
and the Reply node:
- Right-click the wire connecting the Receive node to the Reply
node.
- Click Delete. The wire is deleted.
- Position the Reply node and the Receive node:
- Use the mouse to drag the Reply node so that it is positioned
to the right of the Receive node.
- Leave enough space between the Receive node and the Reply node
to add several nodes.
Create the Assign nodes:
- Create the first Assign node:
- Expand the palette drawer by hovering the mouse pointer over the
vertical Palette bar on the left side of the
editor.
- Expand the Flow entry if it is not already
expanded.
- Click Assign. The mouse pointer changes
shape.
- Move the mouse pointer to an empty area of the flow editor canvas.
- Click once. In the place where you clicked, the flow editor creates
an Assign node
named Assign.
- Rename the Assign node to variableAssignInput:
- Right-click the Assign node.
- Click Rename. The Rename Node window opens.
- In the Rename Node window:
- In the Enter new name field, type variableAssignInput.
- Click OK.
- Create the second Assign node:
- Repeat the actions in the previous step to create another Assign
node.
- Rename this Assign node to variableAssignOutput.
- Create the Invoke nodes:
- Create the first Invoke node:
- Expand the palette and drag Invoke to an
empty area of the flow editor canvas.
- Rename the Invoke node to Step0.
- Create the second Invoke node:
- Expand the palette and drag Invoke to an
empty area of the flow editor canvas.
- 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.
Connect the nodes:
- 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:
- Expand the palette drawer.
- Click Connection.
- The mouse pointer changes to show that the editor is in Connection
mode.
- Connect the Receive node i_CatalogOrder to
the first Assign node variableAssignInput:
- Click the Receive node. The flow editor
displays a connection arrow anchored at the output terminal.
- 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.
- Repeat the actions in the previous step to connect each node to
the node following it.
- Change the flow editor back to Selection mode:
- Expand the palette drawer.
- Click Selection.
- The mouse pointer changes to show that the editor is in Selection
mode.
- 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
Close the flow editor.