ZWorkflowExecutionSyntax

zio.temporal.workflow.ZWorkflowExecutionSyntax
See theZWorkflowExecutionSyntax companion object

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ZWorkflowStub.type

Members list

Value members

Concrete methods

inline def execute[R](inline f: R)(using javaTypeTag: JavaTypeTag[R]): TemporalIO[R]

Executes the given workflow. '''Waits''' for the workflow to finish. Accepts the workflow method invocation

Executes the given workflow. '''Waits''' for the workflow to finish. Accepts the workflow method invocation

Example:

 val stub: ZWorkflowStub.Of[T] = ???

 val workflowExecution: TemporalIO[R] =
    ZWorkflowStub.execute(
      stub.someMethod(someArg)
    )

Type parameters

R

workflow result type

Value parameters

f

the workflow method invocation

Attributes

Returns

the workflow result

inline def executeWithTimeout[R](timeout: Duration)(inline f: R)(using javaTypeTag: JavaTypeTag[R]): TemporalIO[R]

Executes the given workflow with a given timeout. '''Waits''' for the workflow to finish. Accepts the workflow method invocation

Executes the given workflow with a given timeout. '''Waits''' for the workflow to finish. Accepts the workflow method invocation

Example:

 val stub: ZWorkflowStub.Of[T] = ???

 val workflowExecution: TemporalIO[R] =
    ZWorkflowStub.executeWithTimeout(5.seconds)(
      stub.someMethod(someArg)
    )

Type parameters

R

workflow result type

Value parameters

f

the workflow method invocation

timeout

the timeout

Attributes

Returns

the workflow result

inline def start[A](inline f: A): TemporalIO[ZWorkflowExecution]

Starts the given workflow. '''Doesn't wait''' for the workflow to finish. Accepts the workflow method invocation

Starts the given workflow. '''Doesn't wait''' for the workflow to finish. Accepts the workflow method invocation

Example:

 val stub: ZWorkflowStub.Of[T] = ???

 val workflowExecution: TemporalIO[ZWorkflowExecution] =
    ZWorkflowStub.start(
      stub.someMethod(someArg)
    )

Type parameters

A

workflow result type

Value parameters

f

the workflow method invocation

Attributes

Returns

the workflow execution metadata