ZWorkflowStub

zio.temporal.workflow.ZWorkflowStub$
See theZWorkflowStub companion trait

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Classlikes

final implicit class Ops[A](self: Of[A]) extends AnyVal

Attributes

Supertypes
class AnyVal
trait Matchable
class Any
sealed trait Untyped

An untyped version of ZWorkflowStub

An untyped version of ZWorkflowStub

Attributes

Supertypes
class Object
trait Matchable
class Any

Inherited types

final type Of[+T] = A & T

Stub is a compile-time view of temporal's runtime abstractions, such as Workflows.

Stub is a compile-time view of temporal's runtime abstractions, such as Workflows.

Type parameters

T

compile-time view

Attributes

Note

Do not call methods of proxied workflows directly! It should be used only within special methods like ZWorkflowStub.signal, ZWorkflowStub.start, ZWorkflowStub.execute and so on.

Inherited from:
Stubs (hidden)

Value members

Inherited 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

Inherited from:
ZWorkflowExecutionSyntax
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

Inherited from:
ZWorkflowExecutionSyntax
inline def query[R](inline f: R)(using javaTypeTag: JavaTypeTag[R]): TemporalIO[R]

Queries the given workflow. Accepts the workflow query method invocation

Queries the given workflow. Accepts the workflow query method invocation

Example:

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

 val result: TemporalIO[R] = ZWorkflowStub.query(
   stub.someQuery()
 )

Type parameters

R

query method result type

Value parameters

f

the query method invocation

Attributes

Returns

the query method result

Inherited from:
ZWorkflowStubQuerySyntax
inline def signal(inline f: Unit): TemporalIO[Unit]

Sends a signal to the workflow. Accepts the signal method invocation

Sends a signal to the workflow. Accepts the signal method invocation

Example:

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

val signalSent: TemporalIO[Unit] = ZWorkflowStub.signal(
   stub.someSignalMethod(someArg)
 )

Value parameters

f

the signal method invocation

Attributes

Returns

ZIO

Inherited from:
ZWorkflowStubSignalSyntax
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

Inherited from:
ZWorkflowExecutionSyntax

Implicits

Implicits

final implicit def Ops[A](self: Of[A]): Ops[A]