Skip to main content

WorkflowOptions

Struct WorkflowOptions 

Source
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: String

Fully-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: bool

Request 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: String

Id expression

§id_reuse_policy: i32

Whether server allow reuse of workflow ID

§namespace: String
👎Deprecated

Specifies default namespace for child workflows

§parent_close_policy: i32

Specifies 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: String

Bloblang mapping defining default workflow search attributes

§task_queue: String

Override 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: String

Bloblang 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: i32

Provides a Versioning Behavior to workflows of this type.

§wait_for_cancellation: bool

WaitForCancellation 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: i32

Default 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

Source

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.

Source

pub fn set_id_reuse_policy(&mut self, value: IdReusePolicy)

Sets id_reuse_policy to the provided enum value.

Source

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.

Source

pub fn set_parent_close_policy(&mut self, value: ParentClosePolicy)

Sets parent_close_policy to the provided enum value.

Source

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.

Source

pub fn set_workflow_id_conflict_policy( &mut self, value: WorkflowIdConflictPolicy, )

Sets workflow_id_conflict_policy to the provided enum value.

Source

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.

Source

pub fn set_versioning_behavior(&mut self, value: VersioningBehavior)

Sets versioning_behavior to the provided enum value.

Trait Implementations§

Source§

impl Clone for WorkflowOptions

Source§

fn clone(&self) -> WorkflowOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WorkflowOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WorkflowOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for WorkflowOptions

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl PartialEq for WorkflowOptions

Source§

fn eq(&self, other: &WorkflowOptions) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for WorkflowOptions

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.