add a state update class

this class checks and updates the state transition of the mediation
process, not finished.