pub struct Step {
pub id: String,
pub component: Component,
pub on_error: Option<ErrorAction>,
pub input: ValueExpr,
pub must_execute: Option<bool>,
pub metadata: HashMap<String, Value>,
}Expand description
A step in a workflow that executes a component with specific arguments.
Note: Step output schemas are stored in the flow’s types.steps field,
not on individual steps. This allows for shared $defs and avoids duplication.
Fields§
§id: StringIdentifier for the step
component: ComponentThe component to execute in this step
on_error: Option<ErrorAction>§input: ValueExprArguments to pass to the component for this step
must_execute: Option<bool>If true, this step must execute even if its output is not used by the workflow output. Useful for steps with side effects (e.g., writing to databases, sending notifications).
metadata: HashMap<String, Value>Extensible metadata for the step that can be used by tools and frameworks.
Implementations§
Source§impl Step
impl Step
Sourcepub fn builder<S>(id: S) -> StepBuilder
pub fn builder<S>(id: S) -> StepBuilder
Create a new StepBuilder with the given ID.
Source§impl Step
impl Step
pub fn on_error(&self) -> Option<&ErrorAction>
Sourcepub fn on_error_or_default(&self) -> ErrorAction
pub fn on_error_or_default(&self) -> ErrorAction
Get the effective error action, applying the default if none is specified.
Sourcepub fn must_execute(&self) -> bool
pub fn must_execute(&self) -> bool
Check if this step must execute, treating None as false (the default).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Step
impl<'de> Deserialize<'de> for Step
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Step, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Step, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Step
impl JsonSchema for Step
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Serialize for Step
impl Serialize for Step
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Step
Auto Trait Implementations§
impl Freeze for Step
impl RefUnwindSafe for Step
impl Send for Step
impl Sync for Step
impl Unpin for Step
impl UnsafeUnpin for Step
impl UnwindSafe for Step
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request