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: Into<String>>(id: S) -> StepBuilder
pub fn builder<S: Into<String>>(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<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::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 more