Class WorkflowOptions
- Namespace
- Temporalio.Client
- Assembly
- Temporalio.dll
public class WorkflowOptions : ICloneable
- Inheritance
-
WorkflowOptions
- Implements
- Inherited Members
Constructors
WorkflowOptions()
Initializes a new instance of the WorkflowOptions class.
public WorkflowOptions()
WorkflowOptions(string, string)
Initializes a new instance of the WorkflowOptions class.
public WorkflowOptions(string id, string taskQueue)
Parameters
Properties
CronSchedule
Gets or sets the cron schedule for the workflow.
public string? CronSchedule { get; set; }
Property Value
ExecutionTimeout
Gets or sets the total workflow execution timeout including retries and continue as new.
public TimeSpan? ExecutionTimeout { get; set; }
Property Value
Id
Gets or sets the unique workflow identifier. This is required.
public string? Id { get; set; }
Property Value
IdConflictPolicy
Gets or sets how already-existing workflows of the same ID are treated. Default is Unspecified which effectively means Fail on the server. If this value is set, then IdReusePolicy cannot be set to TerminateIfRunning.
public WorkflowIdConflictPolicy IdConflictPolicy { get; set; }
Property Value
IdReusePolicy
Gets or sets how already-existing IDs are treated. Default is AllowDuplicate.
public WorkflowIdReusePolicy IdReusePolicy { get; set; }
Property Value
Memo
Gets or sets the memo for the workflow. Values for the memo cannot be null.
public IReadOnlyDictionary<string, object>? Memo { get; set; }
Property Value
RequestEagerStart
Gets or sets a value indicating whether the workflow will request eager start. This potentially reduces the latency to start the workflow by encouraging the server to start it on a local worker running this same client.
public bool RequestEagerStart { get; set; }
Property Value
Remarks
WARNING: Eager workflow start is experimental.
RetryPolicy
Gets or sets the retry policy for the workflow. If unset, workflow never retries.
public RetryPolicy? RetryPolicy { get; set; }
Property Value
Rpc
Gets or sets RPC options for starting the workflow.
public RpcOptions? Rpc { get; set; }
Property Value
RunTimeout
Gets or sets the timeout of a single workflow run.
public TimeSpan? RunTimeout { get; set; }
Property Value
StartDelay
Gets or sets the amount of time to wait before starting the workflow.
public TimeSpan? StartDelay { get; set; }
Property Value
Remarks
Start delay does not work with CronSchedule.
StartSignal
Gets or sets the start signal for the workflow. If this is non-null, a signal-with-start is used instead of a traditional workflow start. This means the workflow will only be created if it does not already exist, then a signal will be sent.
public string? StartSignal { get; set; }
Property Value
StartSignalArgs
Gets or sets the arguments for the start signal. This cannot be set if StartSignal is not set.
public IReadOnlyCollection<object?>? StartSignalArgs { get; set; }
Property Value
TaskQueue
Gets or sets the task queue to run the workflow on. This is required.
public string? TaskQueue { get; set; }
Property Value
TaskTimeout
Gets or sets the timeout of a single workflow task.
public TimeSpan? TaskTimeout { get; set; }
Property Value
TypedSearchAttributes
Gets or sets the search attributes for the workflow.
public SearchAttributeCollection? TypedSearchAttributes { get; set; }
Property Value
Methods
Clone()
Create a shallow copy of these options.
public virtual object Clone()
Returns
- object
A shallow copy of these options and any transitive options fields.
SignalWithStart(string, IReadOnlyCollection<object?>)
Perform a signal-with-start which will only start the workflow if it's not already running, but send a signal to it regardless. This is just sugar for manually setting StartSignal and StartSignalArgs directly.
public void SignalWithStart(string signal, IReadOnlyCollection<object?> args)
Parameters
signal
stringSignal name.
args
IReadOnlyCollection<object>Signal args.
SignalWithStart<TWorkflow>(Expression<Func<TWorkflow, Task>>)
Perform a signal-with-start which will only start the workflow if it's not already running, but send a signal to it regardless. This is just sugar for manually setting StartSignal and StartSignalArgs directly.
public void SignalWithStart<TWorkflow>(Expression<Func<TWorkflow, Task>> signalCall)
Parameters
signalCall
Expression<Func<TWorkflow, Task>>Invocation or a workflow signal method.
Type Parameters
TWorkflow
Workflow class type.