I have an application where the UI is driven by a QStateMachine
and some of the states can be described as "non interruptible" : once they are entered, the user has to interact with the UI and when it's done then the state can be exited but the transition might depends on external events.
Here is how i would illustrate the problem:
A : initial state
B : "non interruptible" state
C, D, .. : other states
and then some transitions :
event1 -> transition A_to_B
event2 -> transition B_to_C
event3 -> transition B_to_D
Now the application starts the state machine and enters A :
1 - the user click the UI which triggers a QSignalTransition
(event1).
2 - while in B, a remote server send something to the app and this should define if we'll enter C (event2) or D (event3) but only after B is exited properly.
The problem is that if we define transition statically (before the state machine is started) then when event2 or event3 are sent, the transition might cause B to be interrupted (let's say the user has not finish to select something for example)
Is it possible to dynamically change a transition between 2 states as soon as we know which one we need ?
Hope the description is clear.
Thank you.