270 likes | 484 Views
Event Modelling. and the entity life history. Content. Event modelling What is an event? Event analysis The entity life history ELH notation ELH production. Event modelling. Previous views of the system have dealt with information flow (DFDs) information held (LDSs) Event modelling.
E N D
Event Modelling and the entity life history
Content • Event modelling • What is an event? • Event analysis • The entity life history • ELH notation • ELH production
Event modelling Previous views of the system have dealt with • information flow (DFDs) • information held (LDSs) Event modelling examines the system from the viewpoint of how information is changed
Why Model Events? • This is the 3rd perspective we have used to look at the same system • We have not yet looked at any sequence of events • May identify extra processes to be added to DFD • May identify extra attributes to be added to LDS
What is an event? An event is A system can be thought of as existing to respond to a collection of events. Events may cause entities to be altered. something that occurs outside the system that requires a system response
The event list • Describes events in the environment to which the system must respond • Helps to define the scope of the system • Can be built up from the initial requirement document, context diagram and LDS.
Event types Three types of event have been identified: • flow-oriented • temporal • control Each is activated by a stimulus and will invoke a process which will cause a response
Flow-oriented events An independent occurrence that takes place outside the system and causes activity to take place inside the system when a stimulus is presented to the system
Temporal events An occurrence of time that causes activity within the system and usually results in a system response
Control events An occurrence of an anomaly that is recognised by the system, and which requires action
EVENT System Response Identifying events An external event is something happening in the universe that motivates a source to present a stimulus to the system. Source Sink
Events and entities • The properties of an entity may be affected during its lifetime • These changes are significant in that they affect the way that the system deals with them • An entity may have one or more of these change patterns. The collection is called theentity life history
Entity life histories (1) An entity life history (ELH) shows the full set of changes that can possibly occur to the information within the system, together with the context of each change
Entity life histories (2) • Entities in the system interact • Behaviour of entities is a reaction to events • Entities have a life-cycle A human is born, named, married, divorced, employed, unemployed, retires, dies The entity person will have to reflect these events (i.e. be in the correct state)
Entity life histories (3) • States may occur randomly because the events occur randomly • However there may be some underlying logic giving order to states • cannot get divorced unless married • cannot die unless born • cannot get married unless single
Entity life histories (4) • Attribute types are used to record which events have occurred Attribute type Event Date of death Person dies Marital status Person marries Married/Single Name of person Person named
Entity life histories (5) • Identify events that cause an entity to be • created • updated • deleted • An event is a trigger for a process to update data • Events may affect many entities, and an entity can be affected by many events
Entity A Event 1 Event 2 Event 3 ELH notation (1) Sequence Nothing can happen to entity A before event 1 Event 1 must happen before event 2
Entity A Event 4 Event 5 Event 4 Event 5 ELH notation (2) Selection Entity A
Event 7 Event 8 ELH notation (3) Iteration Parallel structures Entity A * Event 6 Entity A
Event 20 Event 21 ELH notation (4) Quit and resume (Try to avoid) Entity A R1 Any Label Event 10 Event 11 Q1
Event 21 ELH notation (5) Quit and resume (better) Entity A Any Label Event 11 Any Label Event 20 Event 10
ELH production (1) 1. Identify events • those from the ‘real world’ • internal conditions met 2. Construct a matrix Events 1 2 3 4 5 A C U U D Entities B C C U C U U D
Bank Account Acct Opened Acct Life Acct Closure Acct Deletion * Transaction Cash Dep Cash W/D ELH production (2) 3. Produce an ELH for each entity Account Opened Cash Deposit Cash Withdrawal Account Closure Account Deletion Account Bank C U U U D
1 2 Additional notation Operations associated with an event States • valid & new state Operation list 1. Store account details 2. Set initial balance New Acct Acct Life Cash w/d New Acct 1/1, 1/2 -/1