SlideShare a Scribd company logo
1 of 57
Download to read offline
What is an Activity Diagram?
 Represent the dynamic (behavioral) view of a system
 Used for business (transaction) process modeling and
modeling the logic captured by a single use-case or usage
scenario
 Used to represent flow across use cases or within a use case
 UML activity diagrams are the object oriented equivalent of
flow chart and DFDs in function-oriented design approach
 Describes how activities are coordinated.
 Records the dependencies between activities, such as
which things can happen in parallel and what must be
finished before something else can start.
 Represents the workflow of the process.
 Activity diagram contains activities, transitions between
activities, decision points, synchronization bars, swim
lanes and many more.
Notation
Activity1 Activity2
1. Activities
2. Transition
Notation - 2
Activity1
[x>0]
[x=0]
[x<0]
[x>0]
[x=0]
[x<0]
3. Decision Diamond
Notation - 3
4.1 Synch. Bar (Join) 4.2 Splitting Bar (Fork)
Notation - 3
5. Start & Stop Markers
Start Marker Stop Marker
Notation - 4
Application/Department/Group/Role Boundaries
Developers Testers Markers
Swimlane Swimlane
Swimlane
Example: Business Level Activity Diagram of Library
member Librarian
[borrower]
[returner]
Find book on shelf
Wait in queue
Prepare for next
member
Record borrowing
Record return Put book back to shelf
[returning]
[borrowing]
 To model the dynamic aspects of a system
 It is essentially a flowchart
 Showing flow of control from activity to activity
 Purpose
 Model business workflows
 Model operations
Activity Diagrams (1)
 Activity diagrams commonly contain
 Activity states and action states
 Transitions
 Objects
Activity Diagrams (2)
 Action states
 Represents the execution of an atomic action,
typically the invocation of an operation.
 Work of the action state is not interrupted
 Activity states can be further decomposed
 Their activity being represented by other activity
diagrams
 They may be interrupted
 ActionState has is replaced, in UML 2.0, by Action.
Action States and Activity States
 When the action or activity of a state
completes, flow of control passes immediately
to the next action or activity state
 A flow of control has to start and end
someplace
 initial state -- a solid ball
 stop state -- a solid ball inside a circle
Transitions (1)
Activity Diagram: Example (1)
 A branch specifies alternate paths taken
based on some Boolean expression
 A branch may have one incoming
transition and two or more outgoing
ones
Branching (1)
Branching (2)
Activity Diagram: Example (2)
 Use a synchronization bar to specify the
forking and joining of parallel flows of
control
 A synchronization bar is rendered as a
thick horizontal or vertical line
Forking and Joining
 A fork may have one incoming transitions and
two or more outgoing transitions
 each transition represents an independent flow of
control
 conceptually, the activities of each of outgoing
transitions are concurrent
 either truly concurrent (multiple nodes)
 or sequential yet interleaved (one node)
Fork
 A join may have two or more incoming
transitions and one outgoing transition
 above the join, the activities associated with each of
these paths continues in parallel
 at the join, the concurrent flows synchronize
 each waits until all incoming flows have reached the
join, at which point one flow of control continues on
below the join
Join
Fork
Case Study
IIT
Enrollment
Student
System
Registrar
Course registration
<<include>>
Student Enrollment in IIT (SEIIT)
SEIIT System
 Here different activities are:
 Received enrollment form filled by the student
 Registrar checks the form
 Input data to the system
 System authenticate the environment
 Pay fees by the student
 Registrar checks the amount to be remitted and prepare a bill
 System acknowledge fee receipts and print receipt
 Hostel allotment
 Allot hostel
 Receive hostel charge
 Allot room
 Medical check up
 Create hostel record
 Conduct medical bill
 Enter record
 Issue library card
 Issue identity card
Student Enrollment in Institute of Information Technology (IIT)
Activity Diagram for SEIIT
Received form
Payment fees
Hostel
allotment
Issue identity
card
Medical check
Issue library
card
Basic Components in an Activity Diagram
 Initial node
 The filled circle is the starting point
of the diagram
 Final node
 The filled circle with a boarder is the
ending point. An activity diagram can
have zero or more activity final state.
 Activity
 The rounded circle represents
activities that occur. An activity is not
necessarily a program, it may be a
manual thing also
 Flow/ edge
 The arrows in the diagram. No label is
