Behavioral Diagrams: Activity Diagrams

SysML Behavioral Diagram Types

Behavioral Related

5. Use Case Diagrams (uc)

6. Activity Diagrams (act)

7. State Machine Diagrams (stm)

8. Sequence Diagrams (seq)

9 SysML Diagrams Taxonomy: Highlighting SysML Activity (act) Diagrams

Activity Diagrams (act)

What is a SysML Activity diagram?  Several Different Definitions from the Experts


Activity: An Activity (notation: rounded-rectangle or "roundangle") represents a flow of functional behaviors that may include optional Object (data) Flows. Control and Object Flows can be sequential (default) or parallel (indicated by Fork & Join Nodes) depending upon conditions.


Activity Diagram (act): An Activity diagram shows system dynamic behavior using a combined Control Flow and Object (data) Flow model.

Activity Diagram (act) Example

In this example, we are showing the logic behind recharging a phone's battery.  We see the decision node which is the second diamond in the logic.  We see the guard conditions which are conditions which determine the flow.  Guard conditions are designated by []. 

SysML Activity (act) Diagram Example with Cameo Color Scheme

When to use an Activity Diagram

The Activity diagram can be used to model flow based behavior and is similar to the widely-available Flow Chart or Functional Flow diagrams that had been used extensively before the SysML specification was devised. They are typically used to show the way parts of the system behave, including the input and output of items and signals.

https://sparxsystems.com/enterprise_architect_user_guide/15.2/guidebooks/tech_sysml_activity_diagram.html

What is the purpose of an act?

The Activity diagram is the most important behavior diagram and can be used to model flow (discrete or continuous) based behavior where inputs are converted to outputs by traversing a sequence of actions that perform work on the items. They are analogous to the common flow chart diagram but have more sophisticated semantics and also allow Activities and Actions to be related to elements such as Blocks, Requirements and Use Cases.

The Actions that appear on the Activity diagrams can contain input or output pins that represent the  interaction points where inputs are fed into an action and outputs are emitted.

The purpose of Activity diagrams is to specify dynamic system behaviors that Satisfy («satisfy» Dependency) system Functional Requirements using both Control and Object (data) Flows. When properly applied (See Usage Notes below) Activity diagrams are recursively scalable and simulatable.

https://sysml.org/sysml-faq/what-is-activity-diagram.html

Cameo act Toolbar

Cameo Activity Diagram Vertical Toolbar

Elements of an Activity Diagram

Elements

The main elements that can appear in Activity diagrams are:

Note: You must not allocate an activity (def) to a part property (usage).  You must not allocate an action (usage) to a block (def).  It's just horrible modeling but Cameo will allow you to do it which is a shame.

The main connectors  that can appear in Activity diagrams are:

NASCAR Example

NASCAR Example Explained

NASCAR Example Containment Tree

NASCAR Example: Cameo Containment Tree

Walkthrough of NASCAR Example Activity Diagrams

This example shows how an activity can be built out in more detail over time. NASCAR 1 was built first and then refined into NASCAR 2.  NASCAR 2 was later refined into NASCAR 3.  The containment tree is shown on the left.  The containment tree shows that activities such as "Left Turn"  can be reused.  

SysML Activity (act) Diagram NASCAR Example showing diagram refinement