to model a task (for example in business modelling)
to describe a function of a system represented by a use case
to describe the logic of an operation
to model the activities that make up the life cycle in the Unified Process
Elements of an Activity Diagrams Synchronization bar – horizontal or vertical bars denoting parallel or concurrent paths of activities Decision point – a diamond symbol containing a condition whose results provide transitions to different paths of activities Transition – a movement from one activity or state to another Activity a behavior that an object carries out while in a particular state
Create an activity diagram for the following dentist office system. Whenever new patients are seen for the first time, they complete a patient information form that asks their name, address, phone number and brief medical history, which are stored in the patient information file. When a patient calls to schedule a new appointment or change an existing appointment, the receptionist checks the appointment file for an available time. Once a good time is found for the patient, the appointment is scheduled. If the patient is a new patient, an incomplete entry is made in the patient file; the full information will be collected when they arrive for their appointment. Because appointments are often made so far in advance, the receptionist usually mails a reminder postcard to each patient two weeks before their appointment.
The use case is initiated by the customer. Customer inserts the bank-card and enters PIN. ATM SYSTEM authorizes the customer. ATM SYSTEM will eject the card if the authorization is unsuccessful and at the end of every transaction. Then the customer will take the card and leave. If the authorization is successful, ATM SYSTEM asks customer “how much” and the customer enters the amount and ATM SYSTEM checks if amount <= balance. If yes, customer gets the money and ATM SYSTEM updates balance. (Show two activities – customer getting money and ATM SYSTEM updating the balance as parallel events.) If amount > balance, ATM SYSTEM displays an error message and aborts the current transaction.