necessary
Received form
Payment fees
Hostel
allotment
Issue identity
card
Medical check
Issue library
card
Basic Components in an Activity Diagram
 Fork
 A black bar ( horizontal/vertical ) with
one flow going into it and several
leaving it. This denotes the beginning
of parallel activities
 Join
 A block bar with several flows
entering it and one leaving it. this
denotes the end of parallel activities
 Merge
 A diamond with several flows
entering and one leaving. The
implication is that all incoming flow
to reach this point until processing
continues
Received form
Payment fees
Hostel
allotment
Issue identity
card
Medical check
Issue library
card
Basic Components in an Activity Diagram
 Difference between Join and Merge
 A join is different from a merge in that the join synchronizes two inflows
and produces a single outflow. The outflow from a join cannot execute
until all inflows have been received
 A merge passes any control flows straight through it. When all incoming
flow reach this point then processing continues
Basic Components in an Activity Diagram
 Decision
 A diamond with one flow entering
and several leaving. The flow
leaving includes conditions as
yes/ no state
 Flow final
 The circle with X though it. This
indicates that Process stop at this
point
 Swim lane
 A partition in activity diagram by
means of dashed line, called swim
lane. This swim lane may be
horizontal or vertical
Received form
Payment fees
Hostel
allotment
Issue identity
card
Medical check
Issue library
card
Detailed Activity Diagram of SEIIT
Fill-in
form
Check
form
[Incorrect]
[Correct]
Display student
screen
Input student
information
Verify the
applications
Search for Student
selection list
[No]
Regret message
[Yes]
Regret
registration
[No Match]
[Match]
Create record 1
Detailed Activity Diagram of SEIIT
1
Display
enrollment form
Calculate
registration fees
Dispaly fees
payable screen
Pay fee
Process
payment
Print receipt
2
Activity Diagram of SEIIT with Swim Lane
Fill-in
form
Check
form
[Incorrect]
[Correct]
Display student
screen
Input student
information Search for Student
selection list
Verify the
applications
Regret message
Create record
Regret
registration
[No Match]
[Match]
[No]
[Yes]
1
Student
Registrar
System
 A swimlane specifies a locus of activities
 To partition the activity states on an activity
diagram into groups
 each group representing the business organization
responsible for those activities
 each group is called a swimlane
 Each swimlane is divided from its neighbor by
a vertical solid line
Swimlanes
 Each swimlane has a name unique within its
diagram
 Each swimlane may represent some real-world
entity
 Each swimlane may be implemented by one or
more classes
 Every activity belongs to exactly one swimlane,
but transitions may cross lanes
Swimlanes
Activity Diagram: Example (3)
Some more features in
Activity Diagrams
Object and Object Flow
 There is no data flow in activity diagram. Object flow plays
role of data flow as well.
 An object flow is a path along which objects can pass. An
object is shown as a rectangle
 An object flow is shown as a connector with an arrowhead
denoting the direction the object is being passed.
Input and Output Pin
 An object flow must have an object on at least one of its ends.
A shorthand notation for the above diagram would be to use
input and output pins
Data Store
 A data store is shown as an object with the «datastore»
keyword
Expansion Region
 Expansion regions and structured activities provide mechanisms to
show the strategy for managing the synchronization issues in a real-
time system.
 An expansion region is a structured activity region that executes multiple
times for collection items.
 Input and output expansion nodes are drawn as a group of three / four boxes
representing a multiple selection of items. The keyword iterative, parallel or
stream is shown in the top left corner of the region
The organization must accept an electronic application, review the
eligibility of the application, store the application, and then
confirm receipt of a valid application. The top section on the diagram
shows an expansion region, a type of structured activity that handles the
input and output of collections with multiple executions.
The collection as two sets of four boxes on the top and one at the bottom
showing the application, the personal information, and the verified
applications.
The italicized word in the upper-left corner shows that this expansion
region allows multiple executions to the actions to occur in parallel, or
concurrently.
The action executions do not have to follow any ordering on the entering
collections. You can also use iterative to show the region only allows one
set of actions to execute at a time or streaming to show execution in the
order of the collection.
The system also relies on information from a database about the person.
When combined with the eligibility rules for the application, shown on
the diagram as a <<decisionInput>>, the organization filters out ineligible
applications and sends the application on for storage.
Expansion Region: application-processing
Exception Handling
 Exception Handlers can be modeled on activity diagrams as in
