Transition name from different states to the same state [message #1800846] |
Tue, 08 January 2019 21:05  |
Eclipse User |
|
|
|
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 #1800930 is a reply to message #1800900] |
Wed, 09 January 2019 18:31   |
Eclipse User |
|
|
|
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.05635 seconds