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.

Display the Sequence Diagram for a function

To display the Sequence Diagram for a function:
  1. Right-click the function name, in either the opened Genero source code (4gl) file (in Code Editor) or in the Code Structure view.
  2. Select Open Sequence Diagram.
    Tip: If you do not see the menu option, rebuild your application.

Display the Sequence Diagram for the application

To display the Sequence Diagram for an application:
  1. Right-click the word MAIN in the MAIN program block in the opened Genero source code (4gl) file (in Code Editor) or in the Code Structure view.
  2. Select Open Sequence Diagram.
    Tip: If you do not see the menu option, rebuild your application.
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

Figure: Sequence Diagram


This figure is a screenshot of a Sequence Diagram. See the surrounding text for more information about the Sequence Diagram shown.
The starting point of the application is indicated by the stick-figure actor, the user who interacts with the application.
  • Processes that exist simultaneously are represented by parallel lines. For a Genero application, these lines represent the source code modules in your application.
  • Boxes on the lines represent the functions in each module. The sequence is indicated by the order in which the boxes are listed; functions which are called by other functions have their boxes stacked on top. Plus and minus signs on each box allow you to display or hide sub calls.
  • Horizontal arrows display the interaction between functions, the messages (calls) that are exchanged between them, and the order in which the calls occur.
In this 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

Hold down the CTRL key and use the mouse wheel to zoom in and out of 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.