I am new with UML and trying to draw an action made by the actor itself, and not sent to another actor. In this very simple example:
after receiving the code, the server has to verify if the userCode
is equal to code
. If this is the case, the server has to add the user to the verifiedUserList
. It should be something like [userCode == code] addToVerifiedList(userid)
.
Is it possible to draw such a scenario or sequence diagram to concentrate only on the communication between different actors?
I am also not sure if the triangle should be filled or not. I use a REST
web-server to perform POST and GET request for all the communications, is that considered as synchronous or asynchronous?
You can model it like this:
The
alt
fragment here has anok
part, where theaddToVerified
operation is called (a self-call). In theelse
part some error action is taken. And the return to the user will likely contain some informative message, which is not explicitly shown here.The filled message arrows means, that the operation is executed synchronously. The open arrows denote asynchronous operation. I'm not that firm with HTTP protocol, but IIRC, POST/GET are both sent asynchronously and the difference is just the URL creation. Also the return message from the server will be sent asynchronously.