How is the state different from the machine?
How is a machine like a map? The map itself is not in any place. It just contains all the directions. Similarly, the machine itself is not in any state. It just contains all the possible transitions.
The state itself (mainly) contains two piece of information:
:connecting
, or [:connecting :handshake]
.
(see [Hierarchical States]({{< relref "docs/hierarchical-states.md" >}}) for
how to represent hierarchical states).The current state is expressed as a map like this:
{:_state :waiting
:user :jack
:backoff 3000}
_state
) is considered internal
to clj-statecharts. Application code could read them, but should not modify
them.How are machine/state connected to the higher level services?
A service is stateful, and we need it for two reasons:
Can you improve this documentation? These fine people already did:
Lucy Wang & Jacob MaineEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close