It's the first time I draw an UML sequence diagram and I am not sure about few things.
I have a beacon which is a raspberry pi with bluetooth dongle. The server asks the beacon to start to change it's ID periodically(startIDRotation)
. The beacon broadcast and change them after each interval. When the smartphone wants to make a request, it includes the detected IDs, that the beacon is broadcasting in the request, with the requested file and send the request to the server. The server uses a logic represented in another activity diagram to decide if the user has access or not to the file and send back a response to the smartphone.
The first question is, is it correct to draw the line between the beacon and the smartphone? Because the beacon is not sending the IDs specifically to the beacon, it's just broadcasting them over bluetooth.
Is it possible to make a reference to another diagram type as the decision diagram is an activity diagram?
The server sends a post request to the beacon to start the rotation once, but it keep the state of the beacon and know that it's rotating its IDs. Shall this be represented as synchronous as I did or asynchronous?
If you have any other remark please feel free to correct me.
Yes. The line represents a message. And the life line represent an individual instance. When the phone receives the broadcast, this is the message sent. Since you did draw an open arrow, it indicates an asynchronous call. So that's perfect.
Yes. And you will do it the way you did, by adding a diagram reference. This represents details at the covered area. You can as well add arbitrary diagram references as shown below.
It depends. Most likely you will have a synchronous communacation (closed triangle) here, because the server want's to know whether the message has arrived and the beacon acknowledges the start of the activity.