I want to create the following state machine, with Boost MSM:
I would like to be able to prevent the Error
event to trigger the AllOk + Error == InError
transition if the orthogonal state is on "B". For example, specifying transition for all orthogonal states would be nice. Something like:
{AllOk, B} + Error == {AllOk, A}
However, I cannot find how to do it with Boost MSM, neither with regular UML nomenclature, which makes me think I am going the wrong way.
Is there a classic "UML idiomatic" to handle this kind of behavior?
I see two possible solutions:
- Put a guard on
AllOk + Error == InError
which checks if the other state isB
, like this response. - Send a more specific error (in my case,
CouldNotComputePath
, as I am programming a robot), and somehow transform it inError
if it is not handled. I am not really sure how to do it.