Sequence Diagrams

The Sequence Diagram visually displays the flow of your application logic. It shows how the functions of the application call and/or are called by other functions.

Displaying the Sequence Diagram

To create and display the diagram for a function from an open 4gl source code file, right-click the function name to display the context menu option Open sequence diagram. To diagram the entire application, right-click the word MAIN in the MAIN program block.

In an open Sequence Diagram, the right-click option View source opens the source code module (4gl file) for the function, allowing you to switch back and forth between the source and the diagram.

In the Function calls view of an open Dependency Diagram, the right-click menus for Called Function and Caller Function have an option Open sequence diagram.

The Sequence Diagram


This figure is a screenshot of a Sequence Diagram. See the surrounding text for more information about the Sequence Diagram shown.

Figure 1. Sequence Diagram

The starting point of the application is indicated by the stick-figure actor, the user who interacts with the application. In the example, the user interacts with the MAIN program block (function), which calls the query_cust function in the custquery.4gl source code module. The query_cust functions calls other functions in that module in the order indicated. For example, it calls the function cust_select, which calls fetch_cust. The query_cust function returns to the MAIN.

Zoom

Use Ctrl-mouse wheel to zoom in/zoom out on the diagram.

Structure View

The structure of the program modules is shown in a tree in the Structure view. Use the plus/minus signs to display/hide the functions in a module. Select a function in the Structure view to display its properties in the Properties view. Right-click on a node in the Structure view to see a context sensitive menu of options for that node.

Sub Calls

Right-click on the sequence diagram to display the menu options that will display or hide all the sub calls in a program.

Customize

Use Tools >> Preferences, Sequence Diagram to define default maximum number of dependencies; default is 1.