23
Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: Conceptual Modeling of Information Systems (Chapters 11 and 12) A practical guide to SysML (chapter 8) – OMG Systems Modeling Language (OMG SysML) (Chapter 11) http://www.abelpumps.com/Information/News/Diaphragm_Pumps/diaphragm_pumps.html

Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Embed Size (px)

Citation preview

Page 1: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

ModellingClass T08

Conceptual Modelling – BehaviourFlow-Based Behavior

References:– Conceptual Modeling of Information Systems (Chapters 11 and 12)– A practical guide to SysML (chapter 8)– OMG Systems Modeling Language (OMG SysML) (Chapter 11)

http://www.abelpumps.com/Information/News/Diaphragm_Pumps/diaphragm_pumps.html

Page 2: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

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, …

Page 3: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

SysMLUML

Behavior in UML and SyML

3Modelação

Flow-based behavior

Event-based behavior

Message-based behavior

Page 4: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Behavior – Activity Diagrams

4Modelação

Flow-based behavior

Page 5: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

The behavioral schema

“The structural schema defines the types of the facts contained in the information base. These facts change over time, but they cannot change in any arbitrary way. Only some changes of the information base are permissible. These changes are called domain events. The definition of the domain event types is the most important part of the behavioral schema.”

Conceptual Modeling of Information Systems, page 247

Modelação 5

Page 6: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Systems and states…

(…) The state of a domain at any given point in time is the set of instances of the relevant entity and relationship types that exist in the domain at that time. (…) Most domains change over time, and therefore their state changes too. When the state of a domain changes, the information base must change accordingly. Of course, a domain cannot change in an arbitrary way. Only some changes are acceptable. The acceptable changes are called domain events. This concept (of a domain event) can be defined precisely in terms of a more basic concept, called a structural event (…)Conceptual Modeling of Information Systems, page 248

Modelação 6

Page 7: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Systems, states and events…

(…) We say that the state of the domain at time t changes if the domain state at that time, t, is different from the domain state at the previous time, t -1. Both states must satisfy all static constraints.

A state change is a set of one or more structural events. A structural event is an elementary change in the population of an entity or relationship type. The precise number and meaning of structural events depend on the conceptual modeling language used. Conceptual Modeling of Information Systems, page 248

In a more generic sense we can say that:

In a conceptual modeling project the precise number and meaning of structural events depend on the purpose of the project under way…

Modelação 7

Page 8: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Events as Activities…

“Activity modeling emphasizes the inputs, outputs, sequences, and conditions for coordinating other behaviors. It provides a flexible link to blocks owning those behaviors.”OMG Systems Modeling Language (OMG SysML) (Page 85)

“Activity is some work that is carried out; it might overlap several Use Cases or form only a part of one Use Case.”Enterprise Architecture User Guide

Modelação 8

Page 9: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Activities and actions…

An Activity organizes and specifies the participation of subordinate behaviors, such as sub-Activities or Actions, to reflect the control and data flow of a process. Activities are used in Activity diagrams for various modeling purposes, from procedural-type application development for system design, to business process modeling of organizational structures or work flow.Enterprise Architecture User Guide

In simple terms:–Activities are made of other Activities or of Actions.–Actions are Activities that are not decomposed.

Modelação 9

Page 10: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Activities and actions…

The following simple diagram of an Activity contains Action elements and includes input parameters and output parameters:Enterprise Architecture User Guide

Modelação 10

Page 11: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

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 11

Page 12: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Activity Diagrams…

Modelação 12

Page 13: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Activity Elements and Connectors

Modelação 13

Page 14: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Graphical Nodes on Activity Diagrams

Modelação 14

Actions (atomic activities)

Activities

Page 15: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Refinement of Activity elements

Modelação 15

Enterprise Architect uses this symbol to

represent refinement

Page 16: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Graphical Nodes on Activity Diagrams

Modelação 16

Actions:InitialFinal

Actions:PreconditionsPostconditions

Page 17: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Graphical Nodes on Activity Diagrams

Modelação 17

Simple transitions

Transitions with object flow

Fork and Join

Decision

Merge

Page 18: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Graphical Nodes on Activity Diagrams

Modelação 18

Partition lanes can provide context…

… or it can be made clear in the activity

box itself

Page 19: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Activities and Partitions

Modelação 19

Context of the activity (a class of the domain)

• Activities always must have a context, represented by the system’s entity responsible for its execution (this points the specific entity for this activity; we assume the rest of the diagram belongs to the context of other entity).

• Activity diagrams can use partitions (lanes) to represent multiple contexts

Page 20: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

More examples with partitions (lanes)

Modelação 20

Page 21: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Activities in UML and SysML…

• Main semantic differences are:– In UML Activities, control can only enable actions to start.– SysML extends control to support disabling of actions that are already executing.– A control value is an input or output of a control operator, which is how control

acts as data. A control operator can represent a complex logical operation that transforms its inputs to produce an output that controls other actions

– See section 8.6 of “A practical guide to SysML” for more details…

• For all the rest, Activities are quite the same in UML and SysML…

Modelação 21

Page 22: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

An example of an Activity Diagram in SysML

Modelação 22

Page 23: Modelling Class T08 Conceptual Modelling – Behaviour Flow-Based Behavior References: –Conceptual Modeling of Information Systems (Chapters 11 and 12) –A

Aggregating activities in SysMLActivities can be aggregated in block diagrams to represent all the activities of a specific context

Modelação 23