开发者

How to represent Listeners in UML sequence diagram

开发者 https://www.devze.com 2023-04-07 07:44 出处:网络
In sequence diagrams, how would you represent an event triggered listener? It is not just a regular method call, so displaying like that would not seem correct.

In sequence diagrams, how would you represent an event triggered listener? It is not just a regular method call, so displaying like that would not seem correct.

I try to make a sequence diagram of a system including a JMS listener. I could start the lifeline with the send() call of the system to the JMS queue (d开发者_开发知识库isplaying the system calling send() as a business actor), or I could start the lifeline at the onMessage() call. (displaying JMS Queue as a business actor) Or should I just ignore the whole JMS Queue in the diagram?

For what it's worth: I'm using Astah Community to create the diagrams.


It is usually not important if you either use an "event" or an explicit "method call". What is your audience and how do you model the JMS listern? I would assume the JMS Listener is just another actor, and if your audience is on the "requirements" level I would simply use an event (a message in a sequence diagram usually can be of various "types" like event, message, or method call).


A found message is a message where the receiving event occurrence is known, but there is no (known) sending event occurrence. We interpret this to be because the origin of the message is outside the scope of the description. This may for example be noise or other activity that we do not want to describe in detail. The semantics is simply the trace (receiveEvent)

A lost message is a message where the sending event occurrence is known, but there is no receiving event occurrence. We interpret this to be because the message never reached its destination. The semantics is simply the trace (sendEvent).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号