(add-handlers! state-machine)
Adds all the state machine handlers for transitions
Adds all the state machine handlers for transitions
(ensure-path-fn state-machine)
Ensure the state-machine has a path-fn, by constructing it from the id if not provided.
Ensure the state-machine has a path-fn, by constructing it from the id if not provided.
(id->key k id)
Takes an (maybe namespaced) keyword and returns a new keyword, as follows e.g. :products -> :products/state :products/recommended -> :products.recommended/state
Takes an (maybe namespaced) keyword and returns a new keyword, as follows e.g. :products -> :products/state :products/recommended -> :products.recommended/state
(interceptor state-machine)
Generic interceptor for state machine interactions. Calls path-fn on event-v of the event to find the path.
Generic interceptor for state machine interactions. Calls path-fn on event-v of the event to find the path.
(register-subscriptions! state-machine)
Registers a subscription for the current state of the state machine, as well as the currently available transitions.
Calls path-fn on the query-v of the subscription to find the path.
Registers a subscription for the current state of the state machine, as well as the currently available transitions. Calls path-fn on the query-v of the subscription to find the path.
(states state-machine)
Returns all the states of a state machine
Returns all the states of a state machine
(transitions state-machine)
(transitions state-machine state)
Returns all the transition events in a state machine. If a state is provided as a second argument, returns all the transitions from that state
Returns all the transition events in a state machine. If a state is provided as a second argument, returns all the transitions from that state
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close