Liking cljdoc? Tell your friends :D

wf.engine

A set of protocols to be implemented by the engine record.

A set of protocols to be implemented by the engine record.
raw docstring

Callbackscljprotocol

(OPTIONAL) Not obligatory, but proven useful for providing custom side effects throughout all stages of context lifecycle.

(OPTIONAL) Not obligatory, but proven useful for providing custom side
effects throughout all stages of context lifecycle.

invoke-callback!clj

(invoke-callback! engine callback data)

Invokes a custom callback.

Invokes a custom callback.
sourceraw docstring

ContextStorecljprotocol

(OPTIONAL*) A set of interactions with the Context Store. This protocol is required for running flows with Pause and Expect nodes, as well as for deployments with elevated context commitment policy. (See wf.settings/commit-uninterrupted-context?)

(OPTIONAL*) A set of interactions with the Context Store. This protocol is
required for running flows with Pause and Expect nodes, as well as for
deployments with elevated context commitment policy.
(See wf.settings/*commit-uninterrupted-context?*)

commit-context!clj

(commit-context! engine context)

Puts or updates a context in the Context Store.

Puts or updates a context in the Context Store.

get-interrupted-contextsclj

(get-interrupted-contexts engine context-key)

Fetches all contexts matching given context key currently in Pause or Expect nodes.

Fetches all contexts matching given context key currently in Pause
or Expect nodes.
sourceraw docstring

Electioncljprotocol

(OPTIONAL) Provides means for custom flow election prior to context execution. Falls back to plain clojure.core/rand-nth.

(OPTIONAL) Provides means for custom flow election prior to context
execution. Falls back to plain clojure.core/rand-nth.

elect-flowclj

(elect-flow this matches event context-id)

Given a seq of matching flows and an incoming event, returns either one such pair, or nil. Matching flows are represented as pairs [flow matching-node-id]

Given a seq of matching flows and an incoming event, returns either one
such pair, or nil.
Matching flows are represented as pairs [flow matching-node-id]
sourceraw docstring

Enginecljprotocol

(REQUIRED) Core engine protocol.

(REQUIRED) Core engine protocol.

flow-by-idclj

(flow-by-id engine flow-id)

Returns an active flow by given flow id, or nil.

Returns an active flow by given flow id, or nil.

flowsclj

(flows engine)

Returns a seq of all active flows. This call will be overridden in case the engine satisfies the PartitionedFlows protocol.

Returns a seq of all active flows. This call will be overridden in case
the engine satisfies the PartitionedFlows protocol.

invoke-Fn!clj

(invoke-Fn! engine flow context args)

Executes the body of an Fn node with provided args, presumably, though not necessarily, for side effects. The value returned by the client fn will be stored in the :context/Fn-returns key of the current context and can be addressed in downstream execution. It should be noted that Fn return values are best kept as terse as possible.

Executes the body of an Fn node with provided args, presumably, though
not necessarily, for side effects. The value returned by the client fn
will be stored in the :context/Fn-returns key of the current context
and can be addressed in downstream execution. It should be noted that
Fn return values are best kept as terse as possible.
sourceraw docstring

Inheritancecljprotocol

(OPTIONAL) Useful for environments wherein a context lifespan is likely to outlast that of a flow, i.e. a flow may have already been substituted by an updated version by the time its spawning context is resumed. (See wf.settings/honor-flow-inheritance?)

(OPTIONAL) Useful for environments wherein a context lifespan is likely
to outlast that of a flow, i.e. a flow may have already been substituted
by an updated version by the time its spawning context is resumed.
(See wf.settings/*honor-flow-inheritance?*)

get-flow-by-ancestor-idclj

(get-flow-by-ancestor-id engine ancestor-flow-id)

Returns a flow that is a direct descendant of the flow with given id.

Returns a flow that is a direct descendant of the flow with given id.
sourceraw docstring

PartitionedFlowscljprotocol

(OPTIONAL) Increases overall processing rate when flow screenings are guaranteed to occur within a known (small) subset of flows.

(OPTIONAL) Increases overall processing rate when flow screenings are
guaranteed to occur within a known (small) subset of flows.

partitioned-flowsclj

(partitioned-flows engine)

Returns a partitioned map of arbitrary depth containing all active flows. This will be invoked instead of the flows method in the Engine protocol if an incoming event is supplied with a partition key.

Returns a partitioned map of arbitrary depth containing all active flows.
This will be invoked instead of the flows method in the Engine protocol
if an incoming event is supplied with a partition key.
sourceraw docstring

Schedulercljprotocol

(OPTIONAL*) Along with ContextStore, this protocol is relied on by the machinery of context interruptions and therefore is a requirement for the environments with Pause/Expect flows.

(OPTIONAL*) Along with ContextStore, this protocol is relied on by the
machinery of context interruptions and therefore is a requirement for
the environments with Pause/Expect flows.

schedule-context-resumption!clj

(schedule-context-resumption! engine context timeout)

Schedules a context interrupted by Pause or Expect to be resumed at a point in the future. timeout is a number of milliseconds to pass from the moment of execution. The resumed context is expected to be passed to wf.core/resume-context!.

Schedules a context interrupted by Pause or Expect to be resumed at
a point in the future. timeout is a number of milliseconds to pass
from the moment of execution. The resumed context is expected to be
passed to wf.core/resume-context!.

unschedule-context-resumption!clj

(unschedule-context-resumption! engine context)

Revokes a scheduled context resumption.

Revokes a scheduled context resumption.
sourceraw docstring

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

× close