Liking cljdoc? Tell your friends :D

com.fulcrologic.statecharts.algorithms.v20150901-impl

An implementation of the W3C SCXML Recommended Spec from 2015-09-01.

Uses an imperative style (internally) to match the pseudocode in the standard for easier translation, verification, and avoidance of subtle differences in implementation.

An implementation of the W3C SCXML Recommended Spec from 2015-09-01.

Uses an imperative style (internally) to match the pseudocode in the standard for easier translation,
verification, and avoidance of subtle differences in implementation.
raw docstring

add-ancestor-states-to-enter!clj/s

(add-ancestor-states-to-enter! {:com.fulcrologic.statecharts/keys [machine]
                                :as env}
                               state
                               ancestor
                               states-to-enter
                               states-for-default-entry
                               default-history-content)
source

add-descendant-states-to-enter!clj/s

(add-descendant-states-to-enter!
  {:com.fulcrologic.statecharts/keys [machine vwmem] :as env}
  state
  states-to-enter
  states-for-default-entry
  default-history-content)
source

before-event!clj/s

(before-event! {:com.fulcrologic.statecharts/keys [machine vwmem] :as env})

Steps that are run before processing the next event.

Steps that are run before processing the next event.
sourceraw docstring

cancel-active-invocations!clj/s

(cancel-active-invocations! {:com.fulcrologic.statecharts/keys [machine]
                             :as env}
                            state)
source

cancel-invoke!clj/s

(cancel-invoke! i)
source

cancel?clj/s

(cancel? event)
source

compute-done-data!clj/s

(compute-done-data! {:com.fulcrologic.statecharts/keys [machine vwmem data-model
                                                        execution-model]
                     :as env}
                    final-state)
source

compute-entry-set!clj/s

(compute-entry-set! {:com.fulcrologic.statecharts/keys [vwmem machine] :as env})

Returns [states-to-enter states-for-default-entry default-history-content].

Returns [states-to-enter states-for-default-entry default-history-content].
sourceraw docstring

compute-exit-setclj/s

(compute-exit-set {:com.fulcrologic.statecharts/keys [machine vwmem] :as env}
                  transitions)
source

condition-matchclj/s

(condition-match {:com.fulcrologic.statecharts/keys [machine execution-model]
                  :as env}
                 element-or-id)
source

configuration-problemsclj/s

(configuration-problems {:com.fulcrologic.statecharts/keys [machine vwmem]})

Returns a list of problems with the current machine's working-memory configuration (active states), if there are any.

Returns a list of problems with the current machine's working-memory configuration (active states), if there are
any.
sourceraw docstring

enter-states!clj/s

(enter-states! {:com.fulcrologic.statecharts/keys [machine vwmem] :as env})

Enters states, triggers actions, tracks long-running invocations, and returns updated working memory.

Enters states, triggers actions, tracks long-running invocations, and
returns updated working memory.
sourceraw docstring

execute!clj/s

(execute! {:com.fulcrologic.statecharts/keys [machine] :as env} s)

Run the executable content (immediate children) of s.

Run the executable content (immediate children) of s.
sourceraw docstring

execute-element-content!clj/smultimethod

Multimethod. Extensible mechanism for running the content of elements on the state machine. Dispatch by :node-type of the element itself.

Multimethod. Extensible mechanism for running the content of elements on the state machine. Dispatch by :node-type
of the element itself.
sourceraw docstring

execute-transition-content!clj/s

(execute-transition-content! {:com.fulcrologic.statecharts/keys [vwmem]
                              :as env})
source

exit-interpreter!clj/s

(exit-interpreter! {:com.fulcrologic.statecharts/keys [machine vwmem] :as env})
source

exit-states!clj/s

(exit-states! {:com.fulcrologic.statecharts/keys [machine vwmem] :as env})

Does all of the processing for exiting states. Returns new working memory.

Does all of the processing for exiting states. Returns new working memory.
sourceraw docstring

finalize!clj/s

(finalize! {:com.fulcrologic.statecharts/keys [machine] :as env}
           invocation
           event)

Run the finalize executable content for an event from an external invocation.

Run the finalize executable content for an event from an external invocation.
sourceraw docstring

forward!clj/s

(forward! env invocation event)
source

get-effective-target-statesclj/s

(get-effective-target-states {:com.fulcrologic.statecharts/keys [machine vwmem]
                              :as env}
                             t)
source

get-transition-domainclj/s

(get-transition-domain {:com.fulcrologic.statecharts/keys [machine] :as env} t)
source

handle-eventless-transitions!clj/s

(handle-eventless-transitions!
  {:com.fulcrologic.statecharts/keys [vwmem data-model] :as env})

