Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling...

26
Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful when: Modeling a workflow Modeling an operation Describing behavior that has a lot of parallel processing
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    218
  • download

    2

Transcript of Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling...

Page 1: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Activity Diagrams

Derived from several techniques:Event diagrams of Jim OdellSDL state modeling techniquesWorkflow modelingPetri nets

Especially useful when:Modeling a workflowModeling an operationDescribing behavior that has a lot of parallel processing

Page 2: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Activity

Activity is the state of doing something

Real-world process like typing a letterExecution of a software routine like a method on a class.Rounded rectangle is narrower and more oval-shaped than the state icon.

Page 3: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Activity Diagrams vs. State Diagrams

Activity diagram describes the sequencing of activities, with support for both conditional and parallel behaviorActivity diagram is a variant of a state diagram in which most, if not all, the states are activity states.Much of the terminology used in Activity diagrams follows that of state diagrams.

Page 4: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Activity Diagram

Page 5: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Activity vs.State Diagrams

Page 6: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Activity vs. State Diagrams

Page 7: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Activity Diagram

Page 8: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Activity Diagrams

Activity diagrams: allow the user to choose the order in which to do things states the essential sequencing rules that must be followed

Flowcharts are limited to sequential processes, whereas activity diagrams can handle parallel processes

Page 9: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Forks & Joins

A join synchronizes parallel behaviorForks and joins must match – every time you have a fork, you must have a join that combines the threads started by that fork.

Page 10: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Forks & Joins

Extensions to previous rule: A thread that comes out of a fork can itself fork, with the new threads coming back together before reaching the matching join

Page 11: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Forks & Joins

Extensions to previous rule: If a thread coming out of a fork goes straight to another fork, you can remove the second fork and just have the threads from the second fork coming out of the first fork.

Page 12: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Decomposing an Activity

An activity can be broken down into subactivities using notation similar to superstates and substates on a state diagram.

Page 13: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Activity Diagram

Page 14: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Dynamic Concurrency

Page 15: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Swimlanes

Our activity diagrams so far have focused on what happens, but they do not tell you who does what.Communication among responsible objects is missing.Swimlanes can be used to arrange activity diagrams into “zones of responsibility.”

Page 16: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Activity Diagram

Page 17: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Assigning Objects to Activities

The task of assigning objects to activities should be done.Should it be done immediately when initially diagramming activities, or later when an overall sense of the behavior is understood?

Page 18: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Activity Diagrams

StrengthsSupport and encourage parallel behavior• Good tool for workflow modeling• Good tool for multithreading

WeaknessesLinks among actions and objects are not especially clear• Interaction diagrams are more helpful in

this area

Page 19: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

When to use Activity Diagrams

Analyzing a Use CaseUnderstanding WorkflowDescribing a complicated sequential algorithmDealing with multithreaded applications

Page 20: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

When not to use Activity Diagrams

Trying to see how objects collaborateTrying to see how an object behaves over its lifetimeRepresenting complex conditional logic

Page 21: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

ObjectFlow

Page 22: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

ESU Revisited

Preparing for RegistrationThe process of preparing the course curriculum and making it available to the student community can be expressed using an Activity Diagram.We don’t assign responsibilities to each activity at this time.

Page 23: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

ESU Revisited

Create Curriculum

Select Courses to Teach

Create Catalog

Page 24: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

ESU Revisited

Preparing for RegistrationWe must make sure all courses have been assigned a professor

Page 25: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

ESU Revisited

Create Curriculum

Select Courses to Teach

Create Catalog

Assign Professor to Course

[Not all professors assigned]

[All professors assigned]

Page 26: Activity Diagrams Derived from several techniques: Event diagrams of Jim Odell SDL state modeling techniques Workflow modeling Petri nets Especially useful.

Use Case

Class DiagramActivity Diagram

ObjectDiagram

Sequence Diagram

CollaborationDiagram

StateDiagram

The UML and Design Flow