the example below
Interruptible Activity Region
 An interruptible activity region surrounds a group of actions that can be
interrupted. In the very simple example below, the Process Order action will
execute until completion, when it will pass control to the Close Order
action, unless a Cancel Request interrupt is received which will pass control
to the Cancel Order action
Parallel Activities: Forking and Joining
 Objects in the UML language hold information - state - that is passed
between actions. Objects may represent class instances:
 Objects usually change state between actions:
 An alternative notation shows action input pins and output pins.
These emphasize that the corresponding object is required while
object nodes rater emphasize the existance of that object:
Passing Objects Between Actions
 External participants may be external processes, systems,
or people, interacting with an activity.
 A receive signal "wakes up" an action that is "sleeping“.
 A send signal is sent to an external participant.
 In the following diagram, both a send and receive signal
action are used.
 Note that the activity flow gets interrupted - gets into a
wait state - until the bug fix notification is received. (If
there was no receive signal action, however, the flow
would just continue after executing the send signal
action.)
Interacting with External Participants
 An activity may also start with a receive signal
node:
Interacting with External Participants
 A time event models a wait period:
 An activity starting with a time event is launched
periodically:
Time Events
 Longer running processes can be interrupted by an
event - an accept event action within
an interruptable activity region:
Interrupting an Activity
 Reaching a flow final node ends a flow (not the
activity). The following diagram models a scenario in
which software is tested and bugs are fixed - until the
release date is due:
Ending a Flow
Conditional Statements
Conditional Statements
public boolean doValidateUser(String Password,String UserName)
{
loadAccountDetails();
boolean bRet;
if (Username==name)
{
if (Password == password)
{
bRet = true;
bValidUser = true;
}
else
{
bRet = false;
}
}
else
{
bRet = false;
}
return bRet;
}
Loops
Loops
public void doCheckForOutstandingOrders()
{
if (status != closed)
{
initializeStateMachine();
while (status != closed)
{
runStateMachine();
}
}
else
{
//No Outstanding orders;
}
return;
}
Class Activity Draw diagrams
 Document Management Process: A document goes
through different state or stages - it is created, reviewed,
updated, approved, and at some point archived. Different
roles participating in this process are Author, Reviewer,
Approver, and Owner.
 Activity is started by Commuter actor who needs to
buy a ticket. Ticket vending machine will request trip
information from Commuter. This information will
include number and type of tickets, e.g. whether it is a
monthly pass, one way or round ticket, route number,
destination or zone number, etc.
 Based on the provided trip info ticket vending
machine will calculate payment due and request
payment options. Those options include payment by
cash, or by credit or debit card. If payment by card was
selected by Commuter, another actor, Bank will
participate in the activity by authorizing the payment.
Ticket Vending Machine
Ticket Vending Machine

More Related Content

Similar to week07a.pdf

Lecture6 activity diagrams
Lecture6 activity diagramsLecture6 activity diagrams
Lecture6 activity diagramsShahid Riaz
 
ACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptxACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptxdevboris1
 
Flow Process Chart INDUSTRIAL MANAGEMENT
Flow Process Chart INDUSTRIAL MANAGEMENTFlow Process Chart INDUSTRIAL MANAGEMENT
Flow Process Chart INDUSTRIAL MANAGEMENTManzarAli14
 
Bpmn poster a2_ver_1.0.10
Bpmn poster a2_ver_1.0.10Bpmn poster a2_ver_1.0.10
Bpmn poster a2_ver_1.0.10jlaznik
 
217 scen overview_en_de
217 scen overview_en_de217 scen overview_en_de
217 scen overview_en_dephogat1
 
Unit III Dynamic and Implementation UML Diagrams.pptx
Unit III Dynamic and Implementation UML Diagrams.pptxUnit III Dynamic and Implementation UML Diagrams.pptx
Unit III Dynamic and Implementation UML Diagrams.pptxanguraju1
 
Comercial sap
Comercial sapComercial sap
Comercial sapalavro005
 
software engineering with uml- activity diagram
software engineering with uml- activity diagramsoftware engineering with uml- activity diagram
software engineering with uml- activity diagramrahmantoyuri
 

Similar to week07a.pdf (20)

