Apply command to state machine.