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
Workflow
stringWorkflow type name.
Args
IReadOnlyCollection<object>Arguments for the workflow. Note, when fetching this from the server, the every value here is an instance of IEncodedRawValue.
Options
WorkflowOptionsStart 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.
Headers
IReadOnlyDictionary<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
workflow
stringWorkflow run method.
args
IReadOnlyCollection<object>Workflow arguments.
options
WorkflowOptionsStart 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
workflowRunCall
Expression<Func<TWorkflow, Task>>Invocation of workflow run method without a result.
options
WorkflowOptionsStart 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
TWorkflow
Workflow 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
workflowRunCall
Expression<Func<TWorkflow, Task<TResult>>>Invocation of workflow run method with a result.
options
WorkflowOptionsStart 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
TWorkflow
Workflow class type.
TResult
Result type of the workflow.