Called when the machine enters a TerminateState.
TerminateState
void onMachineTerminated(Machine<S, E> machine) {}