Advanced use case diagrams, Textual specification PB007 Software engineering I Marián Macik originally by Stanislav Chren Week 03 Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 1 / 17 Relationships in use case diagrams In addition to the communication association between actors and use cases, there are other types of possible relationships: actor generalization use case generalization include extend Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 2 / 17 Actor generalization Actor generalization (inheritance) is the relationship between the general and specialized actors. General actors are often abstract, i.e. they do not represent a real role in the system. Specialized actor inherits all roles and relationships of the parent actor. Each expected occurrence of the parent actor can be substituted by any of its descendant actors. It is usually suitable when multiple actors share some of the use cases. Simplifies the semantics of the diagram. Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 3 / 17 Actor generalization - example Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 4 / 17 Use case generalization Use case generalization (inheritance) is the relationship between the general and specialized use cases. Specialized use case inherits the properties of its parent and it can add new properties or override inherited ones. Note.: it cannot overload parent’s extension points. The text specification of inherited use cases should mark the changes from the parent use case. Parent use case can be abstract (recommended), i.e. it has either no specification or incomplete specification of the event flow. Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 5 / 17 UC generalization - example Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 6 / 17 include include allows to extract steps that are repeated in multiple use cases into separate use case. The base use case is incomplete without all the included use cases. The included use case may or may not be complete. It should not be misused for functional decomposition Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 7 / 17 include Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 8 / 17 include Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 9 / 17 extend The extend relationship allows to add a new behaviour into an existing use case. The base use case contains extension points within the flow of events. The extension use case specifies to which extension points it is attached. The base use case does not know about its extension use cases. The extension use case is usually incomplete. It can contain multiple segments, each specifying their extension points. Multiple extension use cases can share the same extension points. In such case, it is appropriate to define conditions to determine which of them should be used in given situation. Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 10 / 17 extend Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 11 / 17 Textual specification of use cases Textual specification of use cases should contain: Name (ID) A brief description The primary actors The secondary actors Preconditions The main flow of events Post-conditions An alternative flow of events Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 12 / 17 Flow of events Main flow(Primary Scenario) of events is a sequence of steps in the interaction between actors and the system in the ideal case (i.e. without errors, interruptions, etc.) It always starts with an action from the primary actor. It is recommended to use the form: 1. The use case begins when, . The individual steps should be short, precise a understandable. Use the form: You can modify the flow with IF, FOR, WHILE, GOTO etc. The alternative flow represents deviations from the main flow caused by the errors and interruptions. It can be also used to capture more complex branching. Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 13 / 17 Information sources http://sce.uhcl.edu/helm/rationalunifiedprocess/ process/artifact/ar_ucmod.htm http://www.karonaconsulting.com/downloads/UseCases_ IncludesAndExtends.pdf Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 14 / 17 Tasks Review the initial use case diagram from the previous session. Fix any problems and consider the use of advanced relationships (include, extend, generalization). Briefly document all use cases. This will help to better understand the project. Choose 3 use cases (ideally the more complex ones) for detailed textual specification. The selection should be approved by the seminar tutor. The chosen use cases should use different colour in VP. Generate a PDF report and upload it to the homework vault (Week 03). Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 15 / 17 Rules for report submission 1 Submit the PDF report, not the VP source file and not an exported image. 2 PDF report must be created using the procedure shown on the seminars including the report settings. 3 The name of the PDF report file should be lastname1-lastname2-lastname3 of the team members. 4 PDF report must contain all diagrams modelled until now. 5 PDF report must be uploaded to the homework vault by the specified deadline. 6 PDF report must be uploaded to the correct homework vault. The name of the homework vault is always specified on the slides. 7 Each team uploads only a single PDF report for the whole team. 8 Submitted diagrams must be clear and readable. 9 Submitted diagrams should not contain serious mistakes. At least, they should not contain mistakes mentioned in the Catalogue of common mistakes. Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 16 / 17 VP report settings Software engineering I (PB007) Advanced UC diagrams, Txt specification Week 03 17 / 17