Methods for defining and implementing Temporal workflows
Methods for defining and implementing Temporal workflows
(await pred)
(await duration pred)
Efficiently parks the workflow until 'pred' evaluates to true. Re-evaluates on each state transition
Efficiently parks the workflow until 'pred' evaluates to true. Re-evaluates on each state transition
(defworkflow name params* & body)
Defines a new workflow, similar to defn, expecting a 2-arity parameter list and body. Should evaluate to something
serializable, which will become available for temporal.client.core/get-result
.
Arguments:
ctx
: Context passed through from temporal.client.worker/start
params
: A map containing the following
args
: Passed from 'params' to temporal.client.core/start
or temporal.client.core/signal-with-start
signals
: Signal context for use with signal calls such as temporal.signals/
and temporal.signals/poll
(defworkflow my-workflow
[ctx {{:keys [foo]} :args}]
...)
(let [w (create-workflow client my-workflow {:task-queue ::my-task-queue})]
(start w {:foo "bar"}))
Defines a new workflow, similar to defn, expecting a 2-arity parameter list and body. Should evaluate to something serializable, which will become available for [[temporal.client.core/get-result]]. Arguments: - `ctx`: Context passed through from [[temporal.client.worker/start]] - `params`: A map containing the following - `args`: Passed from 'params' to [[temporal.client.core/start]] or [[temporal.client.core/signal-with-start]] - `signals`: Signal context for use with signal calls such as [[temporal.signals/<!]] and [[temporal.signals/poll]] ```clojure (defworkflow my-workflow [ctx {{:keys [foo]} :args}] ...) (let [w (create-workflow client my-workflow {:task-queue ::my-task-queue})] (start w {:foo "bar"})) ```
(get-info)
Return info about the current workflow
Return info about the current workflow
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close