-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
The immutable state pattern is problematic in nodes like delay.
the problem is this:
- Delay is triggered and it will check its "pending" state and if it is false, it will set its pending state to true and return that. Otherwise it will return immediately.
- Delay will then use an setTimeout to get execution back outside of the behave-graph system and then trigger its flow node. This happens outside of behave-graph trigging the node again, thus it doesn't get a state to operate on and it also can not return a state using the current design.
In order to get around this I could add these functions:
- getState() which will return the current state of a node.
- setState() which will set the current state of a node.
Then delay node could use this to modify it state outside of the standard execution flow.
Metadata
Metadata
Assignees
Labels
No labels