Lecture6 activity diagrams
Lecture6 activity diagramsLecture6 activity diagrams
Lecture6 activity diagrams
 
ACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptxACTIVITY DIAGRAM.pptx
ACTIVITY DIAGRAM.pptx
 
Flow Process Chart INDUSTRIAL MANAGEMENT
Flow Process Chart INDUSTRIAL MANAGEMENTFlow Process Chart INDUSTRIAL MANAGEMENT
Flow Process Chart INDUSTRIAL MANAGEMENT
 
MOM on activity diagram
MOM on activity diagramMOM on activity diagram
MOM on activity diagram
 
Flowcharts
FlowchartsFlowcharts
Flowcharts
 
Activity Diagram part8
Activity Diagram part8Activity Diagram part8
Activity Diagram part8
 
Bpmn poster a2_ver_1.0.10
Bpmn poster a2_ver_1.0.10Bpmn poster a2_ver_1.0.10
Bpmn poster a2_ver_1.0.10
 
Acti
ActiActi
Acti
 
uml.ppt
uml.pptuml.ppt
uml.ppt
 
Activity
ActivityActivity
Activity
 
FLOWCHART.pptx
FLOWCHART.pptxFLOWCHART.pptx
FLOWCHART.pptx
 
217 scen overview_en_de
217 scen overview_en_de217 scen overview_en_de
217 scen overview_en_de
 
Lec4.ppt
Lec4.pptLec4.ppt
Lec4.ppt
 
Unit III Dynamic and Implementation UML Diagrams.pptx
Unit III Dynamic and Implementation UML Diagrams.pptxUnit III Dynamic and Implementation UML Diagrams.pptx
Unit III Dynamic and Implementation UML Diagrams.pptx
 
note
notenote
note
 
BUSINES PROCESS IMPROVEMENT
BUSINES PROCESS IMPROVEMENTBUSINES PROCESS IMPROVEMENT
BUSINES PROCESS IMPROVEMENT
 
UML.pptx
UML.pptxUML.pptx
UML.pptx
 
Comercial sap
Comercial sapComercial sap
Comercial sap
 
Sap 2
Sap 2Sap 2
Sap 2
 
software engineering with uml- activity diagram
software engineering with uml- activity diagramsoftware engineering with uml- activity diagram
software engineering with uml- activity diagram
 

Recently uploaded

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 

Recently uploaded (20)

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 

