Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does EA mean by drawing UML activity diagrams?

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

Editor to share with you what EA drawing UML activity map means, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!

Semantic meaning

An activity is a description of behavior, which describes the order and concurrent steps of the calculation process. State machines are similar to activities in that they both describe the sequence of states that occur over a period of time and the conditions that cause changes between states. The difference between the two is that the state machine is concerned with the state of a single object that performs or experiences a calculation, while the activity focuses on the state of the computation itself, which may span multiple objects. and explicitly model the control flow and information flow between the active nodes.

The activity has input and output parameters that represent the values required for the execution of the activity and the values generated by the execution of the activity. Activities can be attached to various other behaviors as parameterized behaviors (behaviour).

The action (as well as the activity) requires tokens on all of its inputs and generates tokens on all outputs.

The execution rules are basically concurrent. If two active nodes are activated by different sets of tokens, they can execute concurrently. This means that there is no inherent order of execution between nodes.

-UML reference Manual (second Edition)

Example

The above content is from the UML reference manual, there is no problem in understanding Chinese itself, but it is not so easy to combine with practice. The process of solving the unary quadratic equation in our previous article is illustrated as an example. This part is original. Let's start with the picture.

The content in the middle fillet box SolveEquation is the activity. This activity is an explanation of solving the unary quadratic equation, which describes the sequence and concurrent steps of the calculation process.

The SolveEquation activity has three input parameters (coefficient amemb _ c) and one output parameter solution, which represent the values provided for the execution of the activity and the values generated by the execution of the activity.

The execution of SolveEquation is concurrent. If two active nodes are activated by different sets of tokens, they can execute concurrently. There is no inherent order of execution between these nodes.

When the InputA action (the aquired token 0 assumed here) is completed, when the token is transferred to InputB, the input an of the SolveEquation also gets the execution token, and the input pin of the node that uses the a variable inside the SolveEquation also gets the token.

There is also a judgment node to determine whether an is 0 or not. The judgment node has only one input and already has the execution condition, because an is not equal to 0, so the a pin of the action that calculates the delta value gets the token.

See the red line section in the following figure. All of this can be thought of as concurrently with InputB.

There are four processes in this branch, and the following three processes need to wait for the result of the delta calculation. The process of calculating delta needs to wait for tokens on the two input pins b and c.

After the InputB processing, while the InputC processing, the b pin gets the token and distributes it to the b pin of each Action within the SolveEquation processing. See the blue line section in the following figure.

At this point, the processing of calculating delta is still short of the token on the c pin has not arrived, and all processing continues to wait.

At the end of the InputC processing, the c pin gets a token and distributes it to all pins connected to the pink line. You can finally calculate the delta value.

After the delta value calculation is completed, according to the judgment result, the execution token is transmitted to the appropriate processing. At the end of this process, the calculation result is generated on the output pin and transferred to the output pin of the SoloveEquation activity with the token.

The above is all the content of the article "what is the meaning of activities in EA drawing UML activity diagram". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report