Previous Topic: Specify Commands to Initiate Dialog Flow ProcessingNext Topic: Assign Autoflow Commands


Specify Conditions Under Which a Flow Occurs (Exit States)

For a dialog flow to take place, a condition called an exit state must occur. Defining an exit state includes assigning a value to the exit state and optionally a message that appears on the screen when the exit state occurs. For example, if there are procedure steps named MAIN MENU and CANCEL ORDER, the exit state that caused flow to occur from MAIN MENU to CANCEL ORDER could be assigned as CANCEL ORDER REQUESTED. The exit state message could be Order cancelled.

Every procedure step associated with a dialog flow must have at least one exit state set in its action diagram. Each transfer and link on a dialog flow diagram is associated with a Flows On exit state that causes the change of control from the source procedure step to the destination procedure step. On links, there is also a Returns On exit state associated with the return of control to the source procedure step. When a procedure step completes, it transfers control based on the value for NEXTTRAN, then the exit state. If the procedure step finds two exit states with the same value, the step transfers control based on the Returns On exit state before transferring control based on the Flows On exit state. For more information about NEXTTRAN, see the Action Diagram User Guide. For background (non-screened) transactions, it is important to set an exit state associated with a dialog flow to a screened transaction in the procedure step in order to respond to the terminal user.

In client/server applications, exit state messages associated with server procedures return to the client component and are displayed. Only data or a command may be passed along a flow. The value of the exit state cannot be tested by the client procedure logic. However, any exit state messages associated with server procedures do return to the client procedure and are displayed.