pub struct WorkflowOptions {Show 23 fields
pub cli: Option<CliCommandOptions>,
pub name: String,
pub aliases: Vec<String>,
pub query: Vec<Query>,
pub signal: Vec<Signal>,
pub update: Vec<Update>,
pub enable_eager_start: bool,
pub execution_timeout: Option<Duration>,
pub id: String,
pub id_reuse_policy: i32,
pub namespace: String,
pub parent_close_policy: i32,
pub patches: Vec<Patch>,
pub retry_policy: Option<RetryPolicy>,
pub run_timeout: Option<Duration>,
pub search_attributes: String,
pub task_queue: String,
pub task_timeout: Option<Duration>,
pub typed_search_attributes: String,
pub versioning_behavior: i32,
pub wait_for_cancellation: bool,
pub workflow_id_conflict_policy: i32,
pub xns: Option<XnsActivityOptions>,
}Expand description
WorkflowOptions identifies an rpc method as a Temporal workflow definition, and describes available workflow configuration options
Fields§
§cli: Option<CliCommandOptions>cli command overrides
name: StringFully-qualified workflow name
aliases: Vec<String>List of additional names to register the workflow under. This can be used to migrate to new naming conventions without breaking workflow history or existing clients.
query: Vec<Query>Queries supported by this workflow
signal: Vec<Signal>Signals supported by this workflow
update: Vec<Update>Updates supported by this workflow
enable_eager_start: boolRequest eager execution for this workflow, if a local worker is available.
execution_timeout: Option<Duration>The timeout for duration of workflow execution. It includes retries and continue as new. Use WorkflowRunTimeout to limit execution time of a single workflow run.
id: StringId expression
id_reuse_policy: i32Whether server allow reuse of workflow ID
namespace: StringSpecifies default namespace for child workflows
parent_close_policy: i32Specifies a default parent close policy for child workflows
patches: Vec<Patch>Configure patches, by default, patches are introduced in enabled mode
retry_policy: Option<RetryPolicy>Specifies how to retry an Workflow if an error occurs
run_timeout: Option<Duration>The timeout for duration of a single workflow run.
search_attributes: StringBloblang mapping defining default workflow search attributes
task_queue: StringOverride service task queue
task_timeout: Option<Duration>The timeout for processing workflow task from the time the worker pulled this task. If a workflow task is lost, it is retried after this timeout. The resolution is seconds.
typed_search_attributes: StringBloblang mapping defining default workflow typed search attributes. The mapping should be a map of search attribute types to a map of search attribute keys to values. Example: string.foo = “bar” string.baz = “qux” float64.min = 123.0 int64.max = 456 time.created_at = now() bool.is_active = true keyword.name = “John Doe” keyword_list.tags = [“foo”, “bar”]
versioning_behavior: i32Provides a Versioning Behavior to workflows of this type.
wait_for_cancellation: boolWaitForCancellation specifies whether to wait for canceled child workflow to be ended (child workflow can be ended as: completed/failed/timedout/terminated/canceled)
workflow_id_conflict_policy: i32Default workflow id conflict policy for start workflow with options
xns: Option<XnsActivityOptions>XNS can be used to configure default activity options for xns workflow executions
Implementations§
Source§impl WorkflowOptions
impl WorkflowOptions
Sourcepub fn id_reuse_policy(&self) -> IdReusePolicy
pub fn id_reuse_policy(&self) -> IdReusePolicy
Returns the enum value of id_reuse_policy, or the default if the field is set to an invalid enum value.
Sourcepub fn set_id_reuse_policy(&mut self, value: IdReusePolicy)
pub fn set_id_reuse_policy(&mut self, value: IdReusePolicy)
Sets id_reuse_policy to the provided enum value.
Sourcepub fn parent_close_policy(&self) -> ParentClosePolicy
pub fn parent_close_policy(&self) -> ParentClosePolicy
Returns the enum value of parent_close_policy, or the default if the field is set to an invalid enum value.
Sourcepub fn set_parent_close_policy(&mut self, value: ParentClosePolicy)
pub fn set_parent_close_policy(&mut self, value: ParentClosePolicy)
Sets parent_close_policy to the provided enum value.
Sourcepub fn workflow_id_conflict_policy(&self) -> WorkflowIdConflictPolicy
pub fn workflow_id_conflict_policy(&self) -> WorkflowIdConflictPolicy
Returns the enum value of workflow_id_conflict_policy, or the default if the field is set to an invalid enum value.
Sourcepub fn set_workflow_id_conflict_policy(
&mut self,
value: WorkflowIdConflictPolicy,
)
pub fn set_workflow_id_conflict_policy( &mut self, value: WorkflowIdConflictPolicy, )
Sets workflow_id_conflict_policy to the provided enum value.
Sourcepub fn versioning_behavior(&self) -> VersioningBehavior
pub fn versioning_behavior(&self) -> VersioningBehavior
Returns the enum value of versioning_behavior, or the default if the field is set to an invalid enum value.
Sourcepub fn set_versioning_behavior(&mut self, value: VersioningBehavior)
pub fn set_versioning_behavior(&mut self, value: VersioningBehavior)
Sets versioning_behavior to the provided enum value.
Trait Implementations§
Source§impl Clone for WorkflowOptions
impl Clone for WorkflowOptions
Source§fn clone(&self) -> WorkflowOptions
fn clone(&self) -> WorkflowOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkflowOptions
impl Debug for WorkflowOptions
Source§impl Default for WorkflowOptions
impl Default for WorkflowOptions
Source§impl Message for WorkflowOptions
impl Message for WorkflowOptions
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl PartialEq for WorkflowOptions
impl PartialEq for WorkflowOptions
Source§fn eq(&self, other: &WorkflowOptions) -> bool
fn eq(&self, other: &WorkflowOptions) -> bool
self and other values to be equal, and is used by ==.