list of dots Digital Research Alliance of Canada logo  NSERC logo  University of Ottawa logo / UniversitĂ© d'Ottawa

User Manual    [Previous]   [Next]   

W062 Unspecified Event in Pooled State Machine

Umple semantic warning issued when the event "unspecified" is used in a pooled state machine

A pooled state machine cannot use the "unspecified" event in a transition. This is because the unspecified functionality is designed to handle events that occur unexpectedly, which only makes sense in a regular and pooled state machine. Pooled state machines instead just leave such events on the queue, and process events further back in the queue. In a pooled state machine, an event with the "unspecified" label is treated as a regular event and will be pooled.
To catch and immediately process unspecified events, a queued or regular state machine could be used instead.

Example

//The warning is generated for
//sm due to the use of the unspecified
//event
class A {
  pooled sm {
    s0 {
      unspecified -> s1;
    }
    s1 {
    }
  }
}
      

Load the above code into UmpleOnline

 

Solution to The Above So the Message No Longer Appears

//The warning can be avoided by using
//a queued state machine to be able
//to use the unspecified event
class A {
  queued sm {
    s0 {
      unspecified -> s1;
    }
    s1 {
    }
  }
}
      

Load the above code into UmpleOnline