9. expanded use case -...

33
Desain slide ini dadaptasi dari University of San Fransisco 9. Expanded Use Case SIF15001 Analisis dan Perancangan Sistem Informasi Agi Putra Kharisma, S.T., M.T. Genap 2014/2015

Upload: lebao

Post on 23-Mar-2019

245 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Desain slide ini dadaptasi dari University of San Fransisco

9. Expanded Use Case

SIF15001

Analisis dan Perancangan Sistem Informasi

Agi Putra Kharisma, S.T., M.T.

Genap 2014/2015

Page 2: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Unified Process

Di sini

Page 3: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Apa yang dikerjakan?

Detailing or expanding a use case into a sequence of steps corresponds to refining the requirements analysis, especially the functional

requirements.

Technology and interfaces should be ignored at this point.

Page 4: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Langkah Membuat Expanded Use Case

1. Main Flow/Scenario

2. Alternate Flow/Scenario

Disebut juga happy path, karena tidak

mengandung error, failure, atau

exception.

Variant

Exception

Page 5: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

1. Main Flow/Default Sequence

the description of the use case process when everything goes right, that is, when no

alternate flow occurs.

Page 6: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Contoh Draft Expanded Use Case Versi 1 (1)

Page 7: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Contoh Draft Expanded Use Case Versi 1 (2)

Page 8: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

2. Alternate Flow

A use case specifies a process that can be performed in real life in a number of different

ways.

Page 9: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Penting...

Exceptions, however, instead of producing conditional tests in the main flow, must be

ignored by it, and handled separately.

Page 10: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Contoh Yang Tidak Baik

x

x

x

Dapat membingungkan....

Page 11: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Variants

• More than one possible ending. • Not a condition that prevents the use case

from concluding, because the use case still produces something.

Page 12: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Contoh Variant: 1

Pada use case Buy Books (gabungan dari use case

Order Books dan Pay Order), pembeli memiliki dua

pilihan, membayar sekarang atau menunda pembayaran

(menyimpan barang pada shopping chart).

Page 13: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Solusi 1 (1/3)

Page 14: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Solusi 1 (2/3)

Page 15: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Solusi 1 (3/3)

Page 16: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Contoh solusi lainnya...

Page 17: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Solusi 2 (1/2)

Page 18: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Solusi 2 (2/2)

Page 19: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Menentukan Jumlah Use Case Berdasarkan Skenario

Contoh kasus:

• A customer orders books and saves the shopping cart

to continue shopping later.

• A customer orders books and pays for them.

Apakah kasus di atas dijadikan 2 buah use case terpisah?

Ataukah dijadikan sebuah use case dengan 2 buah alternatif?

Masing – masing keputusan memiliki plus dan minusnya.

Page 20: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Exception Handling

Exception is an event that if not handled prevents a

process from proceeding.

Interesting exceptions in a use case flow are those in which

the user tries to send information that the system cannot

accept.

Each exception must be handled by an alternate flow that

corresponds to a branch of the main flow.

Page 21: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Contoh Use Case Dengan Exception

Page 22: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Exception Handler

An exception handler has at least four parts:

1. An identification code that consists of the number of the

step(s) that originates the exception followed by a letter

that identifies the exception.

2. The exception, which consists of a sentence that states

which business rule was broken

3. Corrective actions that consist of an alternate flow, that

is, a sequence of actions that should be performed to

correct the exception.

4. Finalization, which is the last line of the alternate flow and

indicates if and how the use case returns to the main flow

after performing the corrective actions.

Page 23: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception
Page 24: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception
Page 25: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Mandatory Steps

Depending on the direction the information goes, mandatory

steps may be identified as:

• System events [IN]: Steps that indicate that some

information is transmitted from the actors to the system.

• System returns [OUT]: Steps that indicate that some

information is transmitted from the system to the actors.

Page 26: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Contoh Use Case Dengan Mandatory Steps

Page 27: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Complimentary Steps

Complimentary steps does not represent an information flow between actors and the

system

Contoh:

• “the customer opens the bookstore homepage,”

• “the customer decides to buy books,”

• “the system asks the customer for identification,”

• ..etc

Page 28: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Unsuitable Steps

Use case yang mendeskripsikan sistem proses internal.

Ini harus dihindari!

Page 29: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception
Page 30: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Contoh included use cases and fragments (1/2)

Page 31: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Contoh included use cases and fragments (2/2)

Page 32: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Preconditions & Success Postconditions

• Preconditions are facts considered true before a use case

even starts.

• Success post conditions establish the results of a use

case, that is, what will be true after the use case is

executed.

Page 33: 9. Expanded Use Case - agipk.lecture.ub.ac.idagipk.lecture.ub.ac.id/.../02/APSI-20142015-09.-Expanded-Use-Case.pdf · Contoh Use Case Dengan Exception . Exception Handler An exception

Referensi

Raul Sidnei Wazlawick - Object-Oriented Analysis and Design

for Information Systems