Liking cljdoc? Tell your friends :D

temporal.promise

Methods for managing promises from pending activities from within workflows

Methods for managing promises from pending activities from within workflows
raw docstring

allclj

(all coll)

Returns Promise that becomes completed when all arguments are completed.

N.B. A single promise failure causes resulting promise to deliver the failure immediately.

Similar to promesa/all but designed to work with promises returned from temporal.activity/invoke from within workflow context.

(-> (all [(a/invoke activity-a ..) (a/invoke activity-b ..)])
    (promesa.core/then (fn [[a-result b-result]] ...)))
Returns Promise that becomes completed when all arguments are completed.

*N.B. A single promise failure causes resulting promise to deliver the failure immediately.*

Similar to [promesa/all](https://funcool.github.io/promesa/latest/promesa.core.html#var-all) but designed to work with
promises returned from [[temporal.activity/invoke]] from within workflow context.

```clojure
(-> (all [(a/invoke activity-a ..) (a/invoke activity-b ..)])
    (promesa.core/then (fn [[a-result b-result]] ...)))
```
sourceraw docstring

all-settledclj

(all-settled coll)

Returns a Promise that becomes completed/failed when all the arguments are done/settled, even in the face of errors.

N.B. You must handle the exceptions in the returned promise with promesa

Similar to promesa/all but designed to work with promises returned from temporal.activity/invoke from within workflow context.

For more Java SDK samples example look here: https://github.com/temporalio/samples-java/tree/main/core/src/main/java/io/temporal/samples/batch

(-> (all-settled [(a/invoke activity-a ..) (a/invoke activity-b ..)])
    (promesa.core/then (fn [[a-result b-result]] ...)))
Returns a Promise that becomes completed/failed when all the arguments are done/settled, even in the face of errors.

*N.B. You must handle the exceptions in the returned promise with promesa*

Similar to [promesa/all](https://funcool.github.io/promesa/latest/promesa.core.html#var-all) but designed to work with
promises returned from [[temporal.activity/invoke]] from within workflow context.

For more Java SDK samples example look here:
   https://github.com/temporalio/samples-java/tree/main/core/src/main/java/io/temporal/samples/batch

```clojure
(-> (all-settled [(a/invoke activity-a ..) (a/invoke activity-b ..)])
    (promesa.core/then (fn [[a-result b-result]] ...)))
```
sourceraw docstring

raceclj

(race coll)

Returns Promise that becomes completed when any of the arguments are completed.

N.B. A single promise failure causes resulting promise to deliver the failure immediately.

Similar to promesa/race but designed to work with promises returned from temporal.activity/invoke from within workflow context.

(-> (race [(a/invoke activity-a ..) (a/invoke activity-b ..)])
    (promesa.core/then (fn [fastest-result] ...)))
Returns Promise that becomes completed when any of the arguments are completed.

*N.B. A single promise failure causes resulting promise to deliver the failure immediately.*

Similar to [promesa/race](https://funcool.github.io/promesa/latest/promesa.core.html#var-race) but designed to work with
promises returned from [[temporal.activity/invoke]] from within workflow context.

```clojure
(-> (race [(a/invoke activity-a ..) (a/invoke activity-b ..)])
    (promesa.core/then (fn [fastest-result] ...)))
```
sourceraw docstring

rejectedclj

(rejected e)

Returns a new, rejected promise

Returns a new, rejected promise
sourceraw docstring

resolvedclj

(resolved value)

Returns a new, fully resolved promise

Returns a new, fully resolved promise
sourceraw docstring

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

× close