I'm learning x-state and I'm overwhelmed about its functionality, but I'm having issues understanding history
nodes.
I'm creating a state which should hold the execution of the machine until an action is triggered:
So if the machine is in AwaitingEmployeeSignature
or AwaitingOnboardingCompletion
, and the EA_REDLINED
event is triggered, I want to move the machine to the Paused
state. But after a RESUME
event (which is not implemented), I want to resume the last state AwaitingEmployeeSignature
or AwaitingOnboardingCompletion
, depending on what was the state before the Paused
state
As I understand history nodes, it can achieve what I want, but as far as I understood, it doesn't hold this state, but when on it, it automatically moves to the last state (which is not what I want). How can I stay in the Paused
state, and only move to the previous state when the RESUME
event is triggered?
Thanks in advance!