Skip to main content



      Home
Home » Eclipse Projects » Papyrus for Real Time » Transition name from different states to the same state(Transition name from different states to the same state)
Transition name from different states to the same state [message #1800846] Tue, 08 January 2019 21:05 Go to next message
Eclipse UserFriend
While trying to use the same transition name ("ToState3") for transitioning from different states (State1, State2) to a single state (State3), I am getting a validation error about the names being indistinguishable (see attached picture).

Please clarify if this is a limitation in Papyrus-RT or is there a way to have the same transition name for transitioning to the same state?
Re: Transition name from different states to the same state [message #1800900 is a reply to message #1800846] Wed, 09 January 2019 09:16 Go to previous messageGo to next message
Eclipse UserFriend
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 18:31 Go to previous messageGo to next message
Eclipse UserFriend
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.
Re: Transition name from different states to the same state [message #1800932 is a reply to message #1800930] Wed, 09 January 2019 20:34 Go to previous message
Eclipse UserFriend
Thanks!
Previous Topic:Exit out of Composite State
Next Topic:Local transitions
Goto Forum:
  


Current Time: Wed May 21 06:41:05 EDT 2025

Powered by FUDForum. Page generated in 0.05635 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top