Timeline for How to handle a state machine side effect being optional?
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 8, 2023 at 11:37 | answer | added | Laiv | timeline score: 5 | |
| Jun 8, 2023 at 10:20 | history | edited | Laiv | CC BY-SA 4.0 |
Tried to make some phrases less verbose to ease the reading
|
| Jun 8, 2023 at 10:06 | comment | added | fluminis | sending and/or blocking messages should be delegate to a dedicated component. your state machines should always call that dedicated component, and then transparently the component will decide if it should send message imediatly or store it to send a combined message later. | |
| Jun 8, 2023 at 9:00 | history | edited | PieterV | CC BY-SA 4.0 |
Added more specific context
|
| Jun 8, 2023 at 5:33 | comment | added | spaaarky21 | It's hard to say without more details on how everything is implemented, what's sending the message, etc. But the first question that comes to mind is whether the message is sent in response to entering a state (onEnter) when instead, it should be sent when transitioning (onTransition.) Often times, those are effectively the same but it makes a difference if a state machine's state is ever saved and then reinitialized/restored. | |
| Jun 7, 2023 at 15:39 | comment | added | Kilian Foth | You declare the transition as executing a certain action, and make the action do or not do something depending on the external variable, but keep both the variable and the action code outside the state machine. | |
| Jun 7, 2023 at 15:11 | history | asked | PieterV | CC BY-SA 4.0 |