sequence-diagram

UML sequence diagram - how to represent method arguments that instantiate objects

北城以北 提交于 2021-02-05 05:57:28
问题 I'm not sure how to represent something like the following in a sequence diagram (in Ruby): class FirstClass def process thing = SecondClass.new('string argument', third_class, 2) end def third_class ThirdClass.new('another string argument',) end end The first message in the sequence is a call to an instance of FirstClass, and the part that's tripping me up is how to represent the ThirdClass.new being passed as an argument to the SecondClass initializer. 回答1: Basically you just show how and

How to model parallel threads in a UML sequence diagram

流过昼夜 提交于 2020-11-26 19:39:06
问题 How can I model two parallel threads that perform operations on an object in a sequence diagram? 回答1: In a sequence diagram, a lifeline represents an individual participant in the interaction. So your object that is shared between the threads should appear once and only once in the diagram. You would also represent with a lifeline each threaded object that interact with your shared object. It could be thread instantiations directly, or it could be several objects that are created in the

Referencing an instance of a given class in sequence diagrams

瘦欲@ 提交于 2020-02-03 21:28:48
问题 I have to model a system where an object of the class Person will invoke the static method getBook(...) : Book on the class Book which will return an instance of a particular book. How do you reference the book instance obtained by the operation? As of now, I can think of two approaches, neither of which I have ever seen/used, which is why I am looking for the correct approach. The first approach is to invoke methods directly on the book instance obtained, e.g. if the reference returned by

Referencing an instance of a given class in sequence diagrams

流过昼夜 提交于 2020-02-03 21:28:42
问题 I have to model a system where an object of the class Person will invoke the static method getBook(...) : Book on the class Book which will return an instance of a particular book. How do you reference the book instance obtained by the operation? As of now, I can think of two approaches, neither of which I have ever seen/used, which is why I am looking for the correct approach. The first approach is to invoke methods directly on the book instance obtained, e.g. if the reference returned by

What is the difference between sequence diagram and communication diagram?

陌路散爱 提交于 2020-01-12 05:22:10
问题 Could anyone explain me what is the difference between sequence diagram and communication diagram? 回答1: Both diagrams give the same information, but the sequence diagram emphasizes time in its layout and the communication diagram emphasizes the objects that are communicating in its layout. Time is implicit in sequence diagrams (it is inferred by vertical position), while it is given explicitly in communication diagrams (via numbers). To quote Scott Ambler The main difference between

Is there any way to export sequence diagram generated by visual studio?

给你一囗甜甜゛ 提交于 2020-01-11 08:15:27
问题 I am using Generate Sequence Diagram feature of Visual Studio. I have to show my sequence diagram to someone who don't have Visual Studio Ultimate Edition Is there any way to export the sequence diagram to any format so that it can be viewed outside Visual Studio? 回答1: This answer works in VS 2012: Open the sequence diagram select the whole diagram by CTRL+A copy it to the clipboard -> CTRL+C go to an open MS-Word document and hit CTRL+V to paste it the diagram is pasted and you can perform

Sequence Diagram Reverse Engineering

不羁岁月 提交于 2020-01-09 12:18:48
问题 I'm looking for a tool that will reverse engineer Java into a sequence diagram BUT also provides the ability to filter out calls to certain libraries. For example, the Netbeans IDE does a fantastic job of this but it includes all calls to String or Integer which clutter up the diagram to the point it is unusable. Any help is greatly appreciated!!!!!!! 回答1: I think jtracert is what you are looking for. It generates a sequence diagram from a running Java program. Also, because its output is a

Sequence diagram which returns a boolean

杀马特。学长 韩版系。学妹 提交于 2020-01-07 06:27:25
问题 I want to know how to return a value in a sequence diagram, for example: if(a>b) return true; else return false; 回答1: Here are two variants. Please, notice, that dashed line means returning message. Solid line with parameters - calling message. Full triangle arrow head means synchronous call. Line angle triangle arrow head means asychronous call. But in the return message arrow ALWAYS has such head. But if you really have so light cases as you have shown, it's better to use "alt" combined

designing an operation using uml sequence diagram

旧城冷巷雨未停 提交于 2020-01-06 14:14:22
问题 How to design this operation using the UML sequence diagram? Scenario: The Tasks (Controler Task) adds one line on the database, the Computer (Controler Computer) gets in loop the full lines of the database and when it detects a new added line in DB (Entity Task), it gets the IP address and the port number of the server (Controler Server) from the database (Entity Server) and then sends the message. Any brilliant suggestion, please? Thanks a lot! 回答1: Operation is behavioral feature. It has

Sequence Diagram for Login MVC Webapp

泪湿孤枕 提交于 2020-01-05 09:29:08
问题 i want to make a sequence diagram, which shows the login process in an .Net MVC Webapp (i.e. webshop). I am quite new to UML modeling, so i am not sure, how to build the interaction between, Controller, model and view. I found different solution online. Here are some question i have: Does the client interact with the view, or directly with the Controller (in my test Trial the client interacts with the Controller)? For the loginvalidation: In my test Trial the Controller ask the model, if the