Skip to main content

Workflow

Struct Workflow 

Source
pub struct Workflow {
Show 28 fields pub workflow_id: String, pub workflow_name: String, pub workflow_version: i32, pub status: WorkflowStatus, pub input: HashMap<String, Value>, pub output: HashMap<String, Value>, pub correlation_id: Option<String>, pub tasks: Vec<Task>, pub parent_workflow_id: Option<String>, pub parent_workflow_task_id: Option<String>, pub start_time: i64, pub end_time: i64, pub update_time: i64, pub create_time: i64, pub created_by: Option<String>, pub updated_by: Option<String>, pub reason_for_incompletion: Option<String>, pub variables: HashMap<String, Value>, pub external_input_payload_storage_path: Option<String>, pub external_output_payload_storage_path: Option<String>, pub priority: i32, pub owner_app: Option<String>, pub task_to_domain: HashMap<String, String>, pub workflow_definition: Option<WorkflowDef>, pub failed_reference_task_names: Vec<String>, pub failed_task_names: Vec<String>, pub last_retried_time: i64, pub event: Option<String>,
}
Expand description

A workflow execution instance.

Fields§

§workflow_id: String

Unique workflow ID.

§workflow_name: String

Workflow type/name.

§workflow_version: i32

Workflow version.

§status: WorkflowStatus

Workflow status.

§input: HashMap<String, Value>

Workflow input (may be empty if returned as string from search API).

§output: HashMap<String, Value>

Workflow output (may be empty if returned as string from search API).

§correlation_id: Option<String>

Correlation ID.

§tasks: Vec<Task>

Tasks in this workflow execution (may be empty from search API).

§parent_workflow_id: Option<String>

Parent workflow ID (if this is a subworkflow).

§parent_workflow_task_id: Option<String>

Parent workflow task ID.

§start_time: i64

Start time (epoch ms or ISO 8601 string).

§end_time: i64

End time (epoch ms or ISO 8601 string).

§update_time: i64

Update time (epoch ms or ISO 8601 string).

§create_time: i64

Created time (epoch ms or ISO 8601 string).

§created_by: Option<String>

Created by.

§updated_by: Option<String>

Updated by.

§reason_for_incompletion: Option<String>

Reason for incompletion (if failed/terminated).

§variables: HashMap<String, Value>

Workflow variables.

§external_input_payload_storage_path: Option<String>

External input payload storage path.

§external_output_payload_storage_path: Option<String>

External output payload storage path.

§priority: i32

Priority.

§owner_app: Option<String>

Owner app.

§task_to_domain: HashMap<String, String>

Task to domain mapping.

§workflow_definition: Option<WorkflowDef>

Workflow definition.

§failed_reference_task_names: Vec<String>

Failed reference task names.

§failed_task_names: Vec<String>

Failed task names.

§last_retried_time: i64

Last retried time (epoch ms or ISO 8601 string).

§event: Option<String>

Event.

Implementations§

Source§

impl Workflow

Source

pub fn is_terminal(&self) -> bool

Check if workflow is terminal (completed, failed, terminated, timed out).

Source

pub fn is_running(&self) -> bool

Check if workflow is running (not terminal).

Source

pub fn is_successful(&self) -> bool

Check if workflow succeeded.

Source

pub fn get_output<T>(&self, key: &str) -> Option<T>

Get an output value.

Source

pub fn get_output_string(&self, key: &str) -> Option<String>

Get output as string.

Source

pub fn get_variable<T>(&self, key: &str) -> Option<T>

Get a variable value.

Trait Implementations§

Source§

impl Clone for Workflow

Source§

fn clone(&self) -> Self

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 Workflow

Source§

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

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

impl Default for Workflow

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for Workflow

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Workflow

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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 = !

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

fn try_from(value: U) -> Result<T, !>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more