• Tidak ada hasil yang ditemukan

RUN LONGER..

RUN EASIER…

READ MORE & PRE-ORDER TODAY WWW.GAITEYE.COM Challenge the way we run

1349906_A6_4+0.indd 1 22-08-2014 12:56:57

The classes HOUSEKEEPING MANAGER, STOCK ITEM, SUPPLIER ORDER and SUPPLIER are represented by rectangles.

The classes have lifelines which are represented by the vertical dashed lines. The lifeline indicates the time period that its class object is communicating with the other objects.

The messages are shown as horizontal arrowed lines pointing in the direction the message is travelling, and include a label indicating the name of the message. The first message is usually shown at the top with subsequent messages being arranged below one another.

When messages are sent to an object this triggers a method (operation) within that object.

Sequence numbers can be added to the messages, though this is not usually necessary as the vertical order of messages indicates the sequence.

The activation boxes are shown as a vertical bar (in blue) over the lifeline and this indicates the period of time when an object is carrying out an operation often referred to as the focus of control. A large X is sometimes shown at the bottom of an activation box to indicate the destruction of an object at the end of its lifeline.

Note. Complex interactions may require more than one sequence diagram to fully represent the main and alternative scenarios.

Sequence diagrams are useful when you have a complex scenario to work through.

3.5 STATE MACHINE DIAGRAMS

As has already been shown, objects have behaviours and states. In order to understand the various states an object goes through during its existence a state machine diagram, sometimes referred to as a state transition diagram, can be drawn. This diagram shows the transitions between the states that an object may undergo, caused by internal or external events. State machine diagrams tend to be created when examining a class with a complex life cycle.

The state machine diagram shown below represents a university student and the various stages or states that they transition. The round-edged rectangles represent the states:- initially the student will be regarded as an applicant, then they will be enrolled, when they arrive they will be registered and normally they will complete their course. Whilst at the university they may be withdrawn either temporarily or permanently. The small solid circle is the initial state, i.e. when the object starts its interaction with the system. The arrows indicate the event that triggers the transition from one state to another. The solid circle with the border represents the object’s final state.

Download free eBooks at bookboon.com

Fig 3.13 A state machine diagram for a university student.

3.6 ACTIVITY DIAGRAMS

An activity diagram is used to show actions and events in the order they take place, along with their outcomes. The following activity diagram is based on the scenario described in Exercise 3 above. The solid circle represents the start state of the diagram. The rounded rectangle represents an activity (manual or automated), the arrow represents an event (something that happens at a time and place) and the diamond represents a decision or branch, the condition value can be shown and is referred to as a guard condition. Additional symbols that can be used are a flat rectangle bar which represents a synchronisation, a fork which allows activities to take place in parallel and a join which brings events together. The final state (end of diagram) is shown by a solid circle with a border.

Fig 3.14 An activity diagram for hotel stock ordering

Activity diagrams can be partitioned using pairs of lines referred to as “swimlanes” to show the activities which are performed by the different roles participating in the process.

A role can be a user type – e.g. manager – or a platform – e.g. a web server. In the above scenario all the activities are carried out by the hotel housekeeping manager so swimlanes have not been included.

Download free eBooks at bookboon.com

To create an activity diagram, consider the order in which activities take place and consider any conditions that may arise so that all the scenarios for the use case have been considered.

If you have produced a physical DFD this may help to identify the order of activities.

3.7 BUSINESS PROCESS MODELLING

One final graphical modelling technique that can be used to represent how systems work, showing the business processes, events and people involved, is the standard business process model and notation (BPMN) (Object Management Group Business Process Model and Notation, 2014). The BPMN can be used to model requirements and can also be used in later stages of the development cycle. Its purpose is to provide a standard notation which can be understood by analysts, developers and other business stakeholders. A diagram consists of events, activities (tasks), sequence flows and gateways, which control the direction of flows.

Download free eBooks at bookboon.com Click on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read moreClick on the ad to read more

PDF components for PHP developers

www.setasign.com

SETASIGN