Liking cljdoc? Tell your friends :D

com.fulcrologic.statecharts

Placeholder ns so we can use it for aliasing in clojure 1.10 and below

Placeholder ns so we can use it for aliasing in clojure 1.10 and below
raw docstring

No vars found in this namespace.

com.fulcrologic.statecharts.data-model.operations

Convenience helpers for interacting with DataModels

Convenience helpers for interacting with `DataModel`s
raw docstring

com.fulcrologic.statecharts.data-model.working-memory-data-model

An implementation of DataModel that stores the data in working memory itself.

Supports using src in data model for CLJ ONLY, which must be a URI that clojure.java.io/reader would accept.

Data retrieval resolves scopes by walking up the tree looking for parent states that have the data desired.

current-data is a merge of all state from root to the contextual state. get-at will NOT walk scopes, but supports simple keywords for the current context, and paths of the form [state-id data-key].

An implementation of DataModel that stores the data in working memory itself.

Supports using `src` in data model for CLJ ONLY, which must be a URI that clojure.java.io/reader
would accept.

Data retrieval resolves scopes by walking up the tree looking for parent states that have the data desired.

`current-data` is a merge of all state from root to the contextual state.
`get-at` will NOT walk scopes, but supports simple keywords for the current context, and paths of the form [state-id data-key].
raw docstring

com.fulcrologic.statecharts.elements

The elements you can define in charts. The intention is for this model to be potentially serializable for users that need that. Thus, the expressions used in these data structures MAY use CLJC functions/code, or may represent such elements a strings or other (quoted) EDN. The ExecutionModel is responsible for this part of the interpretation.

The overall data model is represented as a map. The DataModel implementation MAY choose scope and resolution rules. Location expressions are interpreted by the DataModel, but it is recommended they be keywords or vectors of keywords.

NOTE: The SCXML standard defines a number of elements (if, else, elseif, foreach, log) for abstract executable content. In cases where you want to transform an SCXML document to this library you should note that we treat those XML nodes as content that can be translated ON DOCUMENT READ into the code form used by this library.

The elements you can define in charts. The intention is for this model to be potentially serializable for users
that need that. Thus, the expressions used in these data structures *MAY* use CLJC functions/code, or may represent
such elements a strings or other (quoted) EDN. The ExecutionModel is responsible for this part of the interpretation.

The overall data model is represented as a map. The DataModel implementation MAY choose scope and resolution
rules. Location expressions are interpreted by the DataModel, but it is recommended they be keywords or vectors
of keywords.

NOTE: The SCXML standard defines a number of elements (if, else, elseif, foreach, log) for abstract
executable content. In cases where you want to transform an SCXML document to this library you should note that we
treat those XML nodes as content that can be translated ON DOCUMENT READ into the code form used by this library.
raw docstring

com.fulcrologic.statecharts.environment

Helper functions related to the environment used by models.

Helper functions related to the environment used by models.
raw docstring

com.fulcrologic.statecharts.event-queue.core-async-queue

A queue that uses core.async to give you single-session service with an external event queue. Send the queue the evts/cancel-event to exit your machine (without reaching the final state).

A queue that uses core.async to give you single-session service with an external event queue. Send
the queue the `evts/cancel-event` to exit your machine (without reaching the final state).
raw docstring

com.fulcrologic.statecharts.event-queue.manually-polled-queue

An event queue that does NOT process event delays via any kind of notification system. Delayed events will be queued, and will be kept invisible until you ask for an event AFTER the timout of the event has occured. This means you must manually poll this queue.

This queue DOES support any number of sessions, and maintains separate tracking for each.

This queue DOES NOT support communication with any other kind of system. Only other statecharts with session ids.

There is a helper (next-event-time session-id q) that will tell you when the next delayed event will be visible (as an inst) for a given session id.

This allows you to implement your delivery mechanism in concert with your overall system.

The process-next-event! of this implementation processes all available events in a loop and then returns.

An event queue that does NOT process event delays via any kind of notification system. Delayed events will
be queued, and will be kept invisible until you ask for an event AFTER the timout of the event has occured.
This means you must manually poll this queue.

This queue DOES support any number of sessions, and maintains separate tracking for each.

This queue DOES NOT support communication with any other kind of system. Only other statecharts with session ids.

There is a helper `(next-event-time session-id q)` that will tell you when the next delayed event will be visible
(as an inst) for a given session id.

This allows you to implement your delivery mechanism in concert with your overall system.

