ZWorkflowClient

zio.temporal.workflow.ZWorkflowClient
See theZWorkflowClient companion object
final class ZWorkflowClient

Represents Temporal workflow client

Attributes

See also

WorkflowClient

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def fetchHistory(workflowId: String, runId: Option[String]): Task[ZWorkflowExecutionHistory]

Downloads workflow execution history for the provided workflowId.

Downloads workflow execution history for the provided workflowId.

Value parameters

runId

Fixed Run Id of the workflow to export the history for. If not provided, the latest run will be used. Optional

workflowId

Workflow Id of the workflow to export the history for

Attributes

Returns

execution history of the workflow with the specified Workflow Id.

See also

streamHistory for a lazy memory-efficient version of this method

Returns the worker-build-id based version sets for a particular task queue.

Returns the worker-build-id based version sets for a particular task queue.

Value parameters

taskQueue

The task queue to fetch the version set(s) of.

Attributes

Returns

The version set(s) for the task queue.

Throws
io.temporal.client.WorkflowServiceException

for any failures including networking and service availability issues.

Note

experimental in Java SDK

def newActivityCompletionClient: UIO[ActivityCompletionClient]

Creates new ActivityCompletionClient

Creates new ActivityCompletionClient

Attributes

See also

ActivityCompletionClient

def newUntypedWorkflowStub(workflowType: String, options: ZWorkflowOptions): UIO[Untyped]

Creates workflow untyped client stub that can be used to start a single workflow execution. After workflow is started it can be also used to send signals or queries to it. IMPORTANT! Stub is per workflow instance. So new stub should be created for each new one.

Creates workflow untyped client stub that can be used to start a single workflow execution. After workflow is started it can be also used to send signals or queries to it. IMPORTANT! Stub is per workflow instance. So new stub should be created for each new one.

Value parameters

options

options used to start a workflow through returned stub

workflowType

name of the workflow type

Attributes

Returns

Stub that can be used to start workflow and later to signal or query it.

def newUntypedWorkflowStub(workflowId: String, runId: Option[String]): UIO[Untyped]

Creates workflow untyped client stub for a known execution. Use it to send signals or queries to a running workflow. Do not call methods annotated with @zio.temporal.workflowMethod.

Creates workflow untyped client stub for a known execution. Use it to send signals or queries to a running workflow. Do not call methods annotated with @zio.temporal.workflowMethod.

Value parameters

runId

runId of the workflow execution. If not provided the last workflow with the given workflowId is assumed.

workflowId

workflow id and optional run id for execution

Attributes

Returns

Stub that can be used to start workflow and later to signal or query it.

def newWorkflowStub[A : IsWorkflow](options: ZWorkflowOptions): UIO[Of[A]]

Creates workflow client stub that can be used to start a single workflow execution. The first call must be to a method annotated with @zio.temporal.workflowMethod. After workflow is started it can be also used to send signals or queries to it. IMPORTANT! Stub is per workflow instance. So new stub should be created for each new one.

Creates workflow client stub that can be used to start a single workflow execution. The first call must be to a method annotated with @zio.temporal.workflowMethod. After workflow is started it can be also used to send signals or queries to it. IMPORTANT! Stub is per workflow instance. So new stub should be created for each new one.

Type parameters

A

interface that given workflow implements

Value parameters

options

options that will be used to configure and start a new workflow.

Attributes

Returns

Stub that implements workflowInterface and can be used to start workflow and signal or query it after the start.

def newWorkflowStub[A : IsWorkflow](workflowId: String, runId: Option[String]): UIO[Of[A]]

Creates workflow client stub for a known execution. Use it to send signals or queries to a running workflow. Do not call methods annotated with @zio.temporal.workflowMethod.

Creates workflow client stub for a known execution. Use it to send signals or queries to a running workflow. Do not call methods annotated with @zio.temporal.workflowMethod.

Type parameters

A

interface that given workflow implements.

Value parameters

runId

Run id of the workflow execution.

workflowId

Workflow id.

Attributes

Returns

Stub that implements workflowInterface and can be used to signal or query it.

def streamExecutions(query: Option[String]): Stream[Throwable, ZWorkflowExecutionMetadata]

A wrapper around {WorkflowServiceStub#listWorkflowExecutions(ListWorkflowExecutionsRequest)}

A wrapper around {WorkflowServiceStub#listWorkflowExecutions(ListWorkflowExecutionsRequest)}

Value parameters

query

Temporal Visibility Query, for syntax see Visibility docs

Attributes

Returns

sequential stream that performs remote pagination under the hood

def streamHistory(workflowId: String, runId: Option[String]): Stream[Throwable, ZHistoryEvent]

Streams history events for a workflow execution for the provided workflowId.

Streams history events for a workflow execution for the provided workflowId.

Value parameters

runId

Fixed Run Id of the workflow to export the history for. If not provided, the latest run will be used. Optional

workflowId

Workflow Id of the workflow to export the history for

Attributes

Returns

stream of history events of the specified run of the workflow execution.

See also

fetchHistory for a user-friendly eager version of this method

def updateWorkerBuildIdCompatibility(taskQueue: String, operation: BuildIdOperation): TemporalIO[Unit]

Allows you to update the worker-build-id based version sets for a particular task queue. This is used in conjunction with workers who specify their build id and thus opt into the feature.

Allows you to update the worker-build-id based version sets for a particular task queue. This is used in conjunction with workers who specify their build id and thus opt into the feature.

Value parameters

operation

The operation to perform. See BuildIdOperation for more.

taskQueue

The task queue to update the version set(s) of.

Attributes

Throws
io.temporal.client.WorkflowServiceException

for any failures including networking and service availability issues.

Note

experimental in Java SDK

Deprecated methods

def newUntypedWorkflowStub(workflowType: String): Untyped

Creates new untyped type workflow stub builder

Creates new untyped type workflow stub builder

Value parameters

workflowType

name of the workflow type

Attributes

Returns

builder instance

Deprecated
[Since version 0.6.0]

Creates new typed workflow stub builder

Creates new typed workflow stub builder

Type parameters

A

workflow interface

Attributes

Returns

builder instance

Deprecated
[Since version 0.6.0]

Concrete fields

val toJava: WorkflowClient