ibm Rational Rhapsody 7.5 — Activity diagram features

Activity diagrams Activity diagrams specify a workflow, or process, for classes, use cases, and operations. As opposed to statecharts, activity diagrams are preferable when behavior is not event driven. A class (use case/operation) can have either an activity diagram or a statechart, but not both. However, a class, object, or use case might have more than one activity diagram with one of the diagrams designated as the main behavior . Note It is possible to change the main behavior between different activities within the same classifier. Activity diagram features One useful application of activity diagrams is in the definition of algorithms.

Algorithms are essentially decompositions of functions into smaller functions that specify the activities encompassed within a given process. Note Sequence diagrams can show algorithms of execution within objects, but activity diagrams are more useful for this purpose because they are better at showing concurrency. Activity diagrams have several elements in common with statecharts, including start and end activities, forks, joins, guards, and states (called actions ). Unlike statecharts, activity diagrams have the following elements: Љ Decision points show branching points in the program flow based on guard conditions.

Љ Actions represent function invocations with a single exit activity flow taken when the function completes. It is not necessary for all actions to be within the same object. Љ Action blocks represent compound actions that can be decomposed into actions. Љ Subactivities represent nested activity diagrams. Љ Object nodes represents an object passed from the output of the action for one state to the input of the actions for another state. Љ Swimlanes visually organize responsibility for actions and subactions. They often correspond to organizational units in a business model. Rational Rhapsody 621