Work through eventless transitions, returning the updated working memory

Work through eventless transitions, returning the updated working memory
sourceraw docstring

handle-external-invocations!clj/s

(handle-external-invocations!
  {:com.fulcrologic.statecharts/keys [machine vwmem event-queue] :as env}
  {:keys [invokeid] :as external-event})
source

in-final-state?clj/s

(in-final-state? {:com.fulcrologic.statecharts/keys [machine vwmem] :as env}
                 non-atomic-state)

Returns true if non-atomic-state is completely done.

Returns true if `non-atomic-state` is completely done.
sourceraw docstring

in-state-contextclj/smacro

(in-state-context env-sym state-or-id & body)

Change the env context to the given state element (you can supply id or element itself). Runs the body with the update env, and returns the last expression of the body. env changes to context are not visible outside of this block.

Change the `env` context to the given state element (you can supply id or element itself). Runs the `body` with
the update env, and returns the last expression of the body. `env` changes to context
are not visible outside of this block.
sourceraw docstring

initialize!clj/s

(initialize! {:com.fulcrologic.statecharts/keys [machine vwmem] :as env})

Initializes the state machine and creates an initial working memory for a new machine env. Auto-assigns a unique UUID for session ID.

This function processes the initial transition and returns the updated working memory from env.

Initializes the state machine and creates an initial working memory for a new machine env.
Auto-assigns a unique UUID for session ID.

This function processes the initial transition and returns the updated working memory from `env`.
sourceraw docstring

initialize-data-model!clj/s

(initialize-data-model! {:com.fulcrologic.statecharts/keys [machine data-model
                                                            execution-model]
                         :as env}
                        state)

Initialize the data models in volatile working memory wmem for the given states, if necessary.

Initialize the data models in volatile working memory `wmem` for the given states, if necessary.
sourceraw docstring

invoke!clj/s

(invoke! env invocation)
source

microstep!clj/s

(microstep! env)
source

process-event!clj/s

(process-event! {:com.fulcrologic.statecharts/keys [data-model vwmem] :as env}
                external-event)

Process the given external-event given a state machine with the working-memory as its current status/state. Returns the new version of working memory which you should save to pass into the next call. Typically this function is called by an overall processing system instead of directly.

Process the given `external-event` given a state `machine` with the `working-memory` as its current status/state.
Returns the new version of working memory which you should save to pass into the next call.  Typically this function
is called by an overall processing system instead of directly.
sourceraw docstring

remove-conflicting-transitionsclj/s

(remove-conflicting-transitions {:com.fulcrologic.statecharts/keys [machine]
                                 :as env}
                                enabled-transitions)

Updates working-mem so that enabled-transitions no longer includes any conflicting ones.

Updates working-mem so that enabled-transitions no longer includes any conflicting ones.
sourceraw docstring

run-exit-handlers!clj/s

(run-exit-handlers! {:com.fulcrologic.statecharts/keys [machine] :as env} state)

Run the exit handlers of state.

Run the exit handlers of `state`.
sourceraw docstring

run-invocations!clj/s

(run-invocations! {:com.fulcrologic.statecharts/keys [machine vwmem] :as env})
source

run-many!clj/s

(run-many! env nodes)

Run the code associated with the given nodes. Does NOT set context id of the nodes run.

Run the code associated with the given nodes. Does NOT set context id of the nodes run.
sourceraw docstring

runtime-envclj/s

(runtime-env env base-wmem)

Set up env to track live data that is needed during the algorithm.

Set up `env` to track live data that is needed during the algorithm.
sourceraw docstring

select-eventless-transitions!clj/s

(select-eventless-transitions!
  {:com.fulcrologic.statecharts/keys [machine vwmem] :as env})

Returns a new version of working memory with ::sc/enabled-transitions populated.

Returns a new version of working memory with ::sc/enabled-transitions populated.
sourceraw docstring

select-transitions!clj/s

(select-transitions! {:com.fulcrologic.statecharts/keys [machine vwmem] :as env}
                     event)

Returns a new version of working memory with ::sc/enabled-transitions populated.

Returns a new version of working memory with ::sc/enabled-transitions populated.
sourceraw docstring

select-transitions*clj/s

(select-transitions* machine configuration predicate)
source

send-done-event!clj/s

(send-done-event! env state)
source

session-idclj/s

(session-id {:com.fulcrologic.statecharts/keys [vwmem] :as env})

Returns the unique session id from an initialized env.

Returns the unique session id from an initialized `env`.
sourceraw docstring

with-processing-contextclj/smacro

(with-processing-context env & body)
source

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

× close