The `process-next-event!` of this implementation processes all available events in a loop and then returns.
raw docstring

com.fulcrologic.statecharts.events

See https://www.w3.org/TR/scxml/#events.

Note that there are built-in errors and events https://www.w3.org/TR/scxml/#errorsAndEvents.

See https://www.w3.org/TR/scxml/#events.

Note that there are built-in errors and events https://www.w3.org/TR/scxml/#errorsAndEvents.
raw docstring

com.fulcrologic.statecharts.execution-model.lambda

An execution model that expects expressions a conditions to be CLJ(C) expressions or functions. It integrates with the data model so that return values of scripts/expressions can return transactions for the data model. It also requires the event queue so it can send error events back to the machine if the expression has an error.

An execution model that expects expressions a conditions to be CLJ(C)
expressions or functions. It integrates with the data model so that return values
of scripts/expressions can return transactions for the data model. It also requires the event queue
so it can send error events back to the machine if the expression has an error.
raw docstring

com.fulcrologic.statecharts.protocols

Protocols for the various pluggable bits of this library:

Processor - A state machine processing algorithm. See com.fuclrologic.statecharts.algorithms. EventQueue - An external event queue for cross (and loopback) communication of machines and external services. DataModel - A model for saving/fetching data that can be directly manipulated by a state machine. ExecutionModel - A component that implements the interpretation of runnable code in the machine.

Many methods in the namespace take an env. This map will contain at least:

  • ::sc/vwmem A volatile (e.g. vswap!) holding working memory. The data model MAY place its data in this map under namespaced keys, but it should not modify any of the preexisting things in working memory. ** The working memory will contain ::sc/session-id
  • ::sc/context-element-id will be the ID of the state (or :ROOT) if the method is called by the Processor while working on behalf of a state.

::sc/machine - The machine definition ::sc/data-model - The current implementation of the DataModel ::sc/event-queue - The current implementation of the external EventQueue ::sc/execution-model - The current implementation of the ExecutionModel

Implementations of a Processor MAY place (or allow you to place) other namespaced keys in env as well.

Protocols for the various pluggable bits of this library:

 Processor - A state machine processing algorithm. See com.fuclrologic.statecharts.algorithms.
 EventQueue - An external event queue for cross (and loopback) communication of machines and external services.
 DataModel - A model for saving/fetching data that can be directly manipulated by a state machine.
 ExecutionModel - A component that implements the interpretation of runnable code in the machine.

 Many methods in the namespace take an `env`. This map will contain at least:

 * `::sc/vwmem` A volatile (e.g. vswap!) holding working memory. The data model MAY place its data
    in this map under namespaced keys, but it should not modify any of the preexisting things in working
    memory.
 ** The working memory will contain `::sc/session-id`
 * `::sc/context-element-id` will be the ID of the state (or :ROOT) if the method is called by the Processor while
   working on behalf of a state.

::sc/machine  - The machine definition
::sc/data-model - The current implementation of the DataModel
::sc/event-queue - The current implementation of the external EventQueue
::sc/execution-model - The current implementation of the ExecutionModel

Implementations of a Processor MAY place (or allow you to place) other namespaced keys in `env` as well.
raw docstring

com.fulcrologic.statecharts.simple

Functions that set up the simplest version of a state chart that uses the v20150901 implementation (version), a working memory data model, CLJC execution support, and an event queue that requires manual polling.

Functions that set up the simplest version of a state chart that uses the v20150901
implementation (version), a working memory data model,
CLJC execution support, and an event queue that requires manual polling.
raw docstring

com.fulcrologic.statecharts.specs

No vars found in this namespace.

com.fulcrologic.statecharts.state-machine

Implementation using a close approximation of https://www.w3.org/TR/2015/REC-scxml-20150901, including the suggested algorithm in that document, translated as closely as possible to CLJC. Future versions of the specification will appear as new namespaces to maintain compatibility through time.

::sc/k in the docstrings of this namespace assumes the alias [com.fulcrologic.statecharts :as sc], which can be generated as only an alias, though an empty namespace of that name does exist.

Implementation using a close approximation of https://www.w3.org/TR/2015/REC-scxml-20150901, including
the suggested algorithm in that document, translated as closely as possible to CLJC. Future versions of
the specification will appear as new namespaces to maintain compatibility through time.

::sc/k in the docstrings of this namespace assumes the alias `[com.fulcrologic.statecharts :as sc]`, which
can be generated as only an alias, though an empty namespace of that name does exist.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close