The function to update the context of the state machine.

Type declaration