LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Statecharts: Whether internal states of a superstate execute their exit actions when transitioning out of the superstate

If, on a statechart, you have a superstate with multiple regions, and the transition to leave the superstate executes, will the active states inside of the superstate's regions execute their exit actions, as well as the superstate executing its exit action?  Or will only the superstate execute its exit action?  Do the states internal to the superstate simply abort?

 

If the states internal to the supestate execute their exit actions, do they execute them in any particular, predictable order?  Do they execute their exit actions before the superstate executes its exit actions?

 

I found the flow chart on this page

http://zone.ni.com/devzone/cda/tut/p/id/7413

but it doesn't seem to make things clear on this topic.  I see on the flow chart a couple of asterisks, but those asterisks aren't explained anywhere, as far as I can see.  I would sure like to know what those asterisks were supposed to mean.

 

Please let me know if I have to clarify my question, and thanks for any help that can be provided.

0 Kudos
Message 1 of 2
(1,969 Views)

The internal states that are active will also execute their exit actions. I do not recall the exact ordering, but it is deterministic (i.e., it won't change from one time to the next). I am guessing that the internal states fire their exit actions before the containing state. As to the ordering of the internal states, I think it may be based on the names of the containing regions. You could try some experiments with debugging enabled on the statechart and breakpoints in the different exit actions to see the exact ordering you will get for a particular scenario.

 

I'm not sure what the asterisks are supposed to mean either...

 

Hope that helps,

Nick

0 Kudos
Message 2 of 2
(1,960 Views)