• Activity modeling emphasizes the sequence and conditions for coordinating lower-level behaviors, rather than which classifiers own those behaviors.
• These are commonly called control flow and object flow models.
• The actions coordinated by activity models can be initiated
– because other actions finish executing,
– because objects and data become available,
– or because events occur external to the flow.
Activity diagrams
• Possibly more than any other UML diagram, activity diagrams apply to much more than just software modeling. They are applicable to just about any type of behavioral modeling; for example, business processes, software processes, or workflows.
• Software modeling, activities typically represent a behavior invoked as a result of a method call.
• Business modeling, activities may be triggered by external events, such as an order being placed, or internal events, such as a timer to trigger the payroll process on Friday afternoons.
• Activity diagrams have undergone significant changes with UML 2.0; they have been promoted to first-class elements and no longer borrow elements from state diagrams.
• Activity diagrams capture activities that are made up of smaller actions.
Actions & Activities
• An action execution corresponds to the execution of a particular action.
• Similarly, an activity execution is the execution of an activity, ultimately including the executions of actions within it.
• Each action in an activity may execute zero, one, or more times for each activity execution.
• At the minimum, actions need access to data, they need to transform and test data, and actions may require sequencing.
• The activities specification (at the higher compliance levels) allows for several (logical) threads of control executing at once and synchronization mechanisms to ensure that activities execute in a specified order.
Actions
• An action is a named element that is the fundamental unit of executable functionality. The execution of an action represents some transformation or processing in the modeled system, be it a computer system or otherwise.
• The action begins execution by taking tokens from its incoming control edges and input pins. When the execution of an action is complete, it offers tokens in its outgoing control edges and output pins, where they are accessible to other actions.
Activity Modeling
• Activity modeling emphasizes the input/output dependencies, sequencing, and conditions for coordinating other behaviors.
• Uses secondary constructs to show which classifiers are responsible for those behaviors.
• Focus is on what tasks need to be done, with what inputs, in what order, rather than who/which performs each task.