Info |
---|
Available since version 1.1.0 |
This pipeline will loop it's the execution looking for a match to a clause with the final, this looping includes the process and the post process, and it will exit the loop on a match or if it reaches the maximum iterations (by default 2). If it exits because of the maximum iteration, and it has a default response configured, it will merge the default response into the final (this could overwrite repeated keys in the final)
...
Property | Description | Default | Type | Required | ||
---|---|---|---|---|---|---|
enable | Enable pipeline configuration for execution. | true | boolean | No | ||
stages | List of stages to be executed by the pipeline. | list of stages | Yes | |||
max_iterations | Maximum number of iterations the pipeline can perform. | 2 | integer | No | ||
default_response | In case the maximum iterations are reached, the value to merge with the final response. | null | object or null | No | ||
exit_field_condition | Field of the final response where values will be checked; a JMESPath expression for path formats. | string | Yes | |||
match_any_values | If any value in this list is in the field, the pipeline will exit the loop. | null | array or null | No | ||
match_all_values | If all the values in this list are in the field, the pipeline will exit the loop. | null | array or null | No | ||
match_none_of_values | If none of the values in this list are in the field, the pipeline will exit the loop. | null | array or null | No | ||
stages_before_loop |
List of stages to be executed by the pipeline | [ ] | list of stages | No | ||
stages_after_loop |
List of stages to be executed by the pipeline | [ ] | list of stages | No |
Code Block | ||||
---|---|---|---|---|
| ||||
PIPELINE = PipelineLoop( enable=True, stages=[self.stage1, self.stage2], max_iterations=3, exit_field_condition='prime.a', match_any_value=[1], match_none_value=[5], match_any_value=[2, 3], default_response={'prime': {'a': 0, 'msg': 'Default message overriding part of the original'}} stages_before_loop=[stage0], stages_after_loop=[stage3], ) |