pub struct WhileloopFlow {
pub modules: Vec<FlowModule>,
pub skip_failures: bool,
pub type: Type,
pub parallel: Option<bool>,
pub parallelism: Option<Box<InputTransform>>,
pub squash: Option<bool>,
pub max_iterations: Option<i32>,
pub max_duration_secs: Option<i32>,
}Expand description
WhileloopFlow : Executes nested modules repeatedly until stopped. The implicit iterator is the iteration counter, so ‘flow_input.iter.value’ equals ‘flow_input.iter.index’ (0, 1, 2, …) and never carries state. To carry state across iterations, a step reads its own previous-iteration result via ‘results.<its_own_id>’ with a first-iteration fallback - the loop’s stop_after_if must then be on that inner step (a plain single-step body with stop_after_if on the loop module does not resolve ‘results’ across iterations and never terminates); plain counters can instead be derived from ‘flow_input.iter.index’, which works in every configuration. stop_after_if is evaluated after each iteration - on the loop module ‘result’ is the last iteration’s result
Fields§
§modules: Vec<FlowModule>Steps to execute in each iteration
skip_failures: boolIf true, iteration failures don’t stop the loop. Failed iterations return null
type: Type§parallel: Option<bool>If true, iterations run concurrently (use with caution in while loops)
parallelism: Option<Box<InputTransform>>§squash: Option<bool>§max_iterations: Option<i32>Maximum number of iterations. Checked after each iteration; when reached and stop_after_if did not stop the loop, the loop fails with an error named ‘LoopExhausted’
max_duration_secs: Option<i32>Maximum wall-clock seconds since the first iteration started, checked after each iteration. A running iteration is not interrupted, so the loop can exceed the limit by up to one iteration; the timeout of the body’s steps caps an iteration. When reached and stop_after_if did not stop the loop, the loop fails with an error named ‘LoopExhausted’
Implementations§
Source§impl WhileloopFlow
impl WhileloopFlow
Sourcepub fn new(
modules: Vec<FlowModule>,
skip_failures: bool,
type: Type,
) -> WhileloopFlow
pub fn new( modules: Vec<FlowModule>, skip_failures: bool, type: Type, ) -> WhileloopFlow
Executes nested modules repeatedly until stopped. The implicit iterator is the iteration counter, so ‘flow_input.iter.value’ equals ‘flow_input.iter.index’ (0, 1, 2, …) and never carries state. To carry state across iterations, a step reads its own previous-iteration result via ‘results.<its_own_id>’ with a first-iteration fallback - the loop’s stop_after_if must then be on that inner step (a plain single-step body with stop_after_if on the loop module does not resolve ‘results’ across iterations and never terminates); plain counters can instead be derived from ‘flow_input.iter.index’, which works in every configuration. stop_after_if is evaluated after each iteration - on the loop module ‘result’ is the last iteration’s result