designing an operation using uml sequence diagram

2019-09-02 05:32发布

问题:

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 no behavior definition. If operation defined, it means, that there is usually a behavior defined in context of classifier (or specialized classifiers) which can be invoked by operation. Operation and behavior are usually connected. Operation plays role of specification of behavior and behavior is a method, how instance of classifier will behave. To define the behavior, use some of behavioral diagrams (Activity, StateMachine, Interaction ...) Descrition that you provided mostly corresponds to Activity.