Previous Topic: Choose a Flow ActionNext Topic: Execute a Command Using a Flow


Autoflows

In many cases, the only processing associated with a value of Command is the setting of Exit State to a particular value.

For example, consider the example in Example From MENU Procedure. The MENU procedure does nothing but inspect the incoming command and set an exit state value based on its value in anticipation of flowing to a different procedure step.

In cases like this, it is possible to associate a particular value of Command with a particular value of Exit State. A command associated with an exit state value for a procedure step is called an “autoflow” because you can use it to cause a dialog flow to take place without any action diagram logic to support it.

At execution time, autoflows are processed as follows:

  1. The CA Gen Dialog or Window Manager evaluates the Command special attribute. If the value it contains is an autoflow, the execution of the procedure's action diagram is bypassed. Otherwise, the value of Command is passed along to the action diagram as usual.
  2. Exit State is set to the exit state value associated with the autoflow.
  3. If the value of Exit State is associated with a dialog flow, the flow happens just as if Exit State had been set with the EXIT STATE IS action in an action diagram.

In the menu example (see Example From MENU Procedure), it would have been possible to simplify the construction of the Procedure Action Diagram shown in the illustration Procedure Action Diagram for MENU Procedure even further by specifying the autoflows in the following table.

Autoflow Command

Exit State Value

1

TAKE ORDER REQUESTED

2

CANCEL ORDER REQUESTED

3

MAINTAIN CUSTOMER REQUESTED

Autoflows handle all valid exit states. Therefore, the Menu Procedure Action Diagram has to set only the Invalid Request condition as shown in the following illustration. If it ever executes, it means that an invalid value was placed in Command.

Revised MENU Procedure Action Diagram

Procedure Step          MENU
                            
MENU                        
EXIT STATE IS               
invalid_request

The combination of these autoflow definitions, the Dialog Flow Diagram shown in the illustration Annotated Dialog Flow Diagram in the Example From MENU Procedure, and the action diagram shown in the illustration Revised MENU Procedure Action Diagram give the same execution time result as the MENU Procedure example.