How to change inputs to task inside a Do While Task #2696
Replies: 2 comments 2 replies
-
Hi @apanicker-nflx , @manan164, I have a bit similar issue: I can't modify input variables dynamically or use workflow's variables inside of DO_WHILE condition. {
"createTime": 1692365021311,
"updateTime": 1692368195606,
"accessPolicy": {},
"name": "SimpleLoop",
"description": "Edit or extend this sample workflow. Set the workflow name to get started",
"version": 8,
"tasks": [
{
"name": "Loop Task",
"taskReferenceName": "LoopTask1",
"inputParameters": {
"value": "${workflow.input.value}"
},
"type": "DO_WHILE",
"startDelay": 0,
"optional": false,
"asyncComplete": false,
"loopCondition": "if ( $.second['approved']) { false; } else { true; }",
"loopOver": [
{
"name": "first",
"taskReferenceName": "first",
"description": "First Task",
"inputParameters": {},
"type": "SIMPLE",
"startDelay": 0,
"optional": false,
"asyncComplete": false,
"retryCount": 0,
"evaluatorType": "javascript"
},
{
"name": "Loop Task2",
"taskReferenceName": "LoopTask2",
"inputParameters": {
"value": "${workflow.input.value}",
"outerItaration": "$.LoopTask1['iteration']"
},
"type": "DO_WHILE",
"startDelay": 0,
"optional": false,
"asyncComplete": false,
"loopCondition": "if ($.second['approved']) { if (!$.third['approved']) { true; } else { false; } } else { false; }",
"loopOver": [
{
"name": "second",
"taskReferenceName": "second",
"description": "second Task",
"inputParameters": {},
"type": "SIMPLE",
"startDelay": 0,
"optional": false,
"asyncComplete": false,
"retryCount": 0,
"evaluatorType": "javascript"
},
{
"name": "third",
"taskReferenceName": "third",
"description": "third Task",
"inputParameters": {},
"type": "SIMPLE",
"startDelay": 0,
"optional": false,
"asyncComplete": false,
"retryCount": 0,
"evaluatorType": "javascript"
}
]
}
]
}
],
"inputParameters": [],
"outputParameters": {
},
"schemaVersion": 2,
"restartable": true,
"workflowStatusListenerEnabled": false,
"ownerEmail": "[email protected]",
"timeoutPolicy": "ALERT_ONLY",
"timeoutSeconds": 0,
"variables": {},
"inputTemplate": {}
} I'm using output parameters to mark tasks approved or rejected (in this case just using 'approved' output variable which is boolean).
In this case nothing will happen after 6-th step, but it should schedule |
Beta Was this translation helpful? Give feedback.
-
I am trying to execute a task inside a Do While Task.
Here I have to update the inputs to the task with every iteration.
How can we do that?
Beta Was this translation helpful? Give feedback.
All reactions