A flow
A flow is a program-like sequence of operations from which you can generate runtime code for a supported runtime environment.
A flow is functionally the primary type of artifact of the service flow project tools, because a flow organizes operations, messages, maps, and expressions into a purposeful sequence of program interactions with existing application processes.
A flow can be categorized as a terminal flow or as a nonterminal flow based on the type of application that the flow interacts with:
- Terminal flow: A terminal flow is a flow that interacts directly with the application screens of a terminal application running on a remote z/OS® system.
- Nonterminal flow: A nonterminal flow is a flow that does not interact directly with a terminal application. It may invoke a nonterminal application, a terminal flow, or an outbound web service.
A complete program in a service flow project consists of a main flow plus zero or more invoked flows.
- Main flow: A main flow is the top-level flow in the program.
- Invoked flow: An invoked flow is any flow that is invoked
from the main flow. To invoke a flow, you create an Invoke flow node
in the flow editor (see Invoke nodes in the flow editor and Working with Invoke flow nodes in the flow editor).
- For example, a main flow CatalogOrder can contain an Invoke flow node that invokes another flow CheckAvail. Thus CheckAvail becomes an invoked flow
- The main flow cannot be an invoked flow.
- Receive, Reply, and Throw nodes define the entry point, normal exit point, and error exit points of the flow.
- Assign, Switch, and While nodes provide programming features.
- An Invoke node invokes a screen operation, a nonterminal operation, or a flow.
Because a service flow project is a program development container rather than a program itself, a flow contained within a service flow project need not reference all the operations, messages, maps, expressions, and other flows that exist in the service flow project.
Rather, as you build your flows, you select from the available operations, messages, maps, expressions, and other flows (all of which you must build yourself or import) to create the particular sequence of program interactions that you want to embody in the runtime code.
When you generate the runtime code, you specify the top-level flow in your design, and the runtime code generator follows the links in your top-level flow down through all the other artifacts referenced by your design, to gather the information that needed to generate the runtime code. (More specifically, you must first create a generation properties file for the top-level flow, and then generate runtime code from the generation properties file -- see Building a program for a runtime environment).
You can create a flow in two ways (see Creating a flow).
You can use the flow editor to modify a flow (see Flow editor).