We are in the process of migration from QStateMachine to QT SCXML on QT5.8.For example, we have the following stateMachine where the same event drivesmultiple transitions in the stateMachine,with C++ that implements the programmatic hooks like connectToState andconnectToEvent.

SCXML:

<state id="state1"><transition type="external" event="myEvent" target="state2"/></state><state id="state2"><!-- ... --></state><state id="state5"><transition type="external" event="myEvent" target="state6"/></state>c++:QVariantMap data;data.insert(QStringLiteral("param1"), 1);data.insert(QStringLiteral("param2"), 2);stateMachine->submitEvent("myEvent", data);stateMachine->connectToEvent("myEvent", [this](const QScxmlEvent &event){// We have access through event's parameters. however, it istechnically encapsulated from us// which transitions, if any, are going to be triggered by thisevent.});stateMachine->connectToState("state1", [this](bool active) {if (active){// We want to access the data from the incoming event.}});

stateMachine->connectToState("state5", [this](bool active) {if (active){// We want to access the data from the incoming event.}});The event is submitted with parameters, and we want to be able to accessthe parameters Events from a state, like how in QStateMachine where we canaccess event parameter through extending http://doc.qt.io/qt-5/qstate.html#onEntry

SCXML Events is a standalone entity (orthogonal to States), and events mayor may not trigger transitions.Although we do have access to the event parameter in connectToEvent, we donot know at this point whether transitions are going to be triggered and soit does not seem to be the right place to handle any State specific logic.In the example above, how would we get access to Event parameter for"state1" and "state5"?Best,Jonathan