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 == InErrorwhich 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 inErrorif it is not handled. I am not really sure how to do it.

Ok, I find a solution:
The Error event can be "catched" in the MainStateMachine. If it is not, an internal transition is triggered on the MainStateMachine, which will send the EnterError event to make the other orthogonal state switch to InError.