You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to filter my persisted state machines to only those which have not reached a final state. i.e. no point starting a machine which has already reached its final state. Currently there doesn't appear to be a good way to do this without starting the machine.
Perhaps it could be a method on the State prototype e.g.:
However this would prevent filtering db records without instantiating State for each of them. A serialisable flag would be preferable e.g.:
if(data.isFinal){interpret(machine).start(data)}// queryable from the db level:constdatas=awaitdb.query({isFinal: false})datas.forEach(data=>interpret(machine).start(data))
The text was updated successfully, but these errors were encountered:
Feature request
Originally discussed here: https://spectrum.chat/statecharts/general/detecting-state-machine-is-done~56dda5bc-8031-4840-96d7-f0458cca12d6
I would like to be able to filter my persisted state machines to only those which have not reached a final state. i.e. no point starting a machine which has already reached its final state. Currently there doesn't appear to be a good way to do this without starting the machine.
Perhaps it could be a method on the
State
prototype e.g.:However this would prevent filtering db records without instantiating
State
for each of them. A serialisable flag would be preferable e.g.:The text was updated successfully, but these errors were encountered: