Template
Loop with retry on failure
by EMDS Team
Retries a flaky task up to 3 times. If all attempts fail, log and move on. The outer continue_on_error is intentionally off so a real failure halts the pipeline — wrap in a TRY/CATCH if you want soft failure.
Tags
Workflow definition (read-only)
{
"id": "",
"name": "Loop with retry on failure",
"description": "Starter template: retry a flaky task up to 3 times. If all attempts fail, log and move on (the outer continue_on_error is intentionally off so a real failure halts the pipeline — wrap in a TRY/CATCH if you want soft failure).",
"version": 1,
"steps": [
{
"id": "",
"name": "Try up to 3 times",
"description": "",
"step_type": "for_loop",
"enabled": true,
"continue_on_error": false,
"config": {
"loop_type": "range",
"variable_name": "attempt",
"start": "1",
"end": "3",
"step": "1"
},
"children": [
{
"id": "",
"name": "If something goes wrong, log and retry",
"description": "",
"step_type": "try_catch",
"enabled": true,
"continue_on_error": false,
"config": {
"error_variable": "attempt_error"
},
"children": [
{
"id": "",
"name": "Run flaky task",
"description": "Configure with Wizard… to pick the engine + model.",
"step_type": "task",
"enabled": true,
"continue_on_error": false,
"config": {
"engine_type": "",
"model_reference": "",
"input_source": "assessment",
"store_result_as": "attempt_result"
},
"children": [],
"else_children": []
}
],
"else_children": [
{
"id": "",
"name": "Log retry attempt",
"description": "",
"step_type": "log",
"enabled": true,
"continue_on_error": false,
"config": {
"level": "warning",
"message": "Attempt {{attempt}} failed: {{attempt_error}} — will retry if attempts remain."
},
"children": [],
"else_children": []
}
]
}
],
"else_children": []
}
]
}