Sunteți pe pagina 1din 7

A Summary of the UML Notation for Activity

Diagram

Construct Description Syntax

Activity The notations for activity nodes are illustrated below. There are three
Nodes kinds of nodes: action node, object node, and control node. See these
classes for more information.

Action An action is the fundamental unit of behavior specification. An action


Nodes takes a set of inputs and converts them into a set of Outputs. The
values that are the inputs to an action may be obtained from the results
of other actions using the activity flow model, or they may be described
by value specifications. The outputs of the action may be provided as
inputs to other actions using the activity flow model.

Example:
The example below illustrates local pre and post-condition for the action
of a drink vending machine.

Examples of actions are illustrated below. These perform behaviors


called Send Payment and Accept Payment.

Object
Nodes

Object flow
(without activity nodes)
Example:
In the example on the left below, the two arrowed lines are both object
flow edges. This indicates that order objects flow from Fill Order to Ship Two object flow edges linking
Order. In the example on the right, the one arrowed line starts from the object nodes and actions
Fill Order object node pin and ends at Ship Order object node pin. This
also indicates that order objects flow from Fill Order to Ship Order.

Input pin

Output pin

Object Flow with State


Example:

Input and output pin,


standalone style, streaming on
both ends

Input pin, pin-style, streaming

Output pin, pin-style,


streaming

Object Flow with Exception

Example: Output pin, pin style, exception

Or

Input and output pin,


standalone style, exception
Control Decision Node Example
Nodes
Decision node or Merge node

Decision node Decision node (with control


flows)

Decision node and merge node


Decision node with behavior used together, sharing the
same symbol

Join and Fork Example:


The join node must have one or more activity edges entering it, and
only one edge leaving it. The functionality of join node and fork node
can be combined by using the same node symbol, as illustrated at the
right side of the figure below. Fork node, join node

Join node
(without flows)
Join node (with flow) Join node and fork node
used together, sharing the
same symbol

Activity final and Flow final Example:


The figure below illustrates two kinds of final node: flow final and activity
final. In this example, it is assumed that many components can be built
and installed before finally delivering the resulting application. Here, the Initial node
Build Component behavior occurs iteratively for each component. When
the last component is built, the end of the building iteration is indicated
with a flow final. However, even though all component building has
come to an end, other behaviors are still executing. When the last
component has been installed, the application is delivered. When
Deliver Application has completed, control is passed to an activity final
node—indicating that all processing in the activity is terminated. Activity final

Flow final
Final nodes

Special Accept Event Action


Actions An accept event action is notated with a concave pentagon.

Example:
Accept event action
A signal indicating the cancellation of an order. The acceptance of the
signal causes an invocation of a cancellation behavior.

Accept Time Event Action


A wait time action is notated with an hour glass.

Example: Accept time event action


The end-of-month accepts time event action generates an output at the
end of the month. Since there are no incoming edges to the time event
action, it is enabled as long as its containing activity or structured node
is. It will generate an output at the end of every month.

A send signal action is notated with a convex pentagon. The symbol


may optionally have an input pin for the target object but this is often
omitted. The symbol has a control output only.
Example:
Two signals are sent in the order-processing workflow. An order is Receive signal action
created. A signal is sent to the warehouse to fill and ship the order.
Then an invoice is created and sent to the customer.

Activity 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.

Example:
Activity An activity edge is an abstract class for directed connections between
Edge two activity nodes. An activity edge is notated by a stick-arrowhead line Regular activity edge
connecting two activity nodes. If the edge has a name it is notated near
the arrow.

Example:

Example:

Activity edge with name

Example:
Activity edge for interruptible
regions

Example:

(Where, n is connector name)


is equivalent to

Activity Example:
Class

Swimlanes An activity partition is a kind of activity group for identifying actions that
Partitions have some characteristic in common.

Example:

Partition using a swimlane

Dimensional Partition
Example:
Multidimensional Hierarchical
Example:

Interruptible Examples
Activity The first figure below illustrates that when an order cancellation request
Region is made—only while receiving, filling, or shipping) orders—the Cancel
Order behavior is invoked.

Expansion An expansion region is a structured activity region that executes


Region multiple times corresponding to elements of an input collection.

Example:
The trip route outputs sets of flights and sets of hotels to book. The
hotels may be booked independently and concurrently with each other
and with booking the flight.

S-ar putea să vă placă și