In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail the example analysis of receiving call action and response action in EA drawing UML activity diagram. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
Accept call Action (AcceptCallAction)
AcceptCallAction is an action that accepts an event that represents the acceptance of a synchronous invocation request. In addition to the normal parameters, this action produces an output that provides return information for ReplyAction to return control to the caller.
This action is used for synchronous invocation, and if it is used to handle an asynchronous call, the subsequent reply action will not work.
Reply Action (ReplyAction)
ReplyAction is an action that accepts a set of return values and a return message from AcceptCallAction. The reply action returns the above information to the caller of the previous call to complete the execution of the entire call.
Example
Let's take solving the unary quadratic equation as an example, which is shown in a way that is closer to the actual development.
Look at the class diagram first.
The first is the Solution class, which is the solution of the univariate quadratic equation. We know that there are three cases of the solution of the unary quadratic equation: two solutions, one solution, no solution. Here we use DoubleSolution,SingleSolution,NullSolution to express it.
Next comes the Calculator class, which has a method solveEquation. The prototype of solveEquation is:
Solution* solveEquation (double a, double b, double c)
This time, take solveEquation as an example to illustrate the use of AcceptCallAction and ReplyAction.
Add an activity diagram
Right-click the Calculator node in [Project Browser] to open the context menu, select [Add]-[Add Diagram...], and then select to add an activity diagram named solveEquation.
Add AcceptCallAction
After dragging the Action icon from the toolbar to the active diagram and selecting AcceptCall, double-click the resulting AcceptCallAction drawing to open the properties dialog box.
Open the General property page and change the name to solveEquationEntry.
Open the Tiggers property page, enter solveEquation in the Name column, and select Type as Call. Next, after clicking the [...] button on the right side of the Specification column, select the solveEquation method of the Calculator class in the [Select Operation] dialog box and press the [OK] button.
After pressing the [Save] button in the following figure, press the [OK] button.
Right-click to open the context menu of AcceptCallAction in the activity diagram, select [New Child Element]-[ActionPin], and add three output pins.
Note: the ideal state should be to automatically generate three pins after selecting Trigger, but the author has not found a way yet, so add it manually first. Please be instructed by a master.
After doing the above, the AcceptCallAction node in [Project Browser] looks like this.
After dragging the returnInfomation pin to the AcceptCallAction in the activity diagram and adjusting the pin position, the AcceptCallAciton in the activity diagram looks like this.
The parameter of solveEquation is corresponding to the parameter of returnInformation. The next step is to transfer it to ReplyAction.
Add ReplyAction
After dragging the Action icon from the toolbar to the active diagram and selecting Reply, change the name to Solution.
Right-click AcceptCallAction to open the context menu, select [New Child Element]-[ActionPin], and set the name to empty and Type to Solution*.
After dragging the returnInfomation pin from the ReplyAction node in [Project Browser] to the ReplyAction in the activity diagram, and adjusting the pin position, the ReplyAciton in the activity diagram looks like this.
Usage summary
After making up for the other processes, you get the following activity diagram.
In this example, the solveEquationEntry action represents the acceptance of a synchronous invocation request. In addition to the general parameter, a _ c, this action produces an output returnInformation that provides return information for ReplyAction to return control to the caller.
The ReplySolution action accepts the return value Solution* and the returnInformation return information passed from AcceptCallAction and returns the above information to the caller of the previous call to complete the execution of the entire call.
This is the end of the article on "sample Analysis of receiving call Action and response Action in EA drawing UML activity Diagram". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.