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

Example Analysis of StartClassifierBehavior and StartObjectBehavior in UML activity Diagram drawn by EA

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

Share

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

This article is to share with you the content of the sample analysis of StartClassifierBehavior and StartObjectBehavior in EA's UML activity diagram. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

With regard to invocation, there are two other actions that are not easy to distinguish: StartClassifierBehaviorAction and StartObjectBehaviorAction. It's hard to understand just by looking at the description. So the strategy this time is to explain the relevant knowledge first, and then explain these two actions. It will be done by then.

Behaviored Classifiers (behavioral category)

A behaviorized category is a category that can have ownedBehaviors, in which at most one behavior can be considered to define the behaviorized category itself. On the contrary, a behavioral class purpose called ownedBehavior takes the behavior category as its own (execution time) context. The definition of such a behavior can use the context behaviorization class purpose function, or it can refer to other elements visible to the context behaviorization class.

However, some behaviors can have context even though they are not the direct ownedBehavior of the behavioral category. In order to find the context of a behavior that is not a direct ownedBehavior, we can find it along the owner relationship chain that starts from that behavior, and the first behavior category encountered is our goal. Unless it is itself a behavior with a non-empty context. But even so, it can be seen as the context of the original behavior. For example, the context of the entry behavior of a state machine owned by a behavioral class is the category that owns the state machine rather than the state machine.

If a behavior has a context, then the execution of the behavior always has an associated context object, which is an instance of the context behavior category (as long as the behavior category is instantiable). A behavior without a context behavior category can be called as a stand-alone behavior. In this case, the behavior execution acts as its own context object. There is another case where the behavior execution acts as its own context object when the context behavior class cannot be instantiated. This is true when it is a component with the value of the isIndirectlyInstantiated attribute true or when it is a collaboration. That is, behavior execution always has a context, whether or not it has a clear, instantiable context behavior category.

Behavioral categories can have advanced ownedBehavior, which is called classifierBehavior. ClassiferBehavior describes the process that an instance of a category may go through during its life cycle. An instance of a behavioral class is created so that the behavioral class destination classifierBehavior is called; the resulting execution has this new instance as its context object. If this object is destroyed, execution is terminated.

The precise semantics of classifierBehavior depends on the type of behavioral class purpose that owns it. For example, a collaborative classifierBehavior represents the (emergent) behavior of all components, while the classifierBehavior of a class is only the behavior of the instance (the whole), which is different from the behavior of some parts of the instance. (However) A passive class should not have classiferBehavior.

In short:

Having a category of behavior subordinate to it is called a behavioral category.

The behavior owned by a behavioral category that defines the overall characteristics of that category is ownedBehaivor

If the execution of the ownerBehaivor is equivalent to the life cycle of the instance of the behavioral class, it is classifierBehavior.

The action to start ownedBehavior is StartObjectBehaviorAction

The action to start classifierBehavior is StartClassifierBehaviorAction.

To give an example

The stopwatch class can have a state machine that describes the overall behavior of the stopwatch, where the stopwatch class is the behavior category and the state machine is ownedBehavior.

Thread classes can be designed to create an instance to start execution, and delete an instance to terminate execution. Here the thread class is the behavioral category, and the content of the thread is classifierBehavior

In addition, StartObjectBehaviorAction is recommended in UML2.5, while StartClassifierBehaviorAction is retained for compatibility with older versions.

Thank you for reading! This is the end of the article on "sample Analysis of StartClassifierBehavior and StartObjectBehavior 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, you can share it out 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.

Share To

Internet Technology

Wechat

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

12
Report