Class WorkflowDefinition
- Namespace
- Temporalio.Workflows
- Assembly
- Temporalio.dll
Definition of a workflow.
public class WorkflowDefinition
- Inheritance
-
WorkflowDefinition
- Inherited Members
Properties
Dynamic
Gets a value indicating whether the workflow is dynamic.
public bool Dynamic { get; }
Property Value
DynamicQuery
Gets the dynamic query for the workflow.
public WorkflowQueryDefinition? DynamicQuery { get; }
Property Value
DynamicSignal
Gets the dynamic signal for the workflow.
public WorkflowSignalDefinition? DynamicSignal { get; }
Property Value
DynamicUpdate
Gets the dynamic update for the workflow.
public WorkflowUpdateDefinition? DynamicUpdate { get; }
Property Value
FailureExceptionTypes
Gets the failure exception types. See FailureExceptionTypes for more details.
public Type[]? FailureExceptionTypes { get; }
Property Value
- Type[]
Instantiable
Gets a value indicating whether the workflow type can be created and used in a worker.
public bool Instantiable { get; }
Property Value
Name
Gets the workflow name or null if workflow is dynamic.
public string? Name { get; }
Property Value
Queries
Gets the queries for the workflow.
public IReadOnlyDictionary<string, WorkflowQueryDefinition> Queries { get; }
Property Value
RunMethod
Gets the workflow entry point.
public MethodInfo RunMethod { get; }
Property Value
Signals
Gets the signals for the workflow.
public IReadOnlyDictionary<string, WorkflowSignalDefinition> Signals { get; }
Property Value
Type
Gets the workflow type.
public Type Type { get; }
Property Value
Updates
Gets the updates for the workflow.
public IReadOnlyDictionary<string, WorkflowUpdateDefinition> Updates { get; }
Property Value
Methods
Create(Type)
Create a workflow definition for the given type or fail. The result is cached by type.
public static WorkflowDefinition Create(Type type)
Parameters
type
TypeType to get definition for.
Returns
- WorkflowDefinition
Definition for the type.
Create(Type, string?, Func<object?[], object>?)
Create a workflow with a custom creator. The result is not cached. Most users will use Create(Type) instead.
public static WorkflowDefinition Create(Type type, string? nameOverride, Func<object?[], object>? creatorOverride)
Parameters
type
TypeType to get definition for.
nameOverride
stringThe name to use instead of what may be on the attribute.
creatorOverride
Func<object[], object>If present, the method to use to create an instance of the workflow.
Returns
- WorkflowDefinition
Definition for the type.
CreateWorkflowInstance(object?[])
Instantiate an instance of the workflow with the given run arguments.
public object CreateWorkflowInstance(object?[] workflowArguments)
Parameters
workflowArguments
object[]Arguments for workflow run.
Returns
- object
The created workflow instance.
Create<T>()
Create a workflow definition for the given type or fail. The result is cached by type.
public static WorkflowDefinition Create<T>()
Returns
- WorkflowDefinition
Definition for the type.
Type Parameters
T
Type to get definition for.