Methods for defining Temporal workflows
Methods for defining Temporal workflows
(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/startparams: A map containing the following
args: Passed from 'params' to temporal.client.core/start or temporal.client.core/signal-with-startsignals: 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 builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |