You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/activities.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,13 +22,13 @@ An Activity implementation consists of defining a (defactivity) function. This f
22
22
23
23
## Registering Activities
24
24
25
-
By default, Activities are automatically registered simply by declaring a (defactivity). You may optionally manually declare specific Activities to register when creating Workers (see [worker-options](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.client.worker#worker-options)).
25
+
By default, Activities are automatically registered simply by declaring a (defactivity). You may optionally manually declare specific Activities to register when creating Workers (see [worker-options](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.client.worker#worker-options)).
26
26
27
27
*It should be noted that the name of the Activity is part of a contract, along with the arguments that the Activity accepts. Therefore, the Activity definition must be treated with care whenever code is refactored.*
28
28
29
29
## Starting Activity Executions
30
30
31
-
In this Clojure SDK, Activities are always started with either [invoke](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.activity#invoke) or [local-invoke](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.activity#local-invoke), both of which are called similarly. The primary difference between them is the execution model under the covers (See [What is a Local Activity](https://docs.temporal.io/concepts/what-is-a-local-activity/))
31
+
In this Clojure SDK, Activities are always started with either [invoke](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.activity#invoke) or [local-invoke](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.activity#local-invoke), both of which are called similarly. The primary difference between them is the execution model under the covers (See [What is a Local Activity](https://docs.temporal.io/concepts/what-is-a-local-activity/))
Copy file name to clipboardExpand all lines: doc/workflows.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Workflows are resilient programs, meaning that they will continue execution even
6
6
7
7
Workflows encapsulate execution/orchestration of Tasks which include Activities and child Workflows. They also need to react to external events, deal with Timeouts, etc.
8
8
9
-
In this Clojure SDK programming model, a Temporal Workflow is a function declared with ([defworkflow](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.workflow#defworkflow))
9
+
In this Clojure SDK programming model, a Temporal Workflow is a function declared with ([defworkflow](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.workflow#defworkflow))
10
10
11
11
```clojure
12
12
(defworkflowmy-workflow
@@ -16,7 +16,7 @@ In this Clojure SDK programming model, a Temporal Workflow is a function declare
16
16
17
17
## Implementing Workflows
18
18
19
-
A Workflow implementation consists of defining a (defworkflow) function. This function is invoked by the platform each time a new Workflow execution is started or retried. As soon as this method returns, the Workflow execution is considered as completed and the result is available to the caller via ([get-result](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.client.core#get-result)).
19
+
A Workflow implementation consists of defining a (defworkflow) function. This function is invoked by the platform each time a new Workflow execution is started or retried. As soon as this method returns, the Workflow execution is considered as completed and the result is available to the caller via ([get-result](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.client.core#get-result)).
20
20
21
21
### Example
22
22
@@ -49,17 +49,17 @@ There are some things however to think about when writing your Workflows, namely
49
49
50
50
## Registering Workflows
51
51
52
-
By default, Workflows are automatically registered simply by declaring a (defworkflow). You may optionally manually declare specific Workflows to register when creating Workers (see [worker-options](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.client.worker#worker-options)).
52
+
By default, Workflows are automatically registered simply by declaring a (defworkflow). You may optionally manually declare specific Workflows to register when creating Workers (see [worker-options](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.client.worker#worker-options)).
53
53
54
54
*It should be noted that the name of the workflow is part of a contract, along with the arguments that the workflow accepts. Therefore, the Workflow definition must be treated with care whenever code is refactored.*
55
55
56
56
## Starting Workflow Executions
57
57
58
58
In this Clojure SDK, Workflows are always started with the following flow:
2. Invoke [start](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.client.core#start) or [signal-with-start](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.client.core#signal-with-start). The `params` passed to these functions will be forwarded to the workflow and available as `args` in the request map of the Workflow.
62
-
3. Gather the asynchronous results with [get-result](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.client.core#get-result) which returns a promise and needs to be dereferenced.
2. Invoke [start](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.client.core#start) or [signal-with-start](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.client.core#signal-with-start). The `params` passed to these functions will be forwarded to the workflow and available as `args` in the request map of the Workflow.
62
+
3. Gather the asynchronous results with [get-result](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.client.core#get-result) which returns a promise and needs to be dereferenced.
63
63
64
64
### Example
65
65
@@ -92,7 +92,7 @@ Certain methods naturally return Workflow-safe Promises, such as invoking an Act
92
92
- "Originating" primitives, such as [create](https://funcool.github.io/promesa/latest/promesa.core.html#var-create), [resolved](https://funcool.github.io/promesa/latest/promesa.core.html#var-resolved), and [let](https://funcool.github.io/promesa/latest/promesa.core.html#var-let)
93
93
- Aggregating primitives, such as [all](https://funcool.github.io/promesa/latest/promesa.core.html#var-all) and [race](https://funcool.github.io/promesa/latest/promesa.core.html#var-race)
94
94
95
-
Instead, you must ensure that all promises originate with an SDK provided function, such as [invoke](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.activity#invoke) or [rejected](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.promise#rejected). For aggregating operations, see Temporal Safe options for [all](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.promise#all) and [race](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.promise#race).
95
+
Instead, you must ensure that all promises originate with an SDK provided function, such as [invoke](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.activity#invoke) or [rejected](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.promise#rejected). For aggregating operations, see Temporal Safe options for [all](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.promise#all) and [race](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.promise#race).
96
96
97
97
What this means in practice is that any promise chain should generally start with some Temporal-native promise.
98
98
@@ -147,15 +147,15 @@ Thus ensuring that the origination rules are met regardless of the outcome of th
147
147
148
148
### Await
149
149
150
-
You may use [await](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.core#await) to efficiently parks the Workflow until a provided predicate evaluates to true. The predicate is evaluated at each major state transition of the Workflow.
150
+
You may use [await](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.core#await) to efficiently parks the Workflow until a provided predicate evaluates to true. The predicate is evaluated at each major state transition of the Workflow.
151
151
152
152
### Temporal Signals
153
153
154
-
Your Workflow may send or receive [signals](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.signals).
154
+
Your Workflow may send or receive [signals](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.signals).
155
155
156
156
#### Receiving Signals
157
157
158
-
Your Workflow may either block waiting with signals with [<!](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.signals#%3C!) or use the non-blocking [poll](https://cljdoc.org/d/io.github.manetu/temporal-sdk/0.7.0/api/temporal.signals#poll). In either case, your Workflow needs to obtain the `signals` context provided in the Worklow request map.
158
+
Your Workflow may either block waiting with signals with [<!](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.signals#%3C!) or use the non-blocking [poll](https://cljdoc.org/d/io.github.manetu/temporal-sdk/CURRENT/api/temporal.signals#poll). In either case, your Workflow needs to obtain the `signals` context provided in the Worklow request map.
0 commit comments