Designing activity diagrams

UML 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, block, part, 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.

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.

UML activity diagrams have the following features:

You might also use these advanced features of the activity diagrams:


Feedback