Actions

Difference between revisions of "Activity Diagram"

m (The LinkTitles extension automatically added links to existing pages (https://github.com/bovender/LinkTitles).)
Line 1: Line 1:
In [[Unified Modeling Language (UML)]], an activity diagram is a graphical representation of an executed set of procedural [[system]] activities and considered a state chart diagram variation. Activity diagrams describe parallel and conditional activities, use cases and system functions at a detailed level. An activity diagram is used to [[model]] a large activity's sequential work flow by focusing on action sequences and respective action initiating conditions. The state of an activity relates to the performance of each [[workflow]] step. <ref>Definition - What does Activity Diagram mean? [https://www.techopedia.com/definition/27489/activity-diagram Techopedia]</ref>
+
In Unified Modeling Language (UML), an '''activity diagram''' is a graphical representation of an executed set of procedural system activities and is considered a state chart diagram variation. Activity diagrams describe parallel and conditional activities, use cases, and system functions at a detailed level. An activity diagram is used to model a large activity's sequential workflow by focusing on action sequences and respective action-initiating conditions. The state of activity relates to the performance of each workflow step. <ref>[https://www.techopedia.com/definition/27489/activity-diagram Definition - What does Activity Diagram mean?]</ref>
  
  
'''Purpose of Activity Diagrams'''<ref>Purpose of Activity Diagrams [https://www.tutorialspoint.com/uml/uml_activity_diagram.htm Tutorialspoint]</ref><br />
+
==Purpose of Activity Diagrams<ref>[https://www.tutorialspoint.com/uml/uml_activity_diagram.htm Purpose of Activity Diagrams]</ref> ==
The basic purposes of activity diagrams is similar to other four diagrams. It captures the dynamic behavior of the system. Other four diagrams are used to show the message flow from one object to another but activity diagram is used to show message flow from one activity to another. Activity is a particular operation of the system. Activity diagrams are not only used for visualizing the dynamic nature of a system, but they are also used to construct the executable system by using forward and reverse engineering techniques. The only missing thing in the activity diagram is the message part. It does not show any message flow from one activity to another. Activity diagram is sometimes considered as the flowchart. Although the diagrams look like a flowchart, they are not. It shows different flows such as parallel, branched, concurrent, and single.
+
The basic purposes of activity diagrams are similar to the other four diagrams. It captures the dynamic behavior of the system. The other four diagrams are used to show the message flow from one object to another but the activity diagram is used to show the message flow from one activity to another. Activity is a particular operation of the system. Activity diagrams are not only used for visualizing the dynamic nature of a system but they are also used to construct the executable system by using forward and reverse engineering techniques. The only missing thing in the activity diagram is the message part. It does not show any message flow from one activity to another. An activity diagram is sometimes considered a flowchart. Although the diagrams look like a flowchart, they are not. It shows different flows such as parallel, branched, concurrent, and single.
The purpose of an activity diagram can be described as
+
The purpose of an activity diagram can be described as
 
*Draw the activity flow of a system.
 
*Draw the activity flow of a system.
 
*Describe the sequence from one activity to another.
 
*Describe the sequence from one activity to another.
*Describe the parallel, branched and concurrent flow of the system.
+
*Describe the parallel, branched, and concurrent flow of the system.
  
  
'''Relationship to Other Diagrams'''<ref>Relationship to Other Diagrams [https://msdn.microsoft.com/en-us/library/dd409465.aspx MSDN]</ref><br />
+
== Relationship to Other Diagrams<ref>[https://msdn.microsoft.com/en-us/library/dd409465.aspxRelationship to Other Diagrams]</ref> ==
If you draw an activity diagram to describe a [[business]] [[process]], or a way in which users use your system, you can draw a use case diagram to show a different view of the same information. In the use case diagram, you draw actions as use cases. Give the use cases the same names as the corresponding actions. The advantages of the use case view are that you can:
+
If you draw an activity diagram to describe a business process or a way in which users use your system, you can draw a use case diagram to show a different view of the same information. In the use case diagram, you draw actions as use cases. Give the use cases the same names as the corresponding actions. The advantages of the use case view are that you can:
>Show in one diagram how larger actions/use cases are composed of smaller ones, using the Includes relation.
+
*Show in one diagram how larger actions/use cases are composed of smaller ones, using the Includes relation.
>Connect each action/use case explicitly to the users or external systems involved in its execution.
+
*Connect each action/use case explicitly to the users or external systems involved in its execution.
>Draw boundaries around the actions/use cases supported by your system, or each major component of it.
+
*Draw boundaries around the actions/use cases supported by your system, or each major component of it.
You can also draw an activity diagram to describe the detailed [[design]] of a [[software]] operation.
+
You can also draw an activity diagram to describe the detailed design of a software operation.<br />
In an activity diagram, you can show the flow of [[data]] passed between actions. But an activity diagram does not describe the structure of the data. For that purpose, you can draw a UML class diagram.  
+
In an activity diagram, you can show the flow of data passed between actions. But an activity diagram does not describe the structure of the data. For that purpose, you can draw a UML class diagram.  
  
  
'''Creating Activity Diagrams'''<ref>Creating Activity Diagrams [http://www.gentleware.com/fileadmin/media/archives/userguides/poseidon_users_guide/activitydiagram.html Gentleware]</ref><br />
+
== Creating Activity Diagrams<ref>[http://www.gentleware.com/fileadmin/media/archives/userguides/poseidon_users_guide/activitydiagram.html Creating Activity Diagrams]</ref> ==
Activity diagrams are an essential part of the modeling process. They are used to clarify complicated use cases, illustrate [[control]] among objects, or to show the logic of an [[algorithm]]. The UML 2.0 metamodel substantially refined and improved Activity diagrams; whereas the UML 1.4 Activity diagram was a subclass of State Machine, UML 2.0 defined a separate metamodel, making the diagram much more suited to the job of describing behavior. An Activity can have multiple diagrams. An activity diagram belongs to exactly one activity. The activities and diagrams are created differently based upon the element selected:
+
Activity diagrams are an essential part of the modeling process. They are used to clarify complicated use cases, illustrate control among objects, or show the logic of an algorithm. The UML 2.0 metamodel substantially refined and improved Activity diagrams; whereas the UML 1.4 Activity diagram was a subclass of State Machine, UML 2.0 defined a separate metamodel, making the diagram much more suited to the job of describing behavior. An Activity can have multiple diagrams. An activity diagram belongs to exactly one activity. The activities and diagrams are created differently based on the element selected:
*BehavioredClassifier Selected - When a BehavioredClassifier such as a class, a [[collaboration]], or a use case is selected, a new activity is created with the BehavioredClassifier as its owner. A new Activity Diagram is then created with the new activity as its parent.
+
*BehavioredClassifier Selected - When a BehavioredClassifier such as a class, a collaboration, or a use case is selected, a new activity is created with the BehavioredClassifier as its owner. A new Activity Diagram is then created with the new activity as its parent.
 
*Activity Selected - When an existing activity is selected, a new Activity Diagram is created with the selected activity as its parent.
 
*Activity Selected - When an existing activity is selected, a new Activity Diagram is created with the selected activity as its parent.
 
*CallAction Selected - When a CallAction is selected, a new activity is created with the same parent as the selected CallAction, and a new Activity Diagram is created for the new activity.
 
*CallAction Selected - When a CallAction is selected, a new activity is created with the same parent as the selected CallAction, and a new Activity Diagram is created for the new activity.
For Any Other [[Selection]] - A new collaboration is created in the namespace of the currently selected element, an activity is created within this collaboration, and an Activity Diagram is created for this activity.
+
For Any Other Selection - A new collaboration is created in the namespace of the currently selected element, an activity is created within this collaboration, and an Activity Diagram is created for this activity.
  
  
'''Basic Rules for Creating Activity Diagrams'''<ref>Basic Rules for Creating Activity Diagrams [http://www.modernanalyst.com/Careers/InterviewQuestions/tabid/128/ID/480/What-are-the-basic-elements-of-an-Activity-Diagram.aspx ModernAnalyst]</ref><br />
+
== Basic Rules for Creating Activity Diagrams<ref>[http://www.modernanalyst.com/Careers/InterviewQuestions/tabid/128/ID/480/What-are-the-basic-elements-of-an-Activity-Diagram.aspx Basic Rules for Creating Activity Diagrams]</ref> ==
 
UML defines a specific notation and set of rules for creating Activity Diagrams. The following are the most commonly used:
 
UML defines a specific notation and set of rules for creating Activity Diagrams. The following are the most commonly used:
 
*Initial Node - The initial node represents the starting point of the activity diagram.
 
*Initial Node - The initial node represents the starting point of the activity diagram.
Line 33: Line 33:
 
*Action Node - An action node is a type of activity node that represents a single action or behavior of the activity being modeled.
 
*Action Node - An action node is a type of activity node that represents a single action or behavior of the activity being modeled.
 
*Activity Edge - An activity edge creates a directed connection between two activity nodes.  It represents the path that a token can take between two activity nodes.
 
*Activity Edge - An activity edge creates a directed connection between two activity nodes.  It represents the path that a token can take between two activity nodes.
*Decision - A decision has one flow entering and several exiting.  The exiting flows each have a condition that must be met in order to traverse the flow.
+
*Decision - A decision has one flow entering and several exiting.  The exiting flows each has a condition that must be met in order to traverse the flow.
 
*Merge - A merge has several flows entering and one exiting.  The merge denotes that multiple parallel flows are merging at a single point.  Only one flow must reach the merge point in order to continue to traverse the flow to the next activity.
 
*Merge - A merge has several flows entering and one exiting.  The merge denotes that multiple parallel flows are merging at a single point.  Only one flow must reach the merge point in order to continue to traverse the flow to the next activity.
 
*Fork - A fork has one flow entering and several exiting.  A fork denotes that several processes are occurring in parallel.
 
*Fork - A fork has one flow entering and several exiting.  A fork denotes that several processes are occurring in parallel.
Line 40: Line 40:
  
  
'''UML Activity Diagram. Design Elements'''<ref>UML Activity Diagram: Design Elements [http://www.conceptdraw.com/How-To-Guide/uml-design-elements-activity ConceptDraw]</ref><br />
+
== UML Activity Diagram: Design Elements<ref>[http://www.conceptdraw.com/How-To-Guide/uml-design-elements-activity UML Activity Diagram: Design Elements]</ref> ==
UML Activity Diagram is a type of Behavior Diagrams that graphically describes decomposition of the some activity on the components. Activity Diagrams are used in modeling of business processes, technological processes, sequential and parallel computations. UML Activity Diagram allows to show the sequence, branching and synchronization of processes.
+
UML Activity Diagram is a type of Behavior Diagram that graphically describes the decomposition of some activity on the components. Activity Diagrams are used in the modeling of business processes, technological processes, and sequential and parallel computations. UML Activity Diagram allows showing the sequence, branching, and synchronization of processes.
 
To design UML Activity Diagrams use the following shape types:
 
To design UML Activity Diagrams use the following shape types:
 
*rounded rectangles to describe the actions;
 
*rounded rectangles to describe the actions;
Line 52: Line 52:
  
  
'''UML 1.x Activity diagram for a guided [[brainstorming]] process'''<br />
+
'''UML 1.x Activity diagram for a guided brainstorming process'''<br />
 
[[File: ActivityDiagram.png|300px|Activity Diagram]]<br />
 
[[File: ActivityDiagram.png|300px|Activity Diagram]]<br />
source: [https://en.wikipedia.org/wiki/Activity_diagram Wikipedia]
+
source: Wikipedia
  
  
'''Activity Diagram: Documenting Business Use Cases'''<ref>Activity Diagram: Documenting Business Use Cases [https://www.ibm.com/developerworks/rational/library/2802.html IBM]</ref><br />
+
== Activity Diagram: Documenting Business Use Cases'''<ref>[https://www.ibm.com/developerworks/rational/library/2802.html Activity Diagram: Documenting Business Use Cases]</ref> ==
Background: A business use-case model describes the processes of a business and their interactions with external parties like customers and partners. The processes of the business are represented as business use cases, and the external parties are represented as business actors. Describing a business use case includes, among other things, giving it a name, a brief description, defining its performance [[goals]], and its workflow. The most time-important and time-consuming aspect to describe is the workflow. Which comes first, the activity diagram or the textual description of the workflow? This is somewhat dependent on how you are used to working, and whether you "think graphically" or not. Some prefer to outline the structure visually in a diagram first, and then develop the details in the text. Others start with a bulleted list of the activity states first, and agree on those (like a step-by-step outline to the use case), then define the structure using a diagram. A valid question is also whether you really need both the textual document and the diagram. The activity diagram technique allows you to write brief descriptions of each activity state, which should make the textual specification of the workflow obsolete. Here, you need to be sensitive to your audience and the format in which they expect the specification. To understand what an activity diagram adds to the understanding of a workflow, we present a sample workflow description, and then an activity diagram for that workflow (Figure Below). This example is a proposal process, taken from an [[organization]] that sells telecom [[network]] solutions, individually configured to each [[customer]]. We have simplified the example by removing the detailed text in most of the subsections, but tried to keep enough so you can understand the structure of the workflow.  
+
Background: A business use-case model describes the processes of a business and their interactions with external parties like customers and partners. The processes of the business are represented as business use cases, and the external parties are represented as business actors. Describing a business use case includes, among other things, giving it a name, a brief description, defining its performance goals, and its workflow. The most time-important and time-consuming aspect to describe is the workflow. Which comes first, the activity diagram or the textual description of the workflow? This is somewhat dependent on how you are used to working, and whether you "think graphically" or not. Some prefer to outline the structure visually in a diagram first and then develop the details in the text. Others start with a bulleted list of the activity states first and agree on those (like a step-by-step outline of the use case), then define the structure using a diagram. A valid question is also whether you really need both the textual document and the diagram. The activity diagram technique allows you to write brief descriptions of each activity state, which should make the textual specification of the workflow obsolete. Here, you need to be sensitive to your audience and the format in which they expect the specification. To understand what an activity diagram adds to the understanding of a workflow, we present a sample workflow description, and then an activity diagram for that workflow (Figure Below). This example is a proposal process, taken from an organization that sells telecom network solutions, individually configured to each customer. We have simplified the example by removing the detailed text in most of the subsections but tried to keep enough so you can understand the structure of the workflow.  
  
  
 
'''An Activity Diagram for the Business Use Case Proposal Process'''<br />
 
'''An Activity Diagram for the Business Use Case Proposal Process'''<br />
 
[[File: ActivityDiagram1.gif |300px|Business Use Case Activity Diagram]]<br />
 
[[File: ActivityDiagram1.gif |300px|Business Use Case Activity Diagram]]<br />
source: [https://www.ibm.com/developerworks/rational/library/2802.html IBM]
+
source: IBM
  
  
'''Advantages and Disadvantages of using Activity Diagrams'''<ref>What are the advantages and disadvantages of using activity diagrams? [http://www.modernanalyst.com/Resources/Articles/tabid/115/ID/1830/An-Introduction-to-Activity-Diagrams.aspx modernanalyst.com]</ref><br />
+
== Advantages and Disadvantages of using Activity Diagrams<ref>[http://www.modernanalyst.com/Resources/Articles/tabid/115/ID/1830/An-Introduction-to-Activity-Diagrams.aspxWhat are the advantages and disadvantages of using activity diagrams?]</ref> ==
*Activity diagrams' advantages include that they are typically easily comprehensible for both analysts and stakeholders. According to Podeswa in UML for the IT Business Analyst, "The activity diagram is the one most useful to the IT BA for depicting workflow [because] it is simple to understand for both for BAs and end-users."  Because they are among the most user-friendly diagrams available, they are generally regarded as an essential tool in an analyst's repertoire.
+
*Activity diagrams' advantages include that they are typically easily comprehensible for both analysts and stakeholders. According to Podeswa in UML for the IT Business Analyst, "The activity diagram is the one most useful to the IT BA for depicting work flow [because] it is simple to understand for both for BAs and end-users."  Because they are among the most user-friendly diagrams available, they are generally regarded as an essential tool in an analyst's repertoire.
 
*Additionally, as stated above, activity diagrams allow an analyst to display multiple conditions and actors within a workflow through the use of swimlanes. Swimlanes, however, are optional as a single condition or actor is normally displayed without them.
 
*Additionally, as stated above, activity diagrams allow an analyst to display multiple conditions and actors within a workflow through the use of swimlanes. Swimlanes, however, are optional as a single condition or actor is normally displayed without them.
*Their disadvantages include that they have the potential to become overly complex because their user-friendly nature may lend itself to an all-inclusive description. In other words, since it is so simple to display the information related to the project, why not include all of it? When an analyst has a large project, creating a single, overly complex diagram can be a temptation. But as one author notes, "if you are using activity diagrams to define the structure of a workflow, you should not attempt to explore several levels of activity graphs down to their most ‘atomic' level.'" Instead, an analyst should try to present a new diagram for each workflow, or if more applicable, to use swimlanes to present different actors within the same workflow.  
+
*Their disadvantages include that they have the potential to become overly complex because their user-friendly nature may lend itself to an all-inclusive description. In other words, since it is so simple to display the information related to the project, why not include all of it? When an analyst has a large project, creating a single, overly complex diagram can be a temptation. But as one author notes, "if you are using activity diagrams to define the structure of a workflow, you should not attempt to explore several levels of activity graphs down to their most ‘atomic' level.'" Instead, an analyst should try to present a new diagram for each workflow, or if more applicable, use swimlanes to present different actors within the same workflow.  
 
*Another aspect of activity diagrams is that they may not be used in lieu of a state diagram or sequence diagram because "activity diagrams do not give detail about how objects behave or how objects collaborate." This is not a disadvantage per se, but it is important for an analyst to keep in mind when applying diagrams to their work.
 
*Another aspect of activity diagrams is that they may not be used in lieu of a state diagram or sequence diagram because "activity diagrams do not give detail about how objects behave or how objects collaborate." This is not a disadvantage per se, but it is important for an analyst to keep in mind when applying diagrams to their work.
  
Line 76: Line 76:
  
  
===References===
+
== See Also ==
 +
[[Flow Chart]]
 +
 
 +
 
 +
== References ==
 
<references/>
 
<references/>
  
  
===Further Reading===
+
== Further Reading ==
*Workflow Modeling With UML Activity Diagrams [https://www.batimes.com/articles/workflow-modeling-with-uml-activity-diagrams.html BA Times]
+
*[https://www.batimes.com/articles/workflow-modeling-with-uml-activity-diagrams.html Workflow Modeling With UML Activity Diagrams]
*Activity Diagrams : A Formal [[Framework]] to Model Business Processes and Code Generation [http://www.jot.fm/issues/issue_2009_01/article3.pdfThe Journal of Object Technology]
+
*[http://www.jot.fm/issues/issue_2009_01/article3.pdf Activity Diagrams: A Formal Framework to Model Business Processes and Code Generation]
*Using Activity Diagrams to Model [[Systems Analysis]] Techniques: Teaching What We Preach [https://www.questia.com/library/journal/1G1-352490183/using-activity-diagrams-to-model-systems-analysis Questia]
+
*[https://www.questia.com/library/journal/1G1-352490183/using-activity-diagrams-to-model-systems-analysis Using Activity Diagrams to Model Systems Analysis Techniques: Teaching What We Preach]
*A Framework for Modeling and Analysis UML Activity Diagram using Graph Transformation [http://www.sciencedirect.com/science/article/pii/S1877050915017421 ScienceDirect]
+
*[http://www.sciencedirect.com/science/article/pii/S1877050915017421 A Framework for Modeling and Analysis UML Activity Diagram using Graph Transformation]
*Case Report: Activity Diagrams for Integrating Electronic Prescribing Tools into Clinical Workflow [https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1513671/ NCBI]
+
*[https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1513671/ Case Report: Activity Diagrams for Integrating Electronic Prescribing Tools into Clinical Workflow]
 +
__NOTOC__

Revision as of 19:17, 17 January 2023

In Unified Modeling Language (UML), an activity diagram is a graphical representation of an executed set of procedural system activities and is considered a state chart diagram variation. Activity diagrams describe parallel and conditional activities, use cases, and system functions at a detailed level. An activity diagram is used to model a large activity's sequential workflow by focusing on action sequences and respective action-initiating conditions. The state of activity relates to the performance of each workflow step. [1]


Purpose of Activity Diagrams[2]

The basic purposes of activity diagrams are similar to the other four diagrams. It captures the dynamic behavior of the system. The other four diagrams are used to show the message flow from one object to another but the activity diagram is used to show the message flow from one activity to another. Activity is a particular operation of the system. Activity diagrams are not only used for visualizing the dynamic nature of a system but they are also used to construct the executable system by using forward and reverse engineering techniques. The only missing thing in the activity diagram is the message part. It does not show any message flow from one activity to another. An activity diagram is sometimes considered a flowchart. Although the diagrams look like a flowchart, they are not. It shows different flows such as parallel, branched, concurrent, and single. The purpose of an activity diagram can be described as

  • Draw the activity flow of a system.
  • Describe the sequence from one activity to another.
  • Describe the parallel, branched, and concurrent flow of the system.


Relationship to Other Diagrams[3]

If you draw an activity diagram to describe a business process or a way in which users use your system, you can draw a use case diagram to show a different view of the same information. In the use case diagram, you draw actions as use cases. Give the use cases the same names as the corresponding actions. The advantages of the use case view are that you can:

  • Show in one diagram how larger actions/use cases are composed of smaller ones, using the Includes relation.
  • Connect each action/use case explicitly to the users or external systems involved in its execution.
  • Draw boundaries around the actions/use cases supported by your system, or each major component of it.

You can also draw an activity diagram to describe the detailed design of a software operation.
In an activity diagram, you can show the flow of data passed between actions. But an activity diagram does not describe the structure of the data. For that purpose, you can draw a UML class diagram.


Creating Activity Diagrams[4]

Activity diagrams are an essential part of the modeling process. They are used to clarify complicated use cases, illustrate control among objects, or show the logic of an algorithm. The UML 2.0 metamodel substantially refined and improved Activity diagrams; whereas the UML 1.4 Activity diagram was a subclass of State Machine, UML 2.0 defined a separate metamodel, making the diagram much more suited to the job of describing behavior. An Activity can have multiple diagrams. An activity diagram belongs to exactly one activity. The activities and diagrams are created differently based on the element selected:

  • BehavioredClassifier Selected - When a BehavioredClassifier such as a class, a collaboration, or a use case is selected, a new activity is created with the BehavioredClassifier as its owner. A new Activity Diagram is then created with the new activity as its parent.
  • Activity Selected - When an existing activity is selected, a new Activity Diagram is created with the selected activity as its parent.
  • CallAction Selected - When a CallAction is selected, a new activity is created with the same parent as the selected CallAction, and a new Activity Diagram is created for the new activity.

For Any Other Selection - A new collaboration is created in the namespace of the currently selected element, an activity is created within this collaboration, and an Activity Diagram is created for this activity.


Basic Rules for Creating Activity Diagrams[5]

UML defines a specific notation and set of rules for creating Activity Diagrams. The following are the most commonly used:

  • Initial Node - The initial node represents the starting point of the activity diagram.
  • Activity Final Node - The activity final node represents the termination point of the activity.
  • Action Node - An action node is a type of activity node that represents a single action or behavior of the activity being modeled.
  • Activity Edge - An activity edge creates a directed connection between two activity nodes. It represents the path that a token can take between two activity nodes.
  • Decision - A decision has one flow entering and several exiting. The exiting flows each has a condition that must be met in order to traverse the flow.
  • Merge - A merge has several flows entering and one exiting. The merge denotes that multiple parallel flows are merging at a single point. Only one flow must reach the merge point in order to continue to traverse the flow to the next activity.
  • Fork - A fork has one flow entering and several exiting. A fork denotes that several processes are occurring in parallel.
  • Join - A join has several flows entering it and one exiting it. A join denotes that multiple parallel flows are merging at a single point. All flows going into the join must be completed before the next activity can start.

There are others, but these eight symbols constitute the basic notation used by nearly every Activity Diagram.


UML Activity Diagram: Design Elements[6]

UML Activity Diagram is a type of Behavior Diagram that graphically describes the decomposition of some activity on the components. Activity Diagrams are used in the modeling of business processes, technological processes, and sequential and parallel computations. UML Activity Diagram allows showing the sequence, branching, and synchronization of processes. To design UML Activity Diagrams use the following shape types:

  • rounded rectangles to describe the actions;
  • diamonds to describe decisions;
  • bars to represent the start or end of the activities that occur at the same time;
  • black circle to indicate the start of the workflow;
  • encircled black circle to indicate the end of the workflow;
  • arrows to represent the order in which activities happen.

Activity Diagrams were a specialized form of the State Diagrams in UML 1.x. In UML 2.x, the Activity Diagrams were reformed and now are based on Petri net-like semantics that allows to model a lot more situations.


UML 1.x Activity diagram for a guided brainstorming process
Activity Diagram
source: Wikipedia


Activity Diagram: Documenting Business Use Cases[7]

Background: A business use-case model describes the processes of a business and their interactions with external parties like customers and partners. The processes of the business are represented as business use cases, and the external parties are represented as business actors. Describing a business use case includes, among other things, giving it a name, a brief description, defining its performance goals, and its workflow. The most time-important and time-consuming aspect to describe is the workflow. Which comes first, the activity diagram or the textual description of the workflow? This is somewhat dependent on how you are used to working, and whether you "think graphically" or not. Some prefer to outline the structure visually in a diagram first and then develop the details in the text. Others start with a bulleted list of the activity states first and agree on those (like a step-by-step outline of the use case), then define the structure using a diagram. A valid question is also whether you really need both the textual document and the diagram. The activity diagram technique allows you to write brief descriptions of each activity state, which should make the textual specification of the workflow obsolete. Here, you need to be sensitive to your audience and the format in which they expect the specification. To understand what an activity diagram adds to the understanding of a workflow, we present a sample workflow description, and then an activity diagram for that workflow (Figure Below). This example is a proposal process, taken from an organization that sells telecom network solutions, individually configured to each customer. We have simplified the example by removing the detailed text in most of the subsections but tried to keep enough so you can understand the structure of the workflow.


An Activity Diagram for the Business Use Case Proposal Process
Business Use Case Activity Diagram
source: IBM


Advantages and Disadvantages of using Activity Diagrams[8]

  • Activity diagrams' advantages include that they are typically easily comprehensible for both analysts and stakeholders. According to Podeswa in UML for the IT Business Analyst, "The activity diagram is the one most useful to the IT BA for depicting work flow [because] it is simple to understand for both for BAs and end-users." Because they are among the most user-friendly diagrams available, they are generally regarded as an essential tool in an analyst's repertoire.
  • Additionally, as stated above, activity diagrams allow an analyst to display multiple conditions and actors within a workflow through the use of swimlanes. Swimlanes, however, are optional as a single condition or actor is normally displayed without them.
  • Their disadvantages include that they have the potential to become overly complex because their user-friendly nature may lend itself to an all-inclusive description. In other words, since it is so simple to display the information related to the project, why not include all of it? When an analyst has a large project, creating a single, overly complex diagram can be a temptation. But as one author notes, "if you are using activity diagrams to define the structure of a workflow, you should not attempt to explore several levels of activity graphs down to their most ‘atomic' level.'" Instead, an analyst should try to present a new diagram for each workflow, or if more applicable, use swimlanes to present different actors within the same workflow.
  • Another aspect of activity diagrams is that they may not be used in lieu of a state diagram or sequence diagram because "activity diagrams do not give detail about how objects behave or how objects collaborate." This is not a disadvantage per se, but it is important for an analyst to keep in mind when applying diagrams to their work.


In conclusion, activity diagrams are fairly easy to get the hang of, and will be useful for most projects because they "simply and quite plainly show how things work." Unlike many diagramming techniques, activity diagrams also enable the depiction of multiple choices and actors within a workflow, and they are easy for even non-technical users to follow.


See Also

Flow Chart


References


Further Reading