Timeout Triggered Transition

The transition becomes enabled after the specified amount of time (the timeout) elapses, since the statechart comes to the source state of the transition. Such transition may be used to model delays and, combined with alternative transitions, timeouts.

Timeout triggered transition is depicted by the icon .

 To define a timeout triggered transition

  1. Select the transition in the graphical editor.
  2. In the Properties view, choose Timeout from the Triggered by drop-down list.
  3. Specify the timeout in the Timeout edit box below.

Functions

boolean isActive() - Returns true, if the transition is currently scheduled, false otherwise. 

double getRest() - Returns the time remaining before the scheduled occurrence of the transition, in model time units. If the transition is not scheduled, the function returns Double.POSITIVE_INFINITY.

double getRest(TimeUnits units) - Returns the time remaining before the scheduled occurrence of the transition, in given time units. If the transition is not scheduled, the function returns Double.POSITIVE_INFINITY.
Parameter:
 units - time unit constant

Example: transition.getRest(MINUTE) will return the remaining time in minutes.


Related topics

 Statecharts

 Transition

 Triggering a transition