Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » 'internal' vs 'local' transitions
'internal' vs 'local' transitions [message #1777014] Thu, 23 November 2017 15:35 Go to next message
Juergen Dingel is currently offline Juergen DingelFriend
Messages: 42
Registered: January 2015
Member
Good morning,

the 'Properties' view of a transition contains buttons for 'internal', 'local', and 'external' kinds.

Assuming the transition is inside a composite state s, my understanding is that a 'local' transition t
- has s as source and target (i.e., it is a self transition), and
- does not leave s, i.e., entry/exit of s are not executed, and
- can be taken from any (direct) substate in s (since its source is a composite state), and
- upon completion, reactivates the substate that was active right before t was taken (i.e., implicit return to (deep) history).

What is an 'internal' transition?

As usual, 'thank you'!

Juergen
Re: 'internal' vs 'local' transitions [message #1777015 is a reply to message #1777014] Thu, 23 November 2017 15:41 Go to previous messageGo to next message
Juergen Dingel is currently offline Juergen DingelFriend
Messages: 42
Registered: January 2015
Member
Perhaps I can answer my own question.

Is an 'internal' transition a transition just like a 'local' (see above), except that it leads to a (direct) substate of s, i.e.,
after the transition is taken, the targetted substate becomes active and we do not 'return to history'?

Juergen
Re: 'internal' vs 'local' transitions [message #1777027 is a reply to message #1777014] Thu, 23 November 2017 16:34 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 351
Registered: March 2011
Senior Member
I think you have it backwards. What you are calling 'local' is internal and viceversa. From the UML 2.5 spec (formal-15-03-01, p. 312) [1]

Quote:

Transition kinds relative to source

The semantics of a Transition depend on its relationship to its source Vertex. Three different possibilities are defined, depending on the value of the Transition's kind attribute:

  • kind = external means that the Transition exits its source Vertex. If the Vertex is a State, then executing this Transition will result in the execution of any associated exit Behavior of that State.
  • kind = local is the opposite of external, meaning that the Transition does not exit its containing State (and, hence, the exit Behavior of the containing State will not be executed). However, for local Transitions the target Vertex must be different from its source Vertex. A local Transition can only exist within a composite State.
  • kind = internal is a special case of a local Transition that is a self-transition (i.e., with the same source and target States), such that the State is never exited (and, thus, not re-entered), which means that no exit or entry Behaviors are executed when this Transition is executed. This kind of Transition can only be defined if the source Vertex is a State.



[1] http://www.omg.org/spec/UML/2.5/

[Updated on: Thu, 23 November 2017 16:45]

Report message to a moderator

Re: 'internal' vs 'local' transitions [message #1777035 is a reply to message #1777027] Thu, 23 November 2017 20:06 Go to previous messageGo to next message
Juergen Dingel is currently offline Juergen DingelFriend
Messages: 42
Registered: January 2015
Member
Thanks (I guess I could have looked that up in the UML spec, too. Sorry about that)

Juergen
Re: 'internal' vs 'local' transitions [message #1777037 is a reply to message #1777035] Thu, 23 November 2017 20:15 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 351
Registered: March 2011
Senior Member
No problem. The UML spec is a large document (it was even larger pre 2.5), but I am now quite used to looking up things there. And in any case questions like this are OK, because not all UML-RT concepts are UML concepts and it is not obvious which concepts are inherited from UML and which are new.

Re: 'internal' vs 'local' transitions [message #1777056 is a reply to message #1777037] Fri, 24 November 2017 07:51 Go to previous message
Peter Cigehn is currently offline Peter CigehnFriend
Messages: 49
Registered: September 2014
Member
Hi,

Another important aspect I would say is that an 'internal' transition, compared to 'local' and 'external' transitions, is that that it is not visualized as an edge in the diagram. An 'internal' transition is only shown in the internal transitions compartment of the composite state.

So when it comes to the special case of self-transitions for a composite state you have external self-transitons shown as edges on the "outside" of the composite state, you have internal self-transitions shown as edges on the "inside" of the composite state, and you have internal transitions shown in the internal transitions compartment (both on the "inside" and "outside") of the composite state.

So in practice there is a recommendation to use internal self-transitions instead of local self-transitions, as well as external self-transitions in the case the composite state does not have any entry or exit code, to reduce graphical "clutter".

/Peter Cigéhn

PS. The compartment for internal transitions on the "inside" of a composite state is unfortunately shown inside the state frame itself, which can cause issues in case you have entry and exit points on the bottom border of the state frame. The idea is to have the internal transitions shown in a "compartment" outside and below the state frame itself. See bug 511471 tracking an improvement in this area. DS.
Previous Topic:What is the best way to add comments to model elements?
Next Topic:Is there a way to to assign command line parameters to capsule attributes?
Goto Forum:
  


Current Time: Sun Sep 23 10:49:09 GMT 2018

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

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

Back to the top