UML Modeling Techniques > Activity modeling > Overview of activity modeling
Overview of activity modeling
Activity modeling is achieved through Activities, their Activity Diagrams and the items that appear on those diagrams.
When you want to describe the behavior of an item through an Activity you create that Activity as a child item of the item you want to describe. From the Activity you can then create one or more Activity Diagrams to model the behavior of the item that owns the Activity.
You can create all the Activity model item types on an Activity Diagram. Alternatively, you can create all the Activity model items except for the flows through an Activity in a Modeler pane: right-click the Activity, select New, and then click the appropriate submenu and command.
Activities
You create an Activity as a child of an item you want to describe through that Activity and its Activity Diagrams. You can create an Activity as a child item of the following item types: Activity, Actor, Basic Type, Class, Interface, Model, Package, Operation, Type Definition and Use Case.
Activities can also be created through Class Diagrams. On a Class Diagram:
You can show and create Activity to Activity calls that are made through Call Behavior Actions; the calls are shown as composite aggregation symbols.
You can show associations between Activities and Classes (and Class subtypes). The Association represents an object node (Data Store, Central Buffer, Input Pin or Output pin) that uses the Class as its type and is owned by the Activity. As such, when you select the Association on the Class Diagram, the Property Pages show the properties of the object node.
For more information about Activities, see the following topics:
Activity diagrams
Activity Diagrams allow you to model the behavior of an Activity.
An Activity Diagram can be created only from an Activity: right-click the Activity, select New > Activity Diagram.
When you create an Activity Diagram, Modeler creates a frame that is linked to the owning Activity. Modeler creates the following Input Pins and Output Pins on the frame:
If the owning Activity has a return type, Modeler creates an Output Pin on the frame named Return Pin.
If the owning Activity has parameters, Modeler creates Input Pins and Output Pins to represent those Parameters.
All Activity Diagram items must be within the frame, which you can stretch to make bigger.
Like other diagrams, you can drag valid items from a Modeler pane to an Activity Diagram, and add valid items by clicking an Activity Diagram button, and then right-clicking an Activity Diagram.
If you want to explore the relationships between the items that appear on Activity Diagrams, you may find it useful to see the Activity Model section on the Relationships pane.
For more information about Activity Diagrams, see the following topics:
Activity group items
The following item types are activity group items:
Interruptible Activity Region
Structured Activity Node
Activity Partition
The activity group items allow you to group and organize other Activity Diagram items.
An Interruptible Activity Region does not own the items it contains on an Activity Diagram; the items are owned by the Activity that owns the Activity Diagram.
A Structured Activity Node owns any items it contains on the Activity Diagram. Structured Activity Nodes can own other Structured Activity Nodes.
An Activity Partition does not own the items it contains on an Activity Diagram, but an Activity Partition can own other Activity Partitions. An Activity Partition typically represents a Modeler item - adding an item to an Activity Partition signifies a relationship between that item and the item that is represented by the Activity Partition.
* 
On an Activity Diagram, when you create an item in or move an item to a Structured Activity Node, that item is scoped to the Structured Activity Node. If an item is scoped to a Structured Activity Node and you move that item to the diagram background or to another Structured Activity Node, the item is rescoped accordingly.
An Activity Partition's view options allow you to orientate a group of Activity Partitions vertically or horizontally.
For more information about activity group items, see the following topics:
Action node items
The following item types are activity node items:
Accept Event Action (Linked Item is an Event)
Add Structural Feature Value Action (Linked Item is an Attribute or Role)
Call Behavior Action (Linked Item is an Activity)
Call Operation Action (Linked Item is an Operation)
Clear Association Action (Linked Item is an Association)
Clear Structural Feature Action (Linked Item is an Attribute or Role)
Create Link Action (Linked Item is an Association)
Create Object Action (Linked Item is a Class, Data Type or Signal)
Destroy Link Action (Linked Item is an Association)
Destroy Object Action
Opaque Action
Read Extent Action (Linked Item is a Class, Data Type, Interface or Signal)
Read Link Action (Linked Item is an Association)
Read Self Action
Read Structural Feature Action (Linked Item is an Attribute or Role)
Remove Structural Feature Value Action (Linked Item is an Attribute or Role)
Send Signal Action (Linked Item is a Signal)
Test Identity Action
Value Specification Action
When you create an action node item that has a Linked Item, you are prompted to select or create that Linked Item. You cannot change an action node item's Linked Item after creation. On some action node items, you can show a Linked Item's Parameters or Attributes as Input Pins and Output Pins. You can create the following action node items by dragging an Activity, Event, Operation or Signal to an Activity Diagram; the dragged item is set up as the Linked Item of the action node item:
A Call Behavior Action's Linked Item is an Activity.
An Accept Event Action's Linked Item is an Event.
A Call Operation Action's Linked Item is an Operation.
A Send Signal Action's Linked Item is a Signal.
Unlike the other action node items, for Opaque Actions you can specify Body and Language property values.
On an Activity Diagram, you can double-click an action node to open child diagrams of the linked item.
For information about pins on action node items, see the Object Node Items section that follows.
For more information, check the related topics about activity node items.
Object node items
The following item types are object node items:
Central Buffer
Data Store
Input Pin
Output Pin
Object node items have Data Types, Ordering and Multiplicity properties. In addition, they can be linked to States that are available to the object node item.
You can create Input Pins and Output Pins on the following items: diagram frame (the owning Activity), Structured Activity Nodes, Accept Event Actions, Call Behavior Actions, Call Operation Actions, Opaque Actions and Send Signal Actions. When creating an Input Pin or Output Pin on an item, ensure that you click the edge of the item.
When you create an Input Pin or Output Pin on an Activity Diagram, a popup menu allows you to add an existing Input Pin or Output Pin, or create a new Input Pin or Output Pin.
The following example shows the popup menu that appears when adding an Input Pin to a Call Behavior Action. You can see that the popup menu allows you to add an existing Input Pin to the symbol (Parameter1 or Parameter2 commands), create a new Pin for an existing Parameter (Parameter3 command), or create a new Input Pin and a new Parameter (New Parameter command).
When a symbol's Input Pin or Output Pins are not shown on the diagram, you can add them to the diagram through that item's context menu: right-click the edge of the symbol, point to Add, and then click Input Pin or Output Pin.
The type of the symbol that owns the Input Pin or Output Pin determines what the Input Pin or Output Pin represents. The following table shows you what the Input Pins and Output Pins can represent, that is, what their Linked Item is.
Symbol on which the Input Pin or Output Pin Appears
Input or Output Pin
Linked Item
Activity (Frame)
Input Pin
Parameter of Activity that owns the Activity Diagram.
Output Pin
Parameter of Activity that owns the Activity Diagram.
Accept Event Action
Linked to Event of type Call
Input Pin
Not applicable - cannot own Input Pins.
Output Pin
Parameter of the Operation that is the event trigger for the Event that is the Linked Item of the Accept Event Action.
Parameter Mechanism must be 'In' or 'In and Out'.
Accept Event Action
Linked to Event of type Change
Input Pin
Not applicable - cannot own Input Pins.
Output Pin
Not applicable - cannot own Output Pins.
Accept Event Action
Linked to Event of type Opaque
Input Pin
Not applicable - cannot own Input Pins.
Output Pin
Parameter of the Event that is the Linked Item of the Accept Event Action.
Accept Event Action
Linked to Event of type Signal
Input Pin
Not applicable - cannot own Input Pins.
Output Pin
When the Unmarshall check box is cleared, the Accept Event Action has only one Output Pin: The Output Pin's Linked Item is the Signal that is the event trigger for the Event that is the Linked Item for the Accept Event Action.
When the Unmarshall check box is selected, the Accept Event Action has an Output Pin for each Attribute of the associated Signal: The Output Pin's Linked Item is an Attribute of the Signal that is the event trigger for the Event that is the Linked Item for the Accept Event Action.
Accept Event Action
Linked to Event of type Time
Input Pin
Not applicable - cannot own Input Pins.
Output Pin
Not applicable - cannot own Output Pins, other than the default Output Pin (Output Pin1) that is created by default. The default Output Pin does not have a Linked Item.
Add Structural Feature Value Action
Input Pin
Can own only the default Input Pins (Object Pin, Insert At Pin and Value Pin). These default Input Pins do not have a Linked Item. For more information, see Add structural feature value action.
Output Pin
Can own only the default Output Pin (Result Pin). This default Input Pin does not have a Linked Item. For more information, see Add structural feature value action
Call Behavior Action
Input Pin
Parameter of the Activity that is the Linked Item for the Call Behavior Action.
Output Pin
Parameter of the Activity that is the Linked Item for the Call Behavior Action.
Call Operation Action
Input Pin
Parameter of the Operation that is the Linked Item for the Call Operation Action.
Also, owns a default Input Pin (Target Pin), which does not have a Linked Item.
Output Pin
For an Output Pin that represents the Operation's Return Type: the Linked Item is the Operation, the Data Type is the Return Type.
For an Output Pin that represents an Operation Parameter: the Linked item is the Parameter. The Parameter Mechanism must be 'Out' or 'In and Out'.
Clear Association Action
Input Pin
Can own only the default Input Pin (Object Pin). This default Input Pin does not have a Linked Item. For more information, see Clear association action.
Output Pin
Not applicable - cannot own Output Pins.
Clear Structural Feature Action
Input Pin
Can own only the default Input Pin (Object Pin). This default Input Pin does not have a Linked Item. For more information, see Clear structural feature action.
Output Pin
Can own only the default Output Pin (Result Pin). This default Input Pin does not have a Linked Item. For more information, see Clear structural feature action.
Create Link Action
Input Pin
Can own only the two default Input Pins, for which the Linked Items are Roles of the Association that is the Linked Item for the Create Link Action. For more information, see Create link action.
Output Pin
Not applicable - cannot own Output Pins.
Create Object Action
Input Pin
Not applicable - cannot own Input Pins.
Output Pin
Can own only the default Output Pin (Result Pin). This default Output Pin does not have a Linked Item. For more information, see Create object action.
Destroy Link Action
Input Pin
Can own only the two default Input Pins, for which the Linked Items are Roles of the Association that is the Linked Item for the Create Link Action. For more information, see Destroy link action.
Output Pin
Not applicable - cannot own Output Pins.
Destroy Object Action
Input Pin
Can own only the default Input Pin (Target Pin). This default Output Pin does not have a Linked Item.
Output Pin
Not applicable - cannot own Output Pins.
Opaque Action
Input Pin
No Linked Item.
Output Pin
No Linked Item.
Read Extent Action
Input Pin
Not applicable - cannot own Input Pins.
Output Pin
Can own only the default Output Pin (Result Pin). This default Output Pin does not have a Linked Item. For more information, see Read extent action.
Read Link Action
Input Pin
Can own only the default Input Pin, for which the Linked Item is the source Role of the Association that is the Linked Item for the Read Link Action. For more information, see Read link action.
Output Pin
Can own only the default Output Pin (Result Pin). This default Output Pin does not have a Linked Item. For more information, see Read link action.
Read Self Action
Input Pin
Not applicable - cannot own Input Pins.
Output Pin
Can own only the default Output Pin (Result Pin). This default Output Pin does not have a Linked Item. For more information, see Read self action.
Read Structural Feature Action
Input Pin
Can own only the default Input Pin (Object Pin). This default Input Pin does not have a Linked Item. For more information, see Read structural feature action.
Output Pin
Can own only the default Output Pin (Result Pin). This default Output Pin does not have a Linked Item. For more information, see Read structural feature action.
Remove Structural Feature Value Action
Input Pin
Can own only the default Input Pins (Object Pin, Remove At Pin and Value Pin). These default Input Pins do not have a Linked Item. For more information, see Remove structural feature value action.
Output Pin
Can own only the default Output Pin (Result Pin). This default Input Pin does not have a Linked Item. For more information, see Remove structural feature value action.
Send Signal Action
Input Pin
Attribute of the Signal that is the Linked Item for the Send Signal Action.
Also, owns a default Input Pin (Target Pin), which does not have a Linked Item.
Output Pin
Not applicable - cannot own Output Pins.
Structured Activity Node
Input Pin
No Linked Item.
Output Pin
No Linked Item.
Test Identity Action
Input Pin
Can own only the default Input Pins (First Input Pin and Second Input Pin). These default Input Pins do not have a Linked Item. For more information, see Test identity action.
Output Pin
Can own only the default Output Pin (Result Pin). This default Output Pin does not have a Linked Item. For more information, see Test identity action.
Value Specification Action
Input Pin
Not applicable - cannot own Input Pins.
Output Pin
Can own only the default Output Pin (Result Pin). This default Output Pin does not have a Linked Item. For more information, see Value specification action.
Modeler typically ensures that the name of an Input Pin or Output Pin matches the name of its linked item:
If you change the name of the Input Pin or Output Pin, Modeler changes the name of the linked item to match.
If you change the name of an Input Pin's or Output Pin's linked item, Modeler changes the name of the Input Pin or Output Pin to match.
You can populate Input Pins and Output Pins on an Activity Diagram: right-click an Activity Diagram item, and select Populate > Pins.
For more information about object node items, see the following topics:
Control node items
The following item types are control node items:
Activity Final Node
Decision Node
Flow Final Node
Fork Node
Initial Node
Join Node
Merge Node
Control node items allow you to control the flow of Control Flows and Object Flows.
The Join Node has Join Specification and Combine Duplicate properties, and the Decision Node has a Behavior property.
Orientate a Fork Node or Join Node horizontally or vertically through its View Options.
For more information about control node items, see the following topics:
Activity flow items
The following item types are activity flow items:
Control Flow
Exception Handler
Object Flow
Activity Flow items specify connections along which tokens flow between activity node items.
Activity Flow items have Guard and Weight properties; Exception Handlers has an Exception Type property; Object Flows have Multicast, Multireceive, Selection and Transformation properties.
The following table shows you what can be the source and destination items for Control Flows, Exception Handlers and Object Flows on an Activity Diagram.
Activity Flow Item
Source or Destination
Valid Items
Control Flow
Source
All action node items: Accept Event Action, Add Structural Feature Value Action, Call Behavior Action, Call Operation Action, Clear Association Action, Clear Structural Feature Action, Create Link Action, Create Object Action, Destroy Link Action, Destroy Object Action, Opaque Action, Read Extent Action, Read Link Action, Read Self Action, Read Structural Feature Action, Send Signal Action, Test Identity Action and Value Specification Action.
All control node items: Activity Final Node, Decision Node, Flow Final Node, Fork Node, Initial Node, Join Node and Merge Node.
Destination
All action node items: Accept Event Action, Add Structural Feature Value Action, Call Behavior Action, Call Operation Action, Clear Association Action, Clear Structural Feature Action, Create Link Action, Create Object Action, Destroy Link Action, Destroy Object Action, Opaque Action, Read Extent Action, Read Link Action, Read Self Action, Read Structural Feature Action, Send Signal Action, Test Identity Action and Value Specification Action.
All control node items: Activity Final Node, Decision Node, Flow Final Node, Fork Node, Initial Node, Join Node and Merge Node.
Exception Handler
Source
All action node items: Accept Event Action, Add Structural Feature Value Action, Call Behavior Action, Call Operation Action, Clear Association Action, Clear Structural Feature Action, Create Link Action, Create Object Action, Destroy Link Action, Destroy Object Action, Opaque Action, Read Extent Action, Read Link Action, Read Self Action, Read Structural Feature Action, Send Signal Action, Test Identity Action and Value Specification Action.
Structured Activity Node, Central Buffer, Data Store and Output Pin.
Destination
Structured Activity Node or an Input Pin on an action node item (Opaque Action, Call Behavior Action, Call Operation Action and Send Signal Action).
Object Flow
Source
All control node items: Activity Final Node, Decision Node, Flow Final Node, Fork Node, Initial Node, Join Node and Merge Node.
Central Buffer, Data Store and Output Pin.
Destination
All control node items: Activity Final Node, Decision Node, Flow Final Node, Fork Node, Initial Node, Join Node and Merge Node.
Central Buffer, Data Store and Input Pin.
For more information about activity flow items, see the following topics: