Identifying & Creating Use Cases - Part 3 Division of AIDS Identifying & Creating Use Cases - Part 3 October 1, 2003
Agenda Training Plan Overview Review Parts 1 & 2 Use-Cases & Packages Activity Diagrams Activity Diagram Description Activity Diagram Creation Procedures Adding Detail Events Guard Conditions States Analysis Advanced Diagrams Swimlanes Object Flows Next Steps
Training Plan Overview Identifying & Creating Use Cases Part 1 (Wednesday, September 24) Part 2 (Friday, September 26) Part 3 (Today) Actors and Use Case Diagrams Detailing Requirements with Requisite Pro (Parts 1 & 2) Sequence Diagrams State Transition Diagrams Collaboration Diagrams Reports SoDA
Part 1 Review Models Packages – used to organize the models Business Business Analysis Use-Case Analysis Design Implementation Deployment Packages – used to organize the models Logical breakdown of model elements Supports model management
Part 1 Review Use Cases Describes activities One use case is assigned per package Each Use Case specified by 5 basic types of diagrams, text and … Use-Case Activity State Sequence Collaboration
Part 1 Review For each package identified Create the Package Create the package’s use-case – use the same name as the package Create shells of all use-case-related diagrams Use analysis techniques to fill in the diagrams
Part 2 Review Identifying Use Cases - Analysis Steps Identification For each identified use case Create a context and detail activity diagram Identify potential sub-use cases Create a new package, use case, and related diagrams for the identified sub-use case Move relevant activities under the sub-use case Cleanup and Complete
Part 2 Review Organization Packages Views Hierarchy Use-Case View Logical View Component View Deployment View Hierarchy Levels of Abstraction
Part 2 Review Activity Diagram Definition: Defines the workflow associated with the use case How used Details the actions to be taken and decisions to be made for a use case Helps identify possible use cases at next level of detail Types Regular With States With Swimlanes With Object Flows
Part 2 Review Activity Diagram Model Elements Start State End State Decision State Transition Regular Transition To Self Horizontal and Vertical Synchronization Note Note Anchor Text Swimlanes State
Part 3 - Overview Activity Diagrams Use-Case Analysis Swimlanes Labels Events Actions Stereotypes Conditional Threads Guard Conditions History States Nested Activities Transitions to Self Decision Guards States Decision Merges Use-Case Analysis Swimlanes Object Flows
Activity Diagrams (AD) Components
AD – Decisions & Events A decision defines a specific location on an activity diagram or statechart diagram where the workflow may branch 1 to n branches 1 to 2 branches normal Event defines a trigger of a state transition (1 to n) A decision of ??? Type of event
AD – Decisions & Events
AD - Events Add event Right click transition and select Open Specification Select General tab. Enter Event Click OK
AD - Events Enter Event Click OK
AD – Activity Actions An action defines a step within an Activity or State Add Actions Right click activity Select Actions tab Right click and select Insert
AD – Activity Actions Specify action Repeat as Necessary Right click added action Select When Select Type Enter Name Click OK Repeat as Necessary
AD – Activity Actions
AD – Activity Stereotype A stereotype defines a sub-classification of a model element Add Stereotype Right click activity Select General tab Select stereotype from drop down or add new type
AD – Activity Stereotype Change Stereotype Display Right click and select Options, Stereotype Display, Decoration
AD – Details
AD – Conditional Threads A conditional thread defines a branch of workflow which only occurs when a set of conditions exist
AD – Guard Conditions A Guard Condition defines a condition which, when true, allows the transition to occur. As long as the condition remains false, the transition will not occur. Add guard condition Right click transition and select Open Specification Select Detail tab. Enter Guard Condition Click OK
AD – Conditional Threads and Guard Conditions
AD – Conditional Threads and Guard Conditions
AD – History States History states allow the state machine to re-enter the last sub-state that was active prior to leaving the composite state. Add history state Right click activity and select Open Specification Select State/Activity History check box. Select OK
AD – History States
AD – Nested Activities Nested Activities are a way to visually present the equivalent of a sub- diagram of activities Enclosing activity is referred to as a superactivity Nested activities are called subactivities
AD – Nested Activities
AD – Transitions to Self Transitions to Self are a looping mechanism Drag and Drop Transition to Self tool onto activity Add guard condition to new transition Add guard condition to activity completion transition
AD – Transitions to Self
AD – Decision Guard Conditions Decision Guards Conditions control the flow of a decision via the transitions from the decision Boolean logic of True
AD – Decision Guards
AD – Decision Guards
Use-Case View Activities Added State/Models Added Clean Up Rename Other Sub-model elements added
AD - States A state defines a condition of an object in which it performs some activity or waits for an event Add a state Drag and drop State tool on to the diagram Name the state Connect transitions
AD - States
AD - States
AD - States
AD - States
Use-Case View States Added
Use-Case View Review Reorganize Complete
Use-Case Analysis
Use-Case Analysis 3 New Use-Cases Add New Use-Cases Check In Passenger Verify Reservation Passenger List Add New Use-Cases Follow Process
Use-Case Analysis Rename Verify Reservation to Check In Passenger
Use-Case Analysis Delete Actions
Use-Case Analysis
Use-Case Analysis
Use-Case Analysis
Use-Case Analysis
Use-Case Analysis
Use-Case Analysis
Use-Case Analysis
AD – Decision Merges Use decisions to show where the threads merge again
AD – Clean Up
AD – Clean Up
AD – Clean Up
AD – Clean Up
AD – Clean Up
AD – Clean Up
Advanced AD - Swimlanes Swimlanes are similar to an object Represent organizational units or roles Allow assignment of activities to the organizational units or roles
Advanced AD - Swimlanes
Advanced AD - Swimlanes
Advanced AD - Swimlanes
Advanced AD - Swimlanes
Advanced AD - Swimlanes
Advanced AD - Swimlanes
Advanced AD - Swimlanes
Advanced AD - Swimlanes
Advanced AD - Swimlanes
Advanced AD – Object Flows Object flows are used to show how business entities are created and used in a workflow The object flow state represents the state of an object of a class as it participates in the workflow The same object can be manipulated by a number of successive activities that change the object's state. The same object can then be displayed multiple times in an activity graph, with each appearance representing a different state during its life.
Advanced AD – Object Flows Create or Select an Activity Diagram Select the Object tool Click on diagram to place Right click new object and select Open Specification
Advanced AD – Object Flows Enter Name Select <New> form State drop down list Enter Name for State Click OK twice Add Object Flow transitions to and from new object
Advanced AD – Object Flows
Advanced AD – Object Flows Re-open specification Open Class drop down list and select <New> Class Specification dialog opens Enter Name Select a Stereotype
Advanced AD – Object Flows
Advanced AD – Object Flows
Next Steps Homework Classes Ahead DAIDS Model Explode one top level use-case Concentrate on abstraction of detail Use modeling elements Business Use-Case Model Level Classes Ahead Actors and Use Case Diagrams Detailing Requirements with Requisite Pro (Parts 1 & 2) Sequence Diagrams State Transition Diagrams Collaboration Diagrams Reports SoDA