Modelling Class T07 Conceptual Modelling – Behaviour References: –Conceptual Modeling of...
-
Upload
jennifer-phillips -
Category
Documents
-
view
215 -
download
0
Transcript of Modelling Class T07 Conceptual Modelling – Behaviour References: –Conceptual Modeling of...
ModellingClass T07
Conceptual Modelling – Behaviour
References:– Conceptual Modeling of Information Systems (Chapters 11, 12, 13 and 14)
http://www.hazelhenderson.com/repOfHumanBehavior.html
Modelação 2
ProgramT01-T02 – Module 1 - Introduction to Systems ModelingT03-T06 – Module 2 - Conceptual Modeling – Domain
T07-T11 – Module 3 - Conceptual Modeling – Behavior1. Overview2. Flow-Based Behavior3. Message Based Behavior4. Event Based Behavior5. Revision
T12-T15 – Module 4 - Ontology
T16-T19 – Module 5 - Conceptual Modeling – ArchitectureT20-T21 – Module 6 - Conceptual Modeling – MethodologiesT22-T23 – Module 7 - Ontology: Advanced
T24-T25 - Conceptual Modeling – Global Revisions; Exercises, …
Behavior in UML
3Modelação
Behavior in SysML
4Modelação
Behavior in UML and SyML
5Modelação
UML SysML
Behavior – Use Case Diagrams
6Modelação
Use Case Diagrams
• Use cases describes an interaction between a system and
an actor (an external entity).
• The description must be provided from the point of
view of the actor!
• Therefore, a use case describes "who" can do or is
affected by "what" with or from the system.
• Use cases are also useful to make the bridge between the
requirements documenting and the modeling of the
detailed systems’ behavior
Modelação 7
Modelação 8
The use case template…Name UC-8: Search
Summary All occurrences of a search term are replaced with replacement text.
Rationale While editing a document, many users find that there is text somewhere in the file being edited that needs to be replaced, but searching for it manually by looking through the entire document is time-consuming and ineffective. The search-and-replace function allows the user to find it automatically and replace it with specified text. Sometimes this term is repeated in many places and needs to be replaced. Other times, only the first occurrence should be replaced. The user may also wish to simply find the location of that text without replacing it.
Users All users
Preconditions A document is loaded and being edited.
Basic Course of Events
1. The user indicates that the software is to perform a search-and-replace in the document.2. The software responds by requesting the search term and the replacement text.3. The user inputs the search term and replacement text and indicates that all occurrences are to
be replaced.4. The software replaces all occurrences of the search term with the replacement text.
Alternative Paths
1. In step 3, the user indicates that only the first occurrence is to be replaced. In this case, the software finds the first occurrence of the search term in the document being edited and replaces it with the replacement text. The postcondition state is identical, except only the first occurrence is replaced, and the replacement text is highlighted.
2. In step 3, the user indicates that the software is only to search and not replace, and does not specify replacement text. In this case, the software highlights the first occurrence of the search term and the use case ends.
3. The user may decide to abort the search-and-replace operation at any time during steps 1, 2 or 3. In this case, the software returns to the precondition state.
Postconditions All occurrences of the search term have been replaced with the replacement text.
Not to forget: Use cases are instantiated in scenarios!!!
Use case diagram -«include» and «extend»
Modelação 9
uc HSUVUseCases [Operational Use Cases]
HybridSUV
Driv er Accelerate
Steer
Brake
Park
Start the v ehicle
Driv e the v ehicle
«include»
«include»
«include»
«extend»
«include»
SysMLUML
Behavior in UML and SyML
10Modelação
Flow-based behavior
Event-based behavior
Message-based behavior
Behavior – Activity Diagrams
11Modelação
Flow-based behavior
Activity Diagrams (UML)• An activity diagram is used to display the sequence of activities involving one or more
entities of the system. They show an workflow detailing the decision paths.• Activity diagrams are useful for business modeling where they are used for detailing the
processes involved in business activities.
Modelação 12
Activity Diagrams (SysML)
An example…
Modelação 13
Behavior – Interactions (messages)…
14Modelação
Message-based behavior
Interactions (messages)
• Interactions represent exchanges of messages between objects…
Modelação 15
Pre-defined Interactions in SysML Predefined interactions in UMLCall
Return
Send
Create
Destroy
Interactions (messages)
Semantics of the graphic elements:
Modelação 16
Synchronous message
Return to a synchronous message
Asynchronous message
Creation of a new object
Behavior – Sequence Diagrams
17Modelação
Sequence Diagrams (UML; SysML)• A way to represent interactions between objects, among time…• Stress the lifetime of the objects in a specific execution context.
Modelação 18
Behavior – Communication Diagrams
19Modelação
Communication Diagrams (UML)• Show interactions but stressing the relations between the objects
involved• Relevant to stress collaboration patterns among the objects
Modelação 20
Behavior – Timing Diagrams
21Modelação
Timing Diagrams (UML)
• Stress state changes in objects over time…
• It can represent the same information as in the interactions diagrams and state machine diagrams, but now with detailed information about temporal restrictions and lengths…
Modelação 22
Behavior – Interaction Overview Diagrams
23Modelação
Interaction Overview Diagrams (UML)• Interaction overview diagrams in UML are relevant to describe
sequences of action.
• These diagrams combine elements of activity diagrams with sequence diagrams to show the sequences of action. The elements represented are references to other existing diagrams (activity or interaction in general…).
Modelação 24
Behavior – State Machine Diagrams
25Modelação
Event-based behavior
State Machine Diagrams (UML; SysML)
• A state machine diagram models the behavior of a single object, specifying the sequence of events that object goes through during its lifetime in response to events.
Modelação 26
Please never forget that:
“A model is the explicit interpretation of one’s understanding of a situation, or merely of one’s ideas about that situation. It can be expressed in mathematics, symbols or words, but it is essentially a description of entities, processes or attributes and the relationships between them. It may be prescriptive or illustrative, but above all, it must be useful”Brian Wilson. Systems: Concepts, Methodologies and Applications. John Wiley and Sons, 1990, 2nd Edition, page 11
Modelação 27
http://new-brunswick.net/new-brunswick/sharks/behavior.html
Modelação 28