week07a.pdf

  • 1.
  • 2. What is an Activity Diagram?  Represent the dynamic (behavioral) view of a system  Used for business (transaction) process modeling and modeling the logic captured by a single use-case or usage scenario  Used to represent flow across use cases or within a use case  UML activity diagrams are the object oriented equivalent of flow chart and DFDs in function-oriented design approach  Describes how activities are coordinated.  Records the dependencies between activities, such as which things can happen in parallel and what must be finished before something else can start.  Represents the workflow of the process.  Activity diagram contains activities, transitions between activities, decision points, synchronization bars, swim lanes and many more.
  • 5. Notation - 3 4.1 Synch. Bar (Join) 4.2 Splitting Bar (Fork)
  • 6. Notation - 3 5. Start & Stop Markers Start Marker Stop Marker
  • 7. Notation - 4 Application/Department/Group/Role Boundaries Developers Testers Markers Swimlane Swimlane Swimlane
  • 8. Example: Business Level Activity Diagram of Library member Librarian [borrower] [returner] Find book on shelf Wait in queue Prepare for next member Record borrowing Record return Put book back to shelf [returning] [borrowing]
  • 9.  To model the dynamic aspects of a system  It is essentially a flowchart  Showing flow of control from activity to activity  Purpose  Model business workflows  Model operations Activity Diagrams (1)
  • 10.  Activity diagrams commonly contain  Activity states and action states  Transitions  Objects Activity Diagrams (2)
  • 11.  Action states  Represents the execution of an atomic action, typically the invocation of an operation.  Work of the action state is not interrupted  Activity states can be further decomposed  Their activity being represented by other activity diagrams  They may be interrupted  ActionState has is replaced, in UML 2.0, by Action. Action States and Activity States
  • 12.  When the action or activity of a state completes, flow of control passes immediately to the next action or activity state  A flow of control has to start and end someplace  initial state -- a solid ball  stop state -- a solid ball inside a circle Transitions (1)
  • 14.  A branch specifies alternate paths taken based on some Boolean expression  A branch may have one incoming transition and two or more outgoing ones Branching (1)
  • 17.  Use a synchronization bar to specify the forking and joining of parallel flows of control  A synchronization bar is rendered as a thick horizontal or vertical line Forking and Joining
  • 18.  A fork may have one incoming transitions and two or more outgoing transitions  each transition represents an independent flow of control  conceptually, the activities of each of outgoing transitions are concurrent  either truly concurrent (multiple nodes)  or sequential yet interleaved (one node) Fork
  • 19.  A join may have two or more incoming transitions and one outgoing transition  above the join, the activities associated with each of these paths continues in parallel  at the join, the concurrent flows synchronize  each waits until all incoming flows have reached the join, at which point one flow of control continues on below the join Join
  • 20. Fork
  • 22. SEIIT System  Here different activities are:  Received enrollment form filled by the student  Registrar checks the form  Input data to the system  System authenticate the environment  Pay fees by the student  Registrar checks the amount to be remitted and prepare a bill  System acknowledge fee receipts and print receipt  Hostel allotment  Allot hostel  Receive hostel charge  Allot room  Medical check up  Create hostel record  Conduct medical bill  Enter record  Issue library card  Issue identity card Student Enrollment in Institute of Information Technology (IIT)
  • 23. Activity Diagram for SEIIT Received form Payment fees Hostel allotment Issue identity card Medical check Issue library card
  • 24. Basic Components in an Activity Diagram  Initial node  The filled circle is the starting point of the diagram  Final node  The filled circle with a boarder is the ending point. An activity diagram can have zero or more activity final state.  Activity  The rounded circle represents activities that occur. An activity is not necessarily a program, it may be a manual thing also  Flow/ edge  The arrows in the diagram. No label is necessary Received form Payment fees Hostel allotment Issue identity card Medical check Issue library card
  • 25. Basic Components in an Activity Diagram  Fork  A black bar ( horizontal/vertical ) with one flow going into it and several leaving it. This denotes the beginning of parallel activities  Join  A block bar with several flows entering it and one leaving it. this denotes the end of parallel activities  Merge  A diamond with several flows entering and one leaving. The implication is that all incoming flow to reach this point until processing continues Received form Payment fees Hostel allotment Issue identity card Medical check Issue library card
  • 26. Basic Components in an Activity Diagram  Difference between Join and Merge  A join is different from a merge in that the join synchronizes two inflows and produces a single outflow. The outflow from a join cannot execute until all inflows have been received  A merge passes any control flows straight through it. When all incoming flow reach this point then processing continues
  • 27. Basic Components in an Activity Diagram  Decision  A diamond with one flow entering and several leaving. The flow leaving includes conditions as yes/ no state  Flow final  The circle with X though it. This indicates that Process stop at this point  Swim lane  A partition in activity diagram by means of dashed line, called swim lane. This swim lane may be horizontal or vertical Received form Payment fees Hostel allotment Issue identity card Medical check Issue library card
  • 28. Detailed Activity Diagram of SEIIT Fill-in form Check form [Incorrect] [Correct] Display student screen Input student information Verify the applications Search for Student selection list [No] Regret message [Yes] Regret registration [No Match] [Match] Create record 1
  • 29. Detailed Activity Diagram of SEIIT 1 Display enrollment form Calculate registration fees Dispaly fees payable screen Pay fee Process payment Print receipt 2
  • 30. Activity Diagram of SEIIT with Swim Lane Fill-in form Check form [Incorrect] [Correct] Display student screen Input student information Search for Student selection list Verify the applications Regret message Create record Regret registration [No Match] [Match] [No] [Yes] 1 Student Registrar System
  • 31.  A swimlane specifies a locus of activities  To partition the activity states on an activity diagram into groups  each group representing the business organization responsible for those activities  each group is called a swimlane  Each swimlane is divided from its neighbor by a vertical solid line Swimlanes
  • 32.  Each swimlane has a name unique within its diagram  Each swimlane may represent some real-world entity  Each swimlane may be implemented by one or more classes  Every activity belongs to exactly one swimlane, but transitions may cross lanes Swimlanes
  • 34. Some more features in Activity Diagrams
  • 35. Object and Object Flow  There is no data flow in activity diagram. Object flow plays role of data flow as well.  An object flow is a path along which objects can pass. An object is shown as a rectangle  An object flow is shown as a connector with an arrowhead denoting the direction the object is being passed.
  • 36. Input and Output Pin  An object flow must have an object on at least one of its ends. A shorthand notation for the above diagram would be to use input and output pins
  • 37. Data Store  A data store is shown as an object with the «datastore» keyword
  • 38. Expansion Region  Expansion regions and structured activities provide mechanisms to show the strategy for managing the synchronization issues in a real- time system.  An expansion region is a structured activity region that executes multiple times for collection items.  Input and output expansion nodes are drawn as a group of three / four boxes representing a multiple selection of items. The keyword iterative, parallel or stream is shown in the top left corner of the region
  • 39. The organization must accept an electronic application, review the eligibility of the application, store the application, and then confirm receipt of a valid application. The top section on the diagram shows an expansion region, a type of structured activity that handles the input and output of collections with multiple executions. The collection as two sets of four boxes on the top and one at the bottom showing the application, the personal information, and the verified applications. The italicized word in the upper-left corner shows that this expansion region allows multiple executions to the actions to occur in parallel, or concurrently. The action executions do not have to follow any ordering on the entering collections. You can also use iterative to show the region only allows one set of actions to execute at a time or streaming to show execution in the order of the collection. The system also relies on information from a database about the person. When combined with the eligibility rules for the application, shown on the diagram as a <<decisionInput>>, the organization filters out ineligible applications and sends the application on for storage. Expansion Region: application-processing
  • 40.
  • 41. Exception Handling  Exception Handlers can be modeled on activity diagrams as in the example below
  • 42. Interruptible Activity Region  An interruptible activity region surrounds a group of actions that can be interrupted. In the very simple example below, the Process Order action will execute until completion, when it will pass control to the Close Order action, unless a Cancel Request interrupt is received which will pass control to the Cancel Order action
  • 44.  Objects in the UML language hold information - state - that is passed between actions. Objects may represent class instances:  Objects usually change state between actions:  An alternative notation shows action input pins and output pins. These emphasize that the corresponding object is required while object nodes rater emphasize the existance of that object: Passing Objects Between Actions
  • 45.  External participants may be external processes, systems, or people, interacting with an activity.  A receive signal "wakes up" an action that is "sleeping“.  A send signal is sent to an external participant.  In the following diagram, both a send and receive signal action are used.  Note that the activity flow gets interrupted - gets into a wait state - until the bug fix notification is received. (If there was no receive signal action, however, the flow would just continue after executing the send signal action.) Interacting with External Participants
  • 46.  An activity may also start with a receive signal node: Interacting with External Participants
  • 47.  A time event models a wait period:  An activity starting with a time event is launched periodically: Time Events
  • 48.  Longer running processes can be interrupted by an event - an accept event action within an interruptable activity region: Interrupting an Activity
  • 49.  Reaching a flow final node ends a flow (not the activity). The following diagram models a scenario in which software is tested and bugs are fixed - until the release date is due: Ending a Flow
  • 51. Conditional Statements public boolean doValidateUser(String Password,String UserName) { loadAccountDetails(); boolean bRet; if (Username==name) { if (Password == password) { bRet = true; bValidUser = true; } else { bRet = false; } } else { bRet = false; } return bRet; }
  • 52. Loops
  • 53. Loops public void doCheckForOutstandingOrders() { if (status != closed) { initializeStateMachine(); while (status != closed) { runStateMachine(); } } else { //No Outstanding orders; } return; }
  • 54.
  • 55. Class Activity Draw diagrams  Document Management Process: A document goes through different state or stages - it is created, reviewed, updated, approved, and at some point archived. Different roles participating in this process are Author, Reviewer, Approver, and Owner.
  • 56.  Activity is started by Commuter actor who needs to buy a ticket. Ticket vending machine will request trip information from Commuter. This information will include number and type of tickets, e.g. whether it is a monthly pass, one way or round ticket, route number, destination or zone number, etc.  Based on the provided trip info ticket vending machine will calculate payment due and request payment options. Those options include payment by cash, or by credit or debit card. If payment by card was selected by Commuter, another actor, Bank will participate in the activity by authorizing the payment. Ticket Vending Machine