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
Figure 1. Sequence Diagram
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 BDL program
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/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 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 to define default maximum number of dependencies; default is 1.