Added state machine to the repair jobs