In Umple state machines' guards, I'm missing an "in state" predicate that returns true if the state machine is in a given state. Does this function exists?
Yes, there is. Call the get function on the state machine to get the state, and then compare the result to the enumeration whose name is the state machine followed by a dot followed by the state. See below for an example where a query is being done in method m1()
class X {
sm {
s1 {
a-> s2;
}
s2 {}
}
public m1 () {
if(getSm()==Sm.s1) {
// do something
}
}
}
It is a good point that this should be documented in the user manual