Viewing workflow with the Workflow Execution Viewer
The workflow diagram depicts a series of activities, with an event as the starting point followed by sequential flow of control from one workflow object to another. Workflow objects appear in their order of execution. The workflow diagram ends when the last workflow object completes its execution. Developers can expand each workflow object to view the actions and conditions involved. Workflow actions are executed in sequence.
The Workflow Execution Viewer is associated with events because workflows are executed on:
- Field events like Gain Focus, Button Click, Menu Choice, and so on
- Form events like Submit, Merge, On Display, and so on
- Time-based events like at certain intervals or on certain calendar days
The Workflow Execution Viewer is an editor that is always in the read-only state, and appears at the center of the workbench. It can use the maximum available space, which helps to view workflows that expand horizontally and vertically, when a developer drills down into a workflow.
Events depicted in the Workflow Execution Viewer
The Workflow Execution Viewer depicts Form events and Side-effect events.
Form events
A form event could be one of many events that occur in sequence, in which case previous events might affect the current event. For example:
- When a form is opened, depending on the mode, the On Window Loaded event occurs, followed by On Display or On Window Opened.
- When an Apply action is performed, depending on the mode, the active link Modify or active link Submit, active link After Modify or active link After Submit, and Filter On Submit events occur sequentially.
For more information about form operations, see Active-link-processing.
The following table lists the form events (excluding those triggered by user actions) that can be depicted in the Workflow Execution Viewer.
Super event | Component events | Description |
---|---|---|
Launch Form for New |
| This super event is triggered if the Open Window action is defined on the form to open the same form or another form; the On Set Default active link is triggered only if the option to set fields to default values is specified in the Open Window action for the Search or Submit window types. |
Launch Form for Search |
| This super event is triggered if the Open Window action is defined on the form to open the same form or another form; the On Set Default active link is triggered only if the option to set fields to default values is specified in the Open Window action for the Search or Submit window types. |
Launch Form for Modify |
| This super event is triggered if the Open Window action is defined on the form to open the same form or another form; the On Set Default active link is triggered only if the option to set fields to default values is specified in the Open Window action for the Search or Submit window types. The active link is invoked twice in the second instance of On Window Open. |
Save Modified |
| This super event can occur when a user invokes the Save action (or the workflow performs a commit action) in Modify mode. |
Save New |
| Filter-On Get Entry is invoked only if the AL-On After Submit handler is defined. AL-On Set Default depends on the user preference. Set Default processing occurs only if the Set Default option has been specified for an Open Window action. |
Search |
| This super event is triggered when a user performs a search action on the form. |
Side-effect events
Actions in the workflow objects can trigger some other events, for example:
- The Gain Focus event on a field can cause a Lose Focus event on some other field, which is difficult to capture.
- The Change Field action can trigger many events like Table Refresh, Gain Focus, and so on, which might have further workflow associated with them.
- The Push Fields action can trigger Modify, Submit, or Create events on the server, which in turn might have many filters associated with them.
- A Service Action almost always causes filters to fire.
- Some special Run Process commands in active links can trigger events.
When creating a workflow, application developers can benefit from viewing events (and the related workflow objects) that could possibly be triggered. To do so, developers can introduce related diagrams into the Workflow Execution Viewer on demand.
To launch the Workflow Execution Viewer from the Form editor
If you know the exact field with which the workflow is associated:
- Open the appropriate form in the Form editor.
- From the context menu of the field, select Show Workflow > eventName.
If the field does not have any workflow associated with it, the context menu appears as Show Workflow > No Workflows.
The Show Workflow menu is also available in the Outline view. This menu is not available for newly created forms and fields unless you commit the changes so that they are saved on the server.
To launch the Workflow Execution Viewer from the Event Navigator
If you know the exact form and event to which the workflow is related:
- From the context menu of the form in the Object List view, select Show Event Navigator.
The Show Event Navigator menu is also available for fields listed in the Outline view. From the context menu of an event in the Event Navigator, select Show Workflow.
The Show Workflow menu works only with a single event. If you select multiple events in the Event Navigator, this menu is disabled.
Elements of the Workflow Execution Viewer
The Workflow Execution Viewer contains items that depict the various elements in workflow like the form and object for which the workflow is defined, the qualifications and actions in a workflow, and so on.
The following figure depicts the following elements in the Workflow Execution Viewer:
- Form node—Appears as rectangle that contains the form type icon (regular, join, display-only, vendor, or view) on the left and the form name on the right. It represents a form object, and is included to show the source of an event. In most cases, a form and its fields are the sources of events.
- Transition—Appears as a simple, directed line. The arrow head in a transition indicates the direction of flow of control between actions within a workflow object or between workflow objects.
Some transitions have labels associated with them. A label could be an event name, which indicates that the following workflow is triggered on that event. A label could also indicate the condition on which the transition occurs. For example, a transition from a Run-If qualification to the first action in the workflow can be labeled "Y," indicating that the transition occurs if the Run-If condition is satisfied.
If accompanied by a plus sign ➕️ , it indicates that super events are associated with the parent node. Click the plus sign to launch the super events. - Workflow object node—Appears as a rectangle that contains the object type icon (active link, filter, or escalation) on the left and the object name on the right. The number on the node represents the execution order of that workflow object. If accompanied by a plus sign (+ ), it indicates that the node can be expanded to views its qualifications and actions.
- Qualification node—Appears as a rhombus that contains the qualification name. Depending on the possible outcomes, one or more flows can originate from a qualification node.
- Action node—Appears as a rounded rectangle that contains the action name. If accompanied by a plus sign ➕️ , it indicates one of the following:
- The action node has side-effect events associated with it; click the plus sign to launch the side-effect events.
- The action node indicates a Call Guide action; click the plus sign to expand the details-the guide name and its associated actions are displayed.
- End of workflow—Appears as two concentric circles (with a filled inner circle), indicating that the workflow actions have been completed and no further activity will take place for this workflow.
A form event displayed in the Workflow Execution Viewer
Generally, after the execution of a workflow action is completed the flow proceeds to the next action. However, in some cases, the flow might not proceed sequentially. For example:
- If the workflow being executed is contained in a guide, then actions such as Exit Guide and Goto Label can cause the flow to proceed either to the end of the guide execution or to some other node in the guide.
- For a Push Fields or Set Fields action, if a side-effect event is defined for the records that match the Run-If qualification, a plus sign appears next to the node. You can click the plus sign to expand and view the side-effect event.
If a developer specifies the Display 'No Match' Error option, then the workflow diagram depicts that:- The flow associated with the failure of this qualification proceeds directly to the end of the workflow node.
- The flow associated with the success of this qualification proceeds to the next action.
- For a Message action, if the message type is Error, then the flow proceeds directly to the end of the workflow node.
Operations in the Workflow Execution Viewer
You can perform the following operations in the Workflow Execution Viewer:
- Open—Right-click a node and select Open from the context menu to open the object in an editor. For example, an action node opens in the workflow editor.
- Document—Select one or more nodes and select Document from the context menu. The Document Objects dialog appears with the selected nodes already added to the Select Objects panel. You can then proceed to document the selected objects by using the Documenter tool.
- Save As Image File—Select a node or right-click anywhere in the blank editor area and select File > Save As Image File from the context menu. The Save As Image File dialog box prompts you to provide a file name, location, and format. The diagram is saved in the current state nodes are neither expanded nor collapsed when saving. You can also export the entire workflow diagram or the selection to HTML by using this menu.
- Print—Select one or more nodes and click File > Print. On the Print dialog, select an option from the Diagram Print Range. Alternatively, right-click an empty region in the Workflow Execution Viewer and use the File > Print context menu.
- Expand or Collapse—Select Expand or Collapse from the context menu of a node. The Expand action expands a node and all its children; it expands the current activity but not its related activities. The Collapse action collapses all the child nodes of the selected node.
If you select the Expand or Collapse context menu from a blank area in the workflow diagram, all the nodes in the diagram are expanded or collapsed, except side-effect events, super events, and active link or filter guides. - Zoom—Use the Zoom In or Zoom Out toolbar buttons to zoom in or zoom out of the current diagram.
- Refresh—Click Refresh to reload the entire workflow diagram. This operation reloads the workflow only if it was modified after being opened in the Workflow Execution Viewer.
- Show workflow details—Hover over an action node to see its workflow details as a tool tip. The tooltip displays details similar to those seen in the active link, filter, and escalation editors when their actions are in the collapsed state.
- Marquee—Use the Marquee tool to select one or more nodes in the Workflow Execution Viewer. A dotted rectangle appears when you click and drag the mouse in an empty region, and all the nodes located in that region are selected. To select a node, you need to cover the complete area of that node; it does not get selected if you drag the mouse partially over the node.
The Marquee tool is useful when you want to perform the Save As Image File, Open, Document, Expand, or Collapse operations on multiple nodes (those selected by the marquee and not all the nodes or a single node).