Sequence diagram example

梦想的初衷 提交于 2019-12-08 13:43:03

问题


The use case to model is the register of a new appointment.

The user logins in the system as a patient (role). To make an appointment shoudl enter medical specialty and date. System shoudl look for the doctors availables for that specialty on that date. From the results patient should choose one and then system save the appointment. At the end user shoudl receive an email with the information of the appointment.

The classes that I have in my model are: User PAtient Doctor Appointment DoctorShcedule and some more but I think these ones will be involve.

I have this initial sequnce diagram:

I have problem to set the return messages and also with the email step.

Thanks


回答1:


I have problem to set the return messages and also with the email step.

There two notations for return messages either by sending a return message as you did in response to checkAvailability() or by writing the returned value or object behind the called method i.g. checkAvailability() : bool .

Sending a mail is an asynchonous operation and the mail leaves your system. I would suggest to introduce another class Mailer which should process the sendMail() message instead of your class user. Receiving the mail later is another use case and receiption of this mail doesn't belong into this sequence diagramm (IMHO).



来源:https://stackoverflow.com/questions/2935212/sequence-diagram-example

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!