Class TemporalNexusClient
- Namespace
- Temporalio.Nexus
- Assembly
- Temporalio.dll
Nexus-aware client wrapping the Temporal client. Provides methods for starting workflows from within Nexus operation handlers, handling all Nexus plumbing (links, callbacks, token generation) internally.
public class TemporalNexusClient : ITemporalNexusClient
- Inheritance
-
TemporalNexusClient
- Implements
- Inherited Members
Remarks
WARNING: Nexus support is experimental. This client is created by TemporalOperationHandler and passed to the user's start function. It should not be instantiated directly.
Properties
TemporalClient
Gets the underlying Temporal client for advanced use cases such as sending signals or queries.
public ITemporalClient TemporalClient { get; }
Property Value
Methods
StartWorkflowAsync<TWorkflow>(Expression<Func<TWorkflow, Task>>, WorkflowOptions)
Start a workflow via a lambda invoking the run method with no return value. Always returns an async result with a workflow-run operation token.
public Task<TemporalOperationResult<NoValue>> StartWorkflowAsync<TWorkflow>(Expression<Func<TWorkflow, Task>> workflowRunCall, WorkflowOptions options)
Parameters
workflowRunCallExpression<Func<TWorkflow, Task>>Invocation of workflow run method with no result.
optionsWorkflowOptionsStart workflow options. ID and TaskQueue are required.
Returns
- Task<TemporalOperationResult<NoValue>>
An async operation result containing the workflow-run token.
Type Parameters
TWorkflowWorkflow class type.
StartWorkflowAsync<TResult>(string, IReadOnlyCollection<object?>, WorkflowOptions)
Start a workflow by name. Always returns an async result with a workflow-run operation token.
public Task<TemporalOperationResult<TResult>> StartWorkflowAsync<TResult>(string workflow, IReadOnlyCollection<object?> args, WorkflowOptions options)
Parameters
workflowstringWorkflow type name.
argsIReadOnlyCollection<object>Arguments for the workflow.
optionsWorkflowOptionsStart workflow options. ID and TaskQueue are required.
Returns
- Task<TemporalOperationResult<TResult>>
An async operation result containing the workflow-run token.
Type Parameters
TResultWorkflow result type.
StartWorkflowAsync<TWorkflow, TResult>(Expression<Func<TWorkflow, Task<TResult>>>, WorkflowOptions)
Start a workflow via a lambda invoking the run method. Always returns an async result with a workflow-run operation token.
public Task<TemporalOperationResult<TResult>> StartWorkflowAsync<TWorkflow, TResult>(Expression<Func<TWorkflow, Task<TResult>>> workflowRunCall, WorkflowOptions options)
Parameters
workflowRunCallExpression<Func<TWorkflow, Task<TResult>>>Invocation of workflow run method with a result.
optionsWorkflowOptionsStart workflow options. ID and TaskQueue are required.
Returns
- Task<TemporalOperationResult<TResult>>
An async operation result containing the workflow-run token.
Type Parameters
TWorkflowWorkflow class type.
TResultWorkflow result type.