This is related to a thread I started a while ago ("state as a
condition for an operation"), but not quite the same. Basically, I
modeled the status of an expense reported using a state machine (which
was easy), and then needed to allow the user to find all expenses that
have some status (say, "all approved expenses"). The problem is that
it is not possible to implement a condition such as:
this.status == Approved
because, as far as I know (and that previous thread confirmed) there
is no built-in way to refer to states in UML (no "state literals").
I ended up having to "creatively model" state literal extending some
other literal metaclass with a stereotype that allows me to reference
a state machine state (vertex).
So, the question is: can you think of a better way?
You can read more about this (including more details on the
application being developed) here:
Your feedback here or there is much welcome.