Creating flow charts
You can create a flow chart on any function or class method in the same way as you can an activity diagram.
About this task
Flow charts decompose a system into actions that correspond to activities. These diagrammatic elements, called actions, are member function calls within a given operation. In contrast to normal states (as in statecharts), actions in flow charts terminate on completion of the activity, rather than as a reaction to an externally generated event.
Each action can have an entry action, and must have at least one outgoing action flow. If the action has several outgoing action flows, each must have its own guard condition.
During code generation, code is derived from the actions on a flow chart.
Actions have the following constraints:
- Outgoing control flows can include only guard conditions.
- Actions have non-empty entry actions.
- Actions do not have internal action flows or exit actions, nor do activities.
- Outgoing action flows on actions have no triggering events.
Action blocks represent compound actions that can be decomposed into actions. Action blocks can show more detail than might be possible in a single, top-level action. You can also use pseudocode, text, or mathematical formulas as alternative notations.
For action blocks, there must be an initial flow at the start and a final activity at the end, and flows cannot cross the blocks boundaries to actions in the block (though they might enter and leave the block itself). The code generator puts blocks code in curly braces, and this code block has language significance regarding variable scope and lifetime.
An activity final provides local termination semantics. The flow chart returns at this point to the operation/function that started it.
One of the action elements in the flow chart must be the default action (initial flow). The flow chart flow originates from the element pointed to by the initial flow. For code purposes, this flow indicates the start of code.Procedure
- In the browser, right-click the model element for which you want to create a flow chart, such as a function.
- Select .
Results
The flow chart displays in the Drawing area.