Class ScheduleActionStartWorkflow
- Namespace
- Temporalio.Client.Schedules
- Assembly
- Temporalio.dll
Schedule action to start a workflow. Instead of the constructor, most users should use the
Create static method to create a typed workflow invocation.
public record ScheduleActionStartWorkflow : ScheduleAction, IEquatable<ScheduleAction>, IEquatable<ScheduleActionStartWorkflow>
- Inheritance
-
ScheduleActionStartWorkflow
- Implements
- Inherited Members
Constructors
ScheduleActionStartWorkflow(string, IReadOnlyCollection<object?>, WorkflowOptions, IReadOnlyDictionary<string, IEncodedRawValue>?)
Schedule action to start a workflow. Instead of the constructor, most users should use the
Create static method to create a typed workflow invocation.
public ScheduleActionStartWorkflow(string Workflow, IReadOnlyCollection<object?> Args, WorkflowOptions Options, IReadOnlyDictionary<string, IEncodedRawValue>? Headers = null)
Parameters
WorkflowstringWorkflow type name.
ArgsIReadOnlyCollection<object>Arguments for the workflow. Note, when fetching this from the server, the every value here is an instance of IEncodedRawValue.
OptionsWorkflowOptionsStart workflow options. ID and TaskQueue are required. Some options like ID reuse policy, cron schedule, and start signal cannot be set or an error will occur.
HeadersIReadOnlyDictionary<string, IEncodedRawValue>Headers sent with each workflow scheduled.
Properties
Args
Arguments for the workflow. Note, when fetching this from the server, the every value here is an instance of IEncodedRawValue.
public IReadOnlyCollection<object?> Args { get; init; }
Property Value
Headers
Headers sent with each workflow scheduled.
public IReadOnlyDictionary<string, IEncodedRawValue>? Headers { get; init; }
Property Value
Options
Start workflow options. ID and TaskQueue are required. Some options like ID reuse policy, cron schedule, and start signal cannot be set or an error will occur.
public WorkflowOptions Options { get; init; }
Property Value
Workflow
Workflow type name.
public string Workflow { get; init; }
Property Value
Methods
Create(string, IReadOnlyCollection<object?>, WorkflowOptions)
Create a scheduled action that starts a workflow.
public static ScheduleActionStartWorkflow Create(string workflow, IReadOnlyCollection<object?> args, WorkflowOptions options)
Parameters
workflowstringWorkflow run method.
argsIReadOnlyCollection<object>Workflow arguments.
optionsWorkflowOptionsStart workflow options. ID and TaskQueue are required. Some options like ID reuse policy, cron schedule, and start signal cannot be set or an error will occur.
Returns
- ScheduleActionStartWorkflow
Start workflow action.
Create<TWorkflow>(Expression<Func<TWorkflow, Task>>, WorkflowOptions)
Create a scheduled action that starts a workflow via lambda invoking the run method.
public static ScheduleActionStartWorkflow Create<TWorkflow>(Expression<Func<TWorkflow, Task>> workflowRunCall, WorkflowOptions options)
Parameters
workflowRunCallExpression<Func<TWorkflow, Task>>Invocation of workflow run method without a result.
optionsWorkflowOptionsStart workflow options. ID and TaskQueue are required. Some options like ID reuse policy, cron schedule, and start signal cannot be set or an error will occur.
Returns
- ScheduleActionStartWorkflow
Start workflow action.
Type Parameters
TWorkflowWorkflow class type.
Create<TWorkflow, TResult>(Expression<Func<TWorkflow, Task<TResult>>>, WorkflowOptions)
Create a scheduled action that starts a workflow via lambda invoking the run method.
public static ScheduleActionStartWorkflow Create<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. Some options like ID reuse policy, cron schedule, and start signal cannot be set or an error will occur.
Returns
- ScheduleActionStartWorkflow
Start workflow action.
Type Parameters
TWorkflowWorkflow class type.
TResultResult type of the workflow.