|
Re: Transition name from different states to the same state [message #1800900 is a reply to message #1800846] |
Wed, 09 January 2019 14:16 |
|
Hi,
This is the UML standard namespace constraint for distinguishable members: the transitions are members of the namespace that is the region containing them. See §7.8.10.7 of the UML 2.5.1 specification. This constraint is defined in terms of the membersAreDistinguishable() operation, which in turn depends on the NamedElement::isDistinguishableFrom(...) operation that is redefined by various kinds of NamedElement (for example, by BehavioralFeature §9.9.8.7 to distinguish by signature as well as by name). Transition (§14.5.11.7) and Region (§14.5.8.5) don't appear to override the operations that compute this constraint, so it looks like it is just required that all transitions in a region have different names.
However, it is up to an application (such as your model-to-model or model-to-text transformations) to interpret the significance of this constraint to its own needs.
HTH,
Christian
|
|
|
Re: Transition name from different states to the same state [message #1800930 is a reply to message #1800900] |
Wed, 09 January 2019 23:31 |
Ernesto Posse Messages: 438 Registered: March 2011 |
Senior Member |
|
|
To add to Christian's answer, the problem is indeed that you have to transitions with the exact same name, in the same namespace, and this is problematic for the tool, the code generator and the user.
The code generator will generate functions corresponding to transitions based on their names, so that could result in functions with the same name, which may not compile. Well, the code generator actually uses the qualified name of the element, and for transitions it will use the names of the source and target states, but only if no name has been given to the transition, so giving them the same name will result in conflicting names in the generated code.
From the point of view of the user, it is also confusing. Usually transition names have the purpose of documentation. If you have two transitions with the same name, how can a user looking at the diagram distinguish them? They can be differentiated by their source, target and/or trigger, but a user that sees the same name will be left wondering what's different about them. From a design methodology point of view it would be recommendable to use a different name.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03687 seconds