Table of Contents

Class WorkflowRunOperationContext

Namespace
Temporalio.Nexus
Assembly
Temporalio.dll

Context used to create workflow run handles. This is passed to functions passed to FromHandleFactory on WorkflowRunOperationHandler.

public class WorkflowRunOperationContext
Inheritance
WorkflowRunOperationContext
Inherited Members

Remarks

WARNING: Nexus support is experimental.

Properties

HandlerContext

Gets the Nexus handler context for the start call.

public OperationStartContext HandlerContext { get; }

Property Value

OperationStartContext

Methods

StartWorkflowAsync(string, IReadOnlyCollection<object?>, WorkflowOptions)

Start a workflow by name with no result type.

public Task<NexusWorkflowRunHandle> StartWorkflowAsync(string workflow, IReadOnlyCollection<object?> args, WorkflowOptions options)

Parameters

workflow string

Workflow type name.

args IReadOnlyCollection<object>

Arguments for the workflow.

options WorkflowOptions

Start workflow options. ID and TaskQueue are required.

Returns

Task<NexusWorkflowRunHandle>

Nexus workflow run handle to return in handle factory.

StartWorkflowAsync<TWorkflow>(Expression<Func<TWorkflow, Task>>, WorkflowOptions)

Start a workflow via a lambda invoking the run method.

public Task<NexusWorkflowRunHandle> StartWorkflowAsync<TWorkflow>(Expression<Func<TWorkflow, Task>> workflowRunCall, WorkflowOptions options)

Parameters

workflowRunCall Expression<Func<TWorkflow, Task>>

Invocation of workflow run method with no result.

options WorkflowOptions

Start workflow options. ID and TaskQueue are required.

Returns

Task<NexusWorkflowRunHandle>

Nexus workflow run handle to return in handle factory.

Type Parameters

TWorkflow

Workflow class type.

StartWorkflowAsync<TResult>(string, IReadOnlyCollection<object?>, WorkflowOptions)

Start a workflow by name with a result type.

public Task<NexusWorkflowRunHandle<TResult>> StartWorkflowAsync<TResult>(string workflow, IReadOnlyCollection<object?> args, WorkflowOptions options)

Parameters

workflow string

Workflow type name.

args IReadOnlyCollection<object>

Arguments for the workflow.

options WorkflowOptions

Start workflow options. ID and TaskQueue are required.

Returns

Task<NexusWorkflowRunHandle<TResult>>

Nexus workflow run handle to return in handle factory.

Type Parameters

TResult

Result type.

StartWorkflowAsync<TWorkflow, TResult>(Expression<Func<TWorkflow, Task<TResult>>>, WorkflowOptions)

Start a workflow via a lambda invoking the run method.

public Task<NexusWorkflowRunHandle<TResult>> StartWorkflowAsync<TWorkflow, TResult>(Expression<Func<TWorkflow, Task<TResult>>> workflowRunCall, WorkflowOptions options)

Parameters

workflowRunCall Expression<Func<TWorkflow, Task<TResult>>>

Invocation of workflow run method with a result.

options WorkflowOptions

Start workflow options. ID and TaskQueue are required.

Returns

Task<NexusWorkflowRunHandle<TResult>>

Nexus workflow run handle to return in handle factory.

Type Parameters

TWorkflow

Workflow class type.

TResult

Workflow result type.