Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Papyrus for Real Time » How to use deep history in Papyrus-RT
How to use deep history in Papyrus-RT [message #1758353] Tue, 28 March 2017 02:26 Go to next message
John Dawes is currently offline John DawesFriend
Messages: 19
Registered: November 2016
Junior Member
Hi,

I am trying to use the deep history feature. But could not draw a transition that is originated from an entry point of a composite state and uses a deep history point placed inside the composite state as it's target. Papyrus-RT does not allow me to choose the deep history point as the target. Any feedback would be really helpful.

Thanks
Re: How to use deep history in Papyrus-RT [message #1758354 is a reply to message #1758353] Tue, 28 March 2017 02:46 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 361
Registered: March 2011
Senior Member
In UML-RT you *always* have deep-history. This means that when a transition ends at the boundary of a composite state or in an entry point that does not have a following transition segment inside the composite state, it is as if it ended up in the deep-history pseudo-state. Hence, the deep-history pseudo-state is redundant and unnecessary.

So, say that you have a composite state S1 with sub-states S11 and S12, with a transition t11 from S11 to S12, and an initial transition t10 to S11. Also suppose that there is a transition t1 that ends at S1's boundary. Then, the first time the transition t1 is taken, it will follow S1's initial transition t10 into S11. Suppose that then transition t11 is taken and end up in S12. And also suppose that later you exit S1 altogether. Now, if you exit S1, and take t1 again, then it will return to S12, rather than take the initial transition t10. There is no need for a deep-history pseudo state because it is implicit.

Re: How to use deep history in Papyrus-RT [message #1758356 is a reply to message #1758354] Tue, 28 March 2017 03:37 Go to previous messageGo to next message
John Dawes is currently offline John DawesFriend
Messages: 19
Registered: November 2016
Junior Member
Thank you for the response. But, what if we want to take another transition t2, instead of t1, while re-entering the composite state and still want to reach the last activated substate (which could be a state hiding deep down in the state nesting) in the composite state? Don't you think we would need deep history for such cases?
Re: How to use deep history in Papyrus-RT [message #1758381 is a reply to message #1758356] Tue, 28 March 2017 08:31 Go to previous messageGo to next message
Peter Cigehn is currently offline Peter CigehnFriend
Messages: 49
Registered: September 2014
Member
Hi,

Also for any transition t2 that ends at S1 will also go to deep history. You always have the implicit return to deep history semantic for transitions that ends on a boundary of a composite state or entry points, which don't have a continuing transition. To make this more clear there should really be an annotation on entry points, which don't have a continuing transition, showing H* to make this more clear. See bug 511738 for more information about this enhancement.

So in practice you should really never need to use an explicit deep history pseudo-state. But of course, if you choose to model it explicitly, it should be possible to draw a transition to it from an entry point, which as you have seen is not currently possible. I wrote bug 514292 to track this specific issue.

/Peter Cigéhn
Re: How to use deep history in Papyrus-RT [message #1758434 is a reply to message #1758381] Tue, 28 March 2017 16:25 Go to previous messageGo to next message
Ernesto Posse is currently offline Ernesto PosseFriend
Messages: 361
Registered: March 2011
Senior Member
Just to add to Peter's response, the rule I described indeed is for *any* transition that ends at the boundary of a composite state. There is no difference between t1, the first time you get to S1, or any other transition such as t2 that comes from elsewhere. Furthermore, this rule even holds for transitions coming from *inside* the composite state. For example. you can draw a transition t12 from S12 to S1's boundary and it will implicitly go to history, so in effect, when you take t12, it will go to history and therefore it will go back to S12. The same holds for internal transitions. An internal transition t12 from S1 to S1 is essentially both a group transition and a transition into history, so it will potentially be enabled in any substate of S1, and if taken, it will go back to the sub state that was active when it triggered.
Re: How to use deep history in Papyrus-RT [message #1758489 is a reply to message #1758434] Wed, 29 March 2017 09:04 Go to previous message
Peter Cigehn is currently offline Peter CigehnFriend
Messages: 49
Registered: September 2014
Member
Hi,

And as a followup to Ernesto's response, you can take a look at the screen shot attached to bug 511738. There you have an example also for transition t1 coming from State1 inside of the composiste state State2. You can see the H* annotation also showing on the exit point (since it does not have a continuing transition on the outside of the composite state).

Keep in mind that this is a screen shot from the legacy tooling, but the proposal with this bug is to introduce something similar also in Papyrus-RT.

Hope this clarifies it even further.

/Peter Cigéhn
Previous Topic:Attaching data with a timeout signal
Next Topic:Papyrus-RT v0.9 is available
Goto Forum:
  


Current Time: Sat Nov 17 06:38:04 GMT 2018

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

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

Back to the top