[Interest] serialization of QStateMachine for recovery mode

Wegner iwegner at gmx.de
Thu Oct 10 20:41:55 CEST 2013

Hi list,
we are planning of using QStateMachine (excellent work, guys!) for a 
work flow driven application (tasks).

I am thinking of an architecture in which tasks have their own state 
machine (QState) that will be connected to the application state machine 
(QStateMachine) as sub states. (Has anyone done something like this so 
far? ...I guess so!)
I am thinking of separating state machine logic from the implementation 
of the actions (e.g. data driven algorithms) that are triggered by 
transitions; so a task and a task_state_machine class for each task.

Critical here is the feature to serialize the application state machine 
and the intended task state machines as I want to have a fall back if 
somebody pulls the plug (crash recovery)! Once the application comes 
back on it shall check for a possible crash and if so recover the state 
it was in before the crash.

I couldn’t find any documentation / blog / forum question on this so far 
so here it is.
Has anybody yet considered doing something similar?

A fall back would be to rebuild the state by analyzing data that was 
serialized as regularly done for crash recovery.
But this would make the state machine pattern complex!
Any ideas / experiences?

Best Regards,

..second mail as the first one was cut off because of HTML format

More information about the Interest mailing list