Skip to main content

WorkflowDef

Struct WorkflowDef 

Source
pub struct WorkflowDef {
Show 18 fields pub name: String, pub description: Option<String>, pub version: i32, pub tasks: Vec<WorkflowTask>, pub input_parameters: Vec<String>, pub output_parameters: HashMap<String, Value>, pub failure_workflow: Option<String>, pub schema_version: i32, pub restartable: bool, pub workflow_status_listener_enabled: bool, pub owner_email: Option<String>, pub timeout_policy: WorkflowTimeoutPolicy, pub timeout_seconds: i64, pub variables: HashMap<String, Value>, pub input_template: HashMap<String, Value>, pub created_by: Option<String>, pub update_time: Option<i64>, pub create_time: Option<i64>,
}
Expand description

Workflow definition.

Fields§

§name: String

Workflow name.

§description: Option<String>

Workflow description.

§version: i32

Workflow version.

§tasks: Vec<WorkflowTask>

Tasks in the workflow.

§input_parameters: Vec<String>

Input parameters.

§output_parameters: HashMap<String, Value>

Output parameters.

§failure_workflow: Option<String>

Failure workflow name.

§schema_version: i32

Schema version.

§restartable: bool

Restartable flag.

§workflow_status_listener_enabled: bool

Workflow status listener enabled.

§owner_email: Option<String>

Owner email.

§timeout_policy: WorkflowTimeoutPolicy

Timeout policy.

§timeout_seconds: i64

Timeout in seconds.

§variables: HashMap<String, Value>

Variables.

§input_template: HashMap<String, Value>

Input template.

§created_by: Option<String>

Created by.

§update_time: Option<i64>

Update time.

§create_time: Option<i64>

Create time.

Implementations§

Source§

impl WorkflowDef

Source

pub fn new(name: impl Into<String>) -> Self

Create a new workflow definition.

Source

pub fn with_description(self, desc: impl Into<String>) -> Self

Set description.

Source

pub fn with_version(self, version: i32) -> Self

Set version.

Source

pub fn with_task(self, task: WorkflowTask) -> Self

Add a task to the workflow.

Source

pub fn with_tasks(self, tasks: Vec<WorkflowTask>) -> Self

Set tasks.

Source

pub fn with_input_parameters(self, params: Vec<String>) -> Self

Set input parameters.

Source

pub fn with_output_parameters(self, params: HashMap<String, Value>) -> Self

Set output parameters.

Source

pub fn with_output_param( self, key: impl Into<String>, value: impl Into<String>, ) -> Self

Add an output parameter.

Source

pub fn with_failure_workflow(self, name: impl Into<String>) -> Self

Set failure workflow.

Source

pub fn with_timeout(self, seconds: i64, policy: WorkflowTimeoutPolicy) -> Self

Set timeout.

Source

pub fn with_owner(self, email: impl Into<String>) -> Self

Set owner email.

Trait Implementations§

Source§

impl Clone for WorkflowDef

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 WorkflowDef

Source§

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

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

impl Default for WorkflowDef

Source§

fn default() -> Self

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

impl<'de> Deserialize<'de> for WorkflowDef

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 WorkflowDef

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