Support state machine data serialize and deserialize