SlideShare une entreprise Scribd logo
1  sur  7
Télécharger pour lire hors ligne
Advance Software Engineering                                                          UML Diagram


                                                   LAB # 05


Objective:
    •    To understand Activity Diagram.


The Activity Diagram
The purpose of the activity diagram is to model the procedural flow of actions that are part of a
larger activity. In projects in which use cases are present, activity diagrams can model a specific
use case at a more detailed level. However, activity diagrams can be used independently of use
cases for modeling a business-level function, it models procedural flow, the activity diagram
focuses on the action sequence of execution and the conditions that trigger or guard those
actions. The activity diagram is also focused only on the activity's internal actions and not on the
actions that call the activity in their process flow or that trigger the activity according to some
event.
Although UML sequence diagrams can protray the same information as activity diagrams, but
activity diagrams show all potential sequence flows in an activity, whereas a sequence diagram
typically shows only one flow of an activity.

The basics
Consider the action element in an activity diagram, whose official UML name is action state. An
action is indicated on the activity diagram by a "capsule" shape. The text inside it indicates the
action (e.g., Customer Calls Ticket Office or Registration Office Opens).
Figure 1: A sample action that is part of an activity diagram.



Because activity diagrams show a sequence of actions, they must indicate the starting point of
the sequence. The initial state is drawn as a solid circle with a transition line (arrow) that
connects it to the first action in the activity's sequence of actions. Figure 2 shows what an
activity diagram's initial state looks like.




It is important to note that there can be only one initial state on an activity diagram and only one

                                                                                                  1
Advance Software Engineering                                                             UML Diagram


transition line connecting the initial state to an action. Although it may seem obvious that an
activity can have only one initial state, there are certain circumstances -- namely, the
commencement of asynchronous action sequences -- that may suggest that a new initial state
should be indicated in the activity diagram. UML does not allow this. Figure 3 offers an example
of an incorrect activity diagram, because the initial state has two transition lines that point to two
activities.
Figure 3: Incorrect rendering of an initial state within an activity
diagram. The initial state can indicate only ONE action.




The activity's flow terminates when the transition line of the last action in the sequence connects
to a "final state" symbol, which is a bullseye (a circle surrounding a smaller solid circle).

Beyond the basics
Activities modeled for real software development projects include decision points that control
what actions take place. And sometimes activities have parallel actions.


Decision points
Typically, decisions need to be made throughout an activity, depending on the outcome of a
specific prior action. In creating the activity diagram for such cases, you might need to model
two or more different sequences of actions. The UML specification provides two ways to model
decisions like this. The first way is to show a single transition line coming out of an action and
connecting to a decision point. The UML specification name for a decision point is decision, and
it is drawn as a diamond on an activity diagram. Since a decision will have at least two different
outcomes, the decision symbol will have multiple
transition lines connecting to different actions. Figure 5
shows a fragment of a sample activity diagram with a
decision.


Figure 5: A decision point models a choice that must be made
within the sequence of actions.




                                                                                                     2
Advance Software Engineering                                                          UML Diagram


As shown in Figure 5, each transition line involved in a decision point must be labeled with text
above it to indicate "guard conditions," commonly abbreviated as guards. Guard condition text is
always placed in brackets -- for example, [guard condition text]. A guard condition explicitly
tells when to follow a transition line to the next action. According to the decision point shown in
Figure 5, a bartender (user) only needs to "make sure the customer is at least 21 years old" when
the customer orders an alcoholic drink. If the customer orders any other type of drink (the "else"
condition), then the bartender simply gets the drink for the customer. The [else] guard is
commonly used in activity diagrams to mean "if none of the other guarded transition lines
matches the actual condition," then follow the [else] transition line.


Merge points
Sometimes the procedural flow from one decision path may connect back to another decision
path, as shown in Figure 6 at the "Customer's Age > = 21" condition. In these cases, we connect
two or more action paths together using the same diamond icon with multiple paths pointing to
it, but with only one transition line coming out of it. This does not indicate a decision point, but
rather a merge.
Figure 6 shows the same decision as in Figure 5, but Figure 6 expands the activity diagram.
Performing a check of the customer's age leads the user to a second decision: If the customer is
younger than 21, the bartender must tell the customer to order another non-alcoholic drink,
which takes our sequence back to the action "Customer Orders Drink." However, if the customer
is 21 years old or older, then our action sequence takes take us to the same action the bartender
would follow if the person had ordered a non-alcoholic drink: "Get Drink For Customer."

Figure 6: A partial activity diagram, showing
two decision points
("Drink is alcoholic" and "Customer's age <
21") and one merge
("else" and "Customer's age >= 21")




                                                                                                  3
Advance Software Engineering                                                                        UML Diagram



Synch states for asynchronous actions
When modeling activities, you sometimes need to show that certain action sequences can be
done in parallel, or asynchronously. A special notation element allows you to show parallel
action sequences, or synch states. To be clear, a synch state that forks actions into two or more
threads represents a de-synchronizing of the flow (asynchronous actions), and a synch state that
joins actions back together represents a return to synchronized flow. A synch state is drawn as a
thick, solid line with transition lines coming into it from the left (usually) and out of it on the
right (usually). To draw a synch state that forks the action sequence into multiple threads, first
connect a transition line from the action preceding the parallel sequence to the synch state. Then
draw two transition lines coming out of the synch state, each connecting to its own action. Figure
9 is an activity diagram fragment that shows the forking of execution modeled.



                                            Figure 9: A thick, solid line indicates a synch state, allowing two or
                                            more action sequences to proceed in parallel.




                                                                                                                     4
Advance Software Engineering                                                           UML Diagram


Swim lanes
In activity diagrams, it is often useful to model the activity's procedural flow of control between
the objects (persons, organizations, or other responsible entities) that actually execute the action.
To do this, you can add swim lanes to the activity diagram (swim lanes are named for their
resemblance to the straight-line boundaries between two or more competitors at a swim meet).
To put swim lanes on an activity diagram, use vertical columns. For each object that executes
one or more actions, assign a column its name, placed at the top of the column. Then place each
action associated with an object in that object's swim
lane. Figure 12 shows that two objects execute actions
(e.g., Band Manager and Reporting Tool). The Band
Manager object executes the "Selects the View Sales For
My Band Report" action, and the Reporting Tool
executes the "Retrieve Bands the Band Manager
Manages" action. It is important to note that, although
using swimlanes improves the clarity of an activity
diagram (since all the activities are placed in the
swimlanes of their respective executor objects), all the previously mentioned rules governing
activity diagrams still hold true. In other words, you read the activity diagram just like you would
if no swimlanes were used.




                                                                                                   5
Advance Software Engineering                                                                              UML Diagram


                                          Task TO Be Performed……


Task # 01 : When I order Chinese food for delivery, I call the Chinese food delivery guy, give him

my phone number, and his computer will automatically display my address if I've ordered food
before. But if I'm a new customer calling for the first time, he must get my address before he
takes my order.


Task# 02 : Below an activity diagram is shown. Give an interpretation of the diagram.




Task# 03 : Eastern State University (ESU) Background
The ESU course registration problem will be used as an example throughout this book. The process of assigning
professors to courses and the registration of students is a frustrating and time consuming experience. After the
professors of ESU have decided which courses they are going to teach for the semester, the Registrar's office enters
the information into the computer system. A batch report is printed for the professors indicating which courses they
will teach. A course catalog is printed and distributed to the students. The students currently fill out (mulitpart,
multicolor) registration forms that indicate their choice in courses, and return the completed forms to the Registrar's
office. The typical student load is four courses. The staff of the Registrar's office then enters the students' forms into
the mainframe computer system. Once the students' curriculum for the semester has been entered, a batch job is run
overnight to assign students to courses. Most of the time the students get their first choice; however, in those cases
where there is a conflict, the Registrar's office talks with each student to get additional choices. Once all the students
have been successfully assigned to courses, a hard copy of the students' schedule is sent to the students for their




                                                                                                                        6
Advance Software Engineering                                                                          UML Diagram


verification. Most student registrations are processed within a week, but some exceptional cases take up to two
weeks to solve. Once the initial registration period is completed, professors receive a student roster for each course
they are scheduled to teach. Draw an activity diagram for the senerio described above.


Task # 04 Draw an activity diagram models the business process of enrolling in a university, takes this approach. A
student gets enrolled in the university if the form filled is correct otherwise a help system is available. If student
successfully get enrolled in the university he/she can attend classes can enrolled in the seminar committee and need
to pay library fee as well.


Task # 05 Create an activity diagram describing the process of a person (user) using the machine to buy a ticket
from Hamburg to Lübeck. Actually, the machine only takes coins (no credit cards, debit cards).


Task # 06 Create a sequence diagram for the following collaboration. Use the classes and methods on the next slide.
A customer wants to draw money from his bank account. He enters his card into an ATM (automated teller
machine). The ATM machine prompts „Enter PIN“. The customer enters his PIN. The ATM (internally) retrieves
the bank account number from the card. The ATM encrypts the PIN and the account number and sends it over to the
bank. The bank verifies the encrypted Account and PIN number. If the PIN number is correct, the ATM displays
„Enter amount“, draws money from the bank account and pays out the amount.(Use Swimlanes)




                                                                                                                    7

Contenu connexe

Tendances

Interaction Modeling
Interaction ModelingInteraction Modeling
Interaction ModelingHemant Sharma
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramNikhil Pandit
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to umlTony Huynh
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagramsbarney92
 
An Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsAn Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsMohammed Misbhauddin
 
Intro to UML 2
Intro to UML 2Intro to UML 2
Intro to UML 2rchakra
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsAmr E. Mohamed
 
3. use cases
3. use cases3. use cases
3. use casesAPU
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction DiagramNiloy Rocker
 
SAD11 - Sequence Diagrams
SAD11 - Sequence DiagramsSAD11 - Sequence Diagrams
SAD11 - Sequence DiagramsMichael Heron
 
Interaction overview and Profile UML Diagrams
Interaction overview and Profile UML DiagramsInteraction overview and Profile UML Diagrams
Interaction overview and Profile UML DiagramsHusnain Safdar
 

Tendances (20)

Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Interaction Modeling
Interaction ModelingInteraction Modeling
Interaction Modeling
 
Use case Diagram and Sequence Diagram
Use case Diagram and Sequence DiagramUse case Diagram and Sequence Diagram
Use case Diagram and Sequence Diagram
 
An introduction to uml
An introduction to umlAn introduction to uml
An introduction to uml
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
An Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence DiagramsAn Automatic Approach to Translate Use Cases to Sequence Diagrams
An Automatic Approach to Translate Use Cases to Sequence Diagrams
 
Intro to UML 2
Intro to UML 2Intro to UML 2
Intro to UML 2
 
SE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour DiagramsSE_Lec 09_ UML Behaviour Diagrams
SE_Lec 09_ UML Behaviour Diagrams
 
Interaction overview & Timing diagram
Interaction overview & Timing diagramInteraction overview & Timing diagram
Interaction overview & Timing diagram
 
Lab 2
Lab 2Lab 2
Lab 2
 
3. use cases
3. use cases3. use cases
3. use cases
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
 
SAD11 - Sequence Diagrams
SAD11 - Sequence DiagramsSAD11 - Sequence Diagrams
SAD11 - Sequence Diagrams
 
Uml
UmlUml
Uml
 
UML
UMLUML
UML
 
Interaction overview and Profile UML Diagrams
Interaction overview and Profile UML DiagramsInteraction overview and Profile UML Diagrams
Interaction overview and Profile UML Diagrams
 
Uml 9
Uml 9Uml 9
Uml 9
 
UML
UMLUML
UML
 
Uml2
Uml2Uml2
Uml2
 

En vedette (6)

[0201699613]visual modeling with rational rose 2000 and uml
[0201699613]visual modeling with rational rose 2000 and uml[0201699613]visual modeling with rational rose 2000 and uml
[0201699613]visual modeling with rational rose 2000 and uml
 
Guidance 2010 ada_standards_prt
Guidance 2010 ada_standards_prtGuidance 2010 ada_standards_prt
Guidance 2010 ada_standards_prt
 
Ada Power Point by Jessica Gorman, NCIDQ
Ada Power Point by Jessica Gorman, NCIDQAda Power Point by Jessica Gorman, NCIDQ
Ada Power Point by Jessica Gorman, NCIDQ
 
Dumb & Deaf School
Dumb & Deaf SchoolDumb & Deaf School
Dumb & Deaf School
 
State diagram railway reservation system
State diagram railway reservation systemState diagram railway reservation system
State diagram railway reservation system
 
Handicap care
Handicap careHandicap care
Handicap care
 

Similaire à Lab # 05

software engineering with uml- activity diagram
software engineering with uml- activity diagramsoftware engineering with uml- activity diagram
software engineering with uml- activity diagramrahmantoyuri
 
Activity diagram model
Activity diagram modelActivity diagram model
Activity diagram modelahmed zewita
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering Madhar Khan Pathan
 
Use Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling NotationUse Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling NotationLeslie Munday
 
Activity Diagram
Activity DiagramActivity Diagram
Activity DiagramAshesh R
 
SAD09 - Activity Diagrams
SAD09 - Activity DiagramsSAD09 - Activity Diagrams
SAD09 - Activity DiagramsMichael Heron
 
ACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptxACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptxdevboris1
 
Activity Diagram Examples by Creately
Activity Diagram Examples by Creately Activity Diagram Examples by Creately
Activity Diagram Examples by Creately Creately
 
Lecture 19...unit 3.....se
Lecture 19...unit 3.....seLecture 19...unit 3.....se
Lecture 19...unit 3.....sePraveen Nelapati
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagramsMir Majid
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSAshita Agrawal
 
Case tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick RajaCase tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick RajaursKarthick Raja
 
Introduction tobpmn 15 02
Introduction tobpmn 15 02Introduction tobpmn 15 02
Introduction tobpmn 15 02gtiprotec
 

Similaire à Lab # 05 (20)

software engineering with uml- activity diagram
software engineering with uml- activity diagramsoftware engineering with uml- activity diagram
software engineering with uml- activity diagram
 
Activity Diagram part8
Activity Diagram part8Activity Diagram part8
Activity Diagram part8
 
Activity diagram model
Activity diagram modelActivity diagram model
Activity diagram model
 
Activity
ActivityActivity
Activity
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
Use Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling NotationUse Case and Activity Diagrams Modeling Notation
Use Case and Activity Diagrams Modeling Notation
 
Activity Diagram
Activity DiagramActivity Diagram
Activity Diagram
 
SAD09 - Activity Diagrams
SAD09 - Activity DiagramsSAD09 - Activity Diagrams
SAD09 - Activity Diagrams
 
Uml examples
Uml examplesUml examples
Uml examples
 
UML.pptx
UML.pptxUML.pptx
UML.pptx
 
ACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptxACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptx
 
Activity Diagram Examples by Creately
Activity Diagram Examples by Creately Activity Diagram Examples by Creately
Activity Diagram Examples by Creately
 
Lecture 19...unit 3.....se
Lecture 19...unit 3.....seLecture 19...unit 3.....se
Lecture 19...unit 3.....se
 
Use case diagrams
Use case diagramsUse case diagrams
Use case diagrams
 
SubirTarea.pdf
SubirTarea.pdfSubirTarea.pdf
SubirTarea.pdf
 
INTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMSINTRODUCTION TO UML DIAGRAMS
INTRODUCTION TO UML DIAGRAMS
 
Case tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick RajaCase tool lab-Reg2013 by Karthick Raja
Case tool lab-Reg2013 by Karthick Raja
 
Lecture 4.pdf
Lecture 4.pdfLecture 4.pdf
Lecture 4.pdf
 
Introduction tobpmn 15 02
Introduction tobpmn 15 02Introduction tobpmn 15 02
Introduction tobpmn 15 02
 
Behavioural modelling
Behavioural modellingBehavioural modelling
Behavioural modelling
 

Plus de Mr SMAK

Fyp list batch-2009 (project approval -rejected list)
Fyp list batch-2009 (project approval -rejected list)Fyp list batch-2009 (project approval -rejected list)
Fyp list batch-2009 (project approval -rejected list)Mr SMAK
 
Assigments2009
Assigments2009Assigments2009
Assigments2009Mr SMAK
 
Evaluation of cellular network
Evaluation of cellular networkEvaluation of cellular network
Evaluation of cellular networkMr SMAK
 
Common protocols
Common protocolsCommon protocols
Common protocolsMr SMAK
 
Cellular network
Cellular networkCellular network
Cellular networkMr SMAK
 
Lecture 6.1
Lecture  6.1Lecture  6.1
Lecture 6.1Mr SMAK
 
Lecture 6
Lecture  6Lecture  6
Lecture 6Mr SMAK
 
Parallel architecture
Parallel architectureParallel architecture
Parallel architectureMr SMAK
 
Lecture 3
Lecture 3Lecture 3
Lecture 3Mr SMAK
 
Lecture 2
Lecture 2Lecture 2
Lecture 2Mr SMAK
 
Lecture 1
Lecture 1Lecture 1
Lecture 1Mr SMAK
 
Lecture 6
Lecture  6Lecture  6
Lecture 6Mr SMAK
 
Lecture 6.1
Lecture  6.1Lecture  6.1
Lecture 6.1Mr SMAK
 
Chapter 2 ASE
Chapter 2 ASEChapter 2 ASE
Chapter 2 ASEMr SMAK
 
Structure of project plan and schedule
Structure of project plan and scheduleStructure of project plan and schedule
Structure of project plan and scheduleMr SMAK
 
Proposal format
Proposal formatProposal format
Proposal formatMr SMAK
 
Proposal announcement batch2009
Proposal announcement batch2009Proposal announcement batch2009
Proposal announcement batch2009Mr SMAK
 
List ofsuparco projectsforuniversities
List ofsuparco projectsforuniversitiesList ofsuparco projectsforuniversities
List ofsuparco projectsforuniversitiesMr SMAK
 
Fyp timeline & assessment policy batch 2009
Fyp timeline & assessment policy batch 2009Fyp timeline & assessment policy batch 2009
Fyp timeline & assessment policy batch 2009Mr SMAK
 

Plus de Mr SMAK (20)

Fyp list batch-2009 (project approval -rejected list)
Fyp list batch-2009 (project approval -rejected list)Fyp list batch-2009 (project approval -rejected list)
Fyp list batch-2009 (project approval -rejected list)
 
Assigments2009
Assigments2009Assigments2009
Assigments2009
 
Week1
Week1Week1
Week1
 
Evaluation of cellular network
Evaluation of cellular networkEvaluation of cellular network
Evaluation of cellular network
 
Common protocols
Common protocolsCommon protocols
Common protocols
 
Cellular network
Cellular networkCellular network
Cellular network
 
Lecture 6.1
Lecture  6.1Lecture  6.1
Lecture 6.1
 
Lecture 6
Lecture  6Lecture  6
Lecture 6
 
Parallel architecture
Parallel architectureParallel architecture
Parallel architecture
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Lecture 6
Lecture  6Lecture  6
Lecture 6
 
Lecture 6.1
Lecture  6.1Lecture  6.1
Lecture 6.1
 
Chapter 2 ASE
Chapter 2 ASEChapter 2 ASE
Chapter 2 ASE
 
Structure of project plan and schedule
Structure of project plan and scheduleStructure of project plan and schedule
Structure of project plan and schedule
 
Proposal format
Proposal formatProposal format
Proposal format
 
Proposal announcement batch2009
Proposal announcement batch2009Proposal announcement batch2009
Proposal announcement batch2009
 
List ofsuparco projectsforuniversities
List ofsuparco projectsforuniversitiesList ofsuparco projectsforuniversities
List ofsuparco projectsforuniversities
 
Fyp timeline & assessment policy batch 2009
Fyp timeline & assessment policy batch 2009Fyp timeline & assessment policy batch 2009
Fyp timeline & assessment policy batch 2009
 

Dernier

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Dernier (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

Lab # 05

  • 1. Advance Software Engineering UML Diagram LAB # 05 Objective: • To understand Activity Diagram. The Activity Diagram The purpose of the activity diagram is to model the procedural flow of actions that are part of a larger activity. In projects in which use cases are present, activity diagrams can model a specific use case at a more detailed level. However, activity diagrams can be used independently of use cases for modeling a business-level function, it models procedural flow, the activity diagram focuses on the action sequence of execution and the conditions that trigger or guard those actions. The activity diagram is also focused only on the activity's internal actions and not on the actions that call the activity in their process flow or that trigger the activity according to some event. Although UML sequence diagrams can protray the same information as activity diagrams, but activity diagrams show all potential sequence flows in an activity, whereas a sequence diagram typically shows only one flow of an activity. The basics Consider the action element in an activity diagram, whose official UML name is action state. An action is indicated on the activity diagram by a "capsule" shape. The text inside it indicates the action (e.g., Customer Calls Ticket Office or Registration Office Opens). Figure 1: A sample action that is part of an activity diagram. Because activity diagrams show a sequence of actions, they must indicate the starting point of the sequence. The initial state is drawn as a solid circle with a transition line (arrow) that connects it to the first action in the activity's sequence of actions. Figure 2 shows what an activity diagram's initial state looks like. It is important to note that there can be only one initial state on an activity diagram and only one 1
  • 2. Advance Software Engineering UML Diagram transition line connecting the initial state to an action. Although it may seem obvious that an activity can have only one initial state, there are certain circumstances -- namely, the commencement of asynchronous action sequences -- that may suggest that a new initial state should be indicated in the activity diagram. UML does not allow this. Figure 3 offers an example of an incorrect activity diagram, because the initial state has two transition lines that point to two activities. Figure 3: Incorrect rendering of an initial state within an activity diagram. The initial state can indicate only ONE action. The activity's flow terminates when the transition line of the last action in the sequence connects to a "final state" symbol, which is a bullseye (a circle surrounding a smaller solid circle). Beyond the basics Activities modeled for real software development projects include decision points that control what actions take place. And sometimes activities have parallel actions. Decision points Typically, decisions need to be made throughout an activity, depending on the outcome of a specific prior action. In creating the activity diagram for such cases, you might need to model two or more different sequences of actions. The UML specification provides two ways to model decisions like this. The first way is to show a single transition line coming out of an action and connecting to a decision point. The UML specification name for a decision point is decision, and it is drawn as a diamond on an activity diagram. Since a decision will have at least two different outcomes, the decision symbol will have multiple transition lines connecting to different actions. Figure 5 shows a fragment of a sample activity diagram with a decision. Figure 5: A decision point models a choice that must be made within the sequence of actions. 2
  • 3. Advance Software Engineering UML Diagram As shown in Figure 5, each transition line involved in a decision point must be labeled with text above it to indicate "guard conditions," commonly abbreviated as guards. Guard condition text is always placed in brackets -- for example, [guard condition text]. A guard condition explicitly tells when to follow a transition line to the next action. According to the decision point shown in Figure 5, a bartender (user) only needs to "make sure the customer is at least 21 years old" when the customer orders an alcoholic drink. If the customer orders any other type of drink (the "else" condition), then the bartender simply gets the drink for the customer. The [else] guard is commonly used in activity diagrams to mean "if none of the other guarded transition lines matches the actual condition," then follow the [else] transition line. Merge points Sometimes the procedural flow from one decision path may connect back to another decision path, as shown in Figure 6 at the "Customer's Age > = 21" condition. In these cases, we connect two or more action paths together using the same diamond icon with multiple paths pointing to it, but with only one transition line coming out of it. This does not indicate a decision point, but rather a merge. Figure 6 shows the same decision as in Figure 5, but Figure 6 expands the activity diagram. Performing a check of the customer's age leads the user to a second decision: If the customer is younger than 21, the bartender must tell the customer to order another non-alcoholic drink, which takes our sequence back to the action "Customer Orders Drink." However, if the customer is 21 years old or older, then our action sequence takes take us to the same action the bartender would follow if the person had ordered a non-alcoholic drink: "Get Drink For Customer." Figure 6: A partial activity diagram, showing two decision points ("Drink is alcoholic" and "Customer's age < 21") and one merge ("else" and "Customer's age >= 21") 3
  • 4. Advance Software Engineering UML Diagram Synch states for asynchronous actions When modeling activities, you sometimes need to show that certain action sequences can be done in parallel, or asynchronously. A special notation element allows you to show parallel action sequences, or synch states. To be clear, a synch state that forks actions into two or more threads represents a de-synchronizing of the flow (asynchronous actions), and a synch state that joins actions back together represents a return to synchronized flow. A synch state is drawn as a thick, solid line with transition lines coming into it from the left (usually) and out of it on the right (usually). To draw a synch state that forks the action sequence into multiple threads, first connect a transition line from the action preceding the parallel sequence to the synch state. Then draw two transition lines coming out of the synch state, each connecting to its own action. Figure 9 is an activity diagram fragment that shows the forking of execution modeled. Figure 9: A thick, solid line indicates a synch state, allowing two or more action sequences to proceed in parallel. 4
  • 5. Advance Software Engineering UML Diagram Swim lanes In activity diagrams, it is often useful to model the activity's procedural flow of control between the objects (persons, organizations, or other responsible entities) that actually execute the action. To do this, you can add swim lanes to the activity diagram (swim lanes are named for their resemblance to the straight-line boundaries between two or more competitors at a swim meet). To put swim lanes on an activity diagram, use vertical columns. For each object that executes one or more actions, assign a column its name, placed at the top of the column. Then place each action associated with an object in that object's swim lane. Figure 12 shows that two objects execute actions (e.g., Band Manager and Reporting Tool). The Band Manager object executes the "Selects the View Sales For My Band Report" action, and the Reporting Tool executes the "Retrieve Bands the Band Manager Manages" action. It is important to note that, although using swimlanes improves the clarity of an activity diagram (since all the activities are placed in the swimlanes of their respective executor objects), all the previously mentioned rules governing activity diagrams still hold true. In other words, you read the activity diagram just like you would if no swimlanes were used. 5
  • 6. Advance Software Engineering UML Diagram Task TO Be Performed…… Task # 01 : When I order Chinese food for delivery, I call the Chinese food delivery guy, give him my phone number, and his computer will automatically display my address if I've ordered food before. But if I'm a new customer calling for the first time, he must get my address before he takes my order. Task# 02 : Below an activity diagram is shown. Give an interpretation of the diagram. Task# 03 : Eastern State University (ESU) Background The ESU course registration problem will be used as an example throughout this book. The process of assigning professors to courses and the registration of students is a frustrating and time consuming experience. After the professors of ESU have decided which courses they are going to teach for the semester, the Registrar's office enters the information into the computer system. A batch report is printed for the professors indicating which courses they will teach. A course catalog is printed and distributed to the students. The students currently fill out (mulitpart, multicolor) registration forms that indicate their choice in courses, and return the completed forms to the Registrar's office. The typical student load is four courses. The staff of the Registrar's office then enters the students' forms into the mainframe computer system. Once the students' curriculum for the semester has been entered, a batch job is run overnight to assign students to courses. Most of the time the students get their first choice; however, in those cases where there is a conflict, the Registrar's office talks with each student to get additional choices. Once all the students have been successfully assigned to courses, a hard copy of the students' schedule is sent to the students for their 6
  • 7. Advance Software Engineering UML Diagram verification. Most student registrations are processed within a week, but some exceptional cases take up to two weeks to solve. Once the initial registration period is completed, professors receive a student roster for each course they are scheduled to teach. Draw an activity diagram for the senerio described above. Task # 04 Draw an activity diagram models the business process of enrolling in a university, takes this approach. A student gets enrolled in the university if the form filled is correct otherwise a help system is available. If student successfully get enrolled in the university he/she can attend classes can enrolled in the seminar committee and need to pay library fee as well. Task # 05 Create an activity diagram describing the process of a person (user) using the machine to buy a ticket from Hamburg to Lübeck. Actually, the machine only takes coins (no credit cards, debit cards). Task # 06 Create a sequence diagram for the following collaboration. Use the classes and methods on the next slide. A customer wants to draw money from his bank account. He enters his card into an ATM (automated teller machine). The ATM machine prompts „Enter PIN“. The customer enters his PIN. The ATM (internally) retrieves the bank account number from the card. The ATM encrypts the PIN and the account number and sends it over to the bank. The bank verifies the encrypted Account and PIN number. If the PIN number is correct, the ATM displays „Enter amount“, draws money from the bank account and pays out the amount.(Use Swimlanes) 7