Modeling with Activity Diagram
The following elements are available in a activity diagram.
- ActionState
- SubactivityState
- InitialState
- FinalState
- Synchronization
- Decision
- Flow Final
- Object Flow
- Signal Accept State
- Signal Send State
- Transition
- SelfTransition
- Swimlane
ActionState
Semantics
An action state represents the execution of an atomic action, typically the
invocation of an operation.
An action state is a simple state with an entry action whose only exit
transition is triggered by the implicit event of completing the execution of the
entry action. The state therefore corresponds to the execution of the entry
action itself and the outgoing transition is activated as soon as the action has
completed its execution.
Procedure for creating action state
In order to create ActionState,
- Click [Toolbox] -> [Activity] -> [ActionState]
button.
- And click at the position where ActionState will be placed in the
[main window].
- A action state is created on the diagram and the quick dialog is shown.
- Enter the action state name at the quick dialog and press [Enter] key.
The result is as follows.
SubactivityState
Semantics
A subactivity state represents the execution of a non-atomic sequence of
steps that has some duration; that is, internally it consists of a set of
actions and possibly waiting for
events. That is, a subactivity state is a ˇ°hierarchical action,ˇ± where an
associated subactivity graph is executed.
Procedure for creating subactivity state
In order to create SubactivityState,
- Click [Toolbox] -> [Activity] -> [SubactivityState]
button.
- And click at the position where SubactivityState will be placed in the
[main window]. A subactivity state is created and the quick dialog is shown. At
the quick dialog, enter the subactivity state name and press [Enter] key.
The result is as follows.
InitialState
Procedure for creating initial state
In order to create InitialState,
- Click [Toolbox] -> [Activity] -> [InitialState]
button.
- And click at the position where InitialState will be placed in the
[main window]. Then a initial state is created.
FinalState
Procedure for creating final state
In order to create FinalState,
- Click [Toolbox] -> [Activity] -> [FinalState]
button.
- And click at the position where FinalState will be placed in the
[main window].
Decision
Semantics
A state diagram (and by derivation an activity diagram) expresses a decision
when guard conditions are used to indicate different possible transitions that
depend on Boolean conditions of the owning object.
Procedure for creating decision
In order to create Decision,
- Click [Toolbox] -> [Activity] -> [Decision]
button.
- And click at the position where Decision will be placed in the [main
window]. The decision is created on the diagram.
Procedure for creating decision from state
In order to create decision with incoming transition from selected object,
use shortcut creation syntax.
- Double-click state. At the quick dialog, enter
"-><>"("<-<>" for incoming from decision) string.
- Press [Enter] key and decision with outgoing transition from selected
state is created.
Flow Final
Procedure for creating flow final
In order to create Flow Final,
- Click [Toolbox] -> [Activity] -> [Flow Final] button.
- And click at the position where Flow Final will be placed in the
[main window].
Object Flow
Semantics
An object flow is one of two types of activity edges, which are directed
connection (flows) between activity nodes, the other being a control flow. As
soon as the activity node at the source (tail) end of the flow is finished it
presents tokens to the object flow at the target (arrowhead) end of the flow. An
object flow can only carry object (data) tokens; it cannot carry control tokens.
There are rules that specify whether tokens can flow along the object flow and
these are determined by the type of activity node at the source and target of
the flow. In the case of complete activities an object flow may define a weight,
which specifies the minimum number of tokens that must flow along the object
flow as a group.
Procedure for creating object flow
In order to create Object Flow,
- Click [Toolbox] -> [Activity] -> [Object Flow]
button.
- And click at the position where Object Flow will be placed in the
[main window]. Then the quick dialog of object flow state is shown as follows.
- At the quick dialog, enter the object flow state name and press [Enter]
key.
Synchronization
Procedure for creating synchronization bar
In order to create Synchronization,
- Click [Toolbox] -> [Activity] -> [Synchronization]
button.
- And click at the position where Synchronization will be placed in the
[main window] and drag as size as you want.
- The following figure shows the result of this procedure.
Signal Accept State
Semantics
The signal accept may be shown as a concave pentagon that looks like a
rectangle with a triangular notch in its side (either side). The signature of
the signal is shown inside the symbol. An unlabeled transition arrow is drawn
from the previous action state to the pentagon and another unlabeled transition
arrow is drawn from the pentagon to the next action state. A dashed arrow may be
drawn from an object symbol to the notch on the pentagon to show the sender of
the signal; this is optional.
Procedure for creating signal accept state
In order to create Signal Accept State,
- Click [Toolbox] -> [Activity] -> [Signal Accept State]
button.
- And click at the position where Signal Accept State will be placed in the
[main window].
- At the quick dialog, enter signal accept state name and press [Enter]
key.
Signal Send State
The sending of a signal may be shown as a convex pentagon that looks like a
rectangle with a triangular point on one side (either side). The signature of
the signal is shown inside the symbol. An unlabeled transition arrow is drawn
from the previous action state to the pentagon and another unlabeled transition
arrow is drawn from the pentagon to the next action state. A dashed arrow may be
drawn from the point on the pentagon to an object symbol to show the receiver of
the signal, this is optional.
Procedure for creating signal send state
In order to create Signal Send State,
- Click [Toolbox] -> [Activity] -> [Signal Send State]
button.
- And click at the position where Signal Send State will be placed in the
[main window]. A signal send state is created and the quick dialog is shown. Enter
signal send state name and press [Enter] key.
Transition
Procedure for creating transition
In order to create Transition,
- Click [Toolbox] -> [Activity] -> [Transition] button.
- Drag and drop between states in transition direction in the [main
window].
- Then the transition is created.
SelfTransition
Procedure for creating self-transition
In order to create self-transition,
- Click [Toolbox] -> [Activity] -> [SelfTransition]
button.
- Click state to have self-transition in the [main window]. Then a
self-transition is created.
Swimlane
Semantics
Actions and subactivities may be organized into swimlanes. Swimlanes are used
to organize responsibility for actions and subactivities. They often correspond
to organizational units in a business model.
Procedure for creating horizontal swimlane
In order to create Horizontal Swimlane,
- Click [Toolbox] -> [Activity] -> [Horizontal Swimlane] button.
- And drag the boundary where Horizontal Swimlane will be
placed in the [main window].
- Then a horizontal swimlane is created on the diagram. And enter the
swimlane name at the quick dialog and press [Enter] key.
Procedure for creating vertical swimlane
In order to create Vertical Swimlane,
- Click [Toolbox] -> [Activity] -> [Vertical Swimlane] button.
- And drag the boundary where Vertical Swimlane will be
placed in the [main window].
- A swimlane is created and quick dialog is shown. At the quick dialog,
enter the swimlane name and press [Enter] to have done this procedure.