简体   繁体   English

序列图可以包含其类图对应的消息

[英]Can Sequence Diagrams have messages that their Class Diagram counterpart don't

I've been tasked with making a sequence diagram and this should be done via creating a new sequence diagram off of a class diagram, so I have access to all the actors, operations etc. I need to make a sequence diagram for making a booking and I've noticed that some of the messages that would be sent aren't represented in the original class diagram. 我的任务是制作一个序列图,这应该通过从类图创建一个新的序列图来完成,所以我可以访问所有的演员,操作等。我需要制作一个序列图来预订我注意到一些将要发送的消息没有在原始类图中表示。 For instance, I figured the controller would need to fetch available bookings from the db but I don't have such an operation in my class diagram. 例如,我认为控制器需要从数据库中获取可用的预订,但我的类图中没有这样的操作。 With sequence diagrams, can they only have functionality provided in the class diagram? 使用序列图,它们只能在类图中提供功能吗? Or is it okay that this operation doesn't exist in the class diagram? 或者可以在类图中不存在此操作吗? I was under the impression that if you find functionality that doesn't exist in the class diagram, it's most likely wrong but I'm not sure. 我的印象是,如果你发现类图中不存在的功能,那很可能是错的,但我不确定。

Well, it seems you have spotted a hole in your architecture then. 那么,你的架构似乎已经发现了一个漏洞。 And that's pretty much one major advantage of creating SDs. 这是创建SD的一个主要优势。 If there's a missing operation you have to contact the system architect and talk with him on how to fix it. 如果缺少操作,您必须联系系统架构师并与他讨论如何解决它。 In no case you just invent a message to have a nice looking diagram. 在任何情况下,您都不会发明一条消息,以获得漂亮的图表。 Only once the operation is identified you place a correct message with an annotation that it must be implemented - and after clarifying that with the system architect. 只有在识别出操作后,才会发出一条带有必须实现的注释的正确消息 - 并在向系统架构师澄清之后。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM