c++umlboost-msmstate-diagram

How to prevent orthogonal region transition for error handling


I want to create the following state machine, with Boost MSM:

Simplified FSM with error states in an orthogonal region

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:


Solution

  • 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.

    enter image description here