Activity diagrams provide a way to model the workflow of a business process. You can also use activity diagrams to model code-specific information such as a class operation. Activity diagrams are very similar to a flowchart because you can model a workflow from activity to activity. An activity diagram is basically a special case of a state machine in which most of the states are activities and most of the transitions are implicitly triggered by completion of the actions in the source activities. The main difference between activity diagrams and statecharts is activity diagrams are activity centric, while statecharts are state centric. An activity diagram is typically used for modeling the sequence of activities in a process, whereas a statechart is better suited to model the discrete stages of an object’s lifetime.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Using Activity Diagrams
Activity diagrams can model many different types of workflows. For example, a company could use activity diagrams to model the flow for an approval of orders or to model the paper trail of invoices. An accounting firm could use activity diagrams to model any number of financial transactions. A software company could use activity diagrams to model a software development process.
Understanding Workflows:-
Each activity represents the performance of a group of actions in a workflow. Once the activity is complete, the flow of control moves to the next activity or state through a transition. If an outgoing transition is not clearly triggered by an event, then it is triggered by the completion of the contained actions inside the activity. A unique activity diagram feature is a swimlane that defines who or what is responsible for carrying out the activity or state. It is also possible to place objects on activity diagrams. The workflow stops when a transition reaches an end state.
You can attach activity diagrams to most model elements in the use case or logical views. Activity diagrams cannot reside within the component view.
Activity Diagram Tools:-
You can use the following tools on the activity diagram toolbox to model activity diagrams:
- A black circle is the standard notation for an initial state before an activity takes place. It can either stand alone or you can use a note to further elucidate the starting point.
- The black circle that looks like a selected radio button is the UML symbol for the end state of an activity. As shown in two examples above, notes can also be used to explain an end state.
- The activity symbols are the basic building blocks of an activity diagram and usually have a short description of the activity they represent.
- Arrows represent the direction flow of the flow chart. The arrow points in the direction of progressing activities.
- A join combines two concurrent activities back into a flow where only one activity is happening at a time.
- A fork splits one activity flow into two concurrent activities.
- Condition text is placed next to a decision marker to let you know under what condition an activity flow should split off in that direction.
- A marker shaped like a diamond is the standard symbol for a decision. There are always at least two paths coming out of a decision and the condition text lets you know which options are mutually exclusive.
- The final flow marker shows the ending point for a process in a flow. The difference between a final flow node and the end state node is that the latter represents the end of all flows in an activity.
- The shape used for notes.
-------------------------------------------
activity:-
An activity represents the performance of task or duty in a workflow. It may also represent the execution of a statement in a procedure. An activity is similar to a state, but expresses the intent that there is no significant waiting (for events) in an activity. Transitions connect activities with other model elements and object flows connect activities with objects.
--------------------------------------------------------------
decision:-
A decision represents a specific location on an activity diagram or statechart diagram where the workflow may branch based upon guard conditions. There may be more than two outgoing transitions with different guard conditions, but for the most part, a decision will have only two outgoing transitions determined by a Boolean expression.
--------------------------------------------------------------
end point:-
An end state represents a final or terminal state on an activity diagram or statechart diagram. Place an end state when you want to explicitly show the end of a workflow on an activity diagram or the end of a statechart diagram. Transitions can only occur into an end state; however, there can be any number of end states per context.
---------------------------------------------------------------------
Objects:-
Rational Rose allows objects on activity, collaboration, and sequence diagrams. Specific to activity diagrams, objects are model elements that represent something you can feel and touch. It might be helpful to think of objects as the nouns of the activity diagram and activities as the verbs of the activity diagram. Further, objects on activity diagrams allow you to diagram the input and output relationships between activities. In the following diagram, the Submit Defect and Fix Defects can be thought of as the verbs and the defect objects as the nouns in the activity diagram vocabulary. Objects are connected to activities through object flows.
-----------------------------------------------------------------------
start point:-
A start state (also called an "initial state") explicitly shows the beginning of a workflow on an activity diagram or the beginning of the execution of a state machine on a statechart diagram. You can have only one start state for each state machine because each workflow/execution of a state machine begins in the same place. If you use multiple activity and/or statechart diagrams to model a state machine, the same start state can be placed on the multiple diagrams. When you model nested states or nested activities, one new start state can be created in each context.
Normally, only one outgoing transition can be placed from the start state. However, multiple transitions may be placed on a start state if at least one of them is labeled with a condition. No incoming transitions are allowed.
------------------------------------------------------------------------
Sign up here with your email
ConversionConversion EmoticonEmoticon