This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
-
Conductor version: 3.7.0 Hi I have a workflow here that includes a DO_WHILE task that will not stop looping and errors out after running once (I assume do to trying to read an invalid index) Am I doing this wrong? here is the definition: {
"name": "mapping_subworkflow",
"description": "This subworkflow maps all applicants to an array",
"version": 11,
"tasks": [
{
"name": "inline_task",
"taskReferenceName": "inlineGetApplicantLength",
"inputParameters": {
"applicants": "${workflow.input.submission.applicants}",
"evaluatorType": "javascript",
"expression": "(function () { return $.applicants.length; })()"
},
"type": "INLINE",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": []
},
{
"name": "do_while_task",
"taskReferenceName": "loopSubmissionMapping",
"inputParameters": {
"value": "${inlineGetApplicantLength.output.result}"
},
"type": "DO_WHILE",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopCondition": "if ( ($.loopSubmissionMapping['iteration'] < $.value ) ) { true; } else { false; }",
"loopOver": [
{
"name": "inline_task",
"taskReferenceName": "inlineGetApplicantByIndex",
"inputParameters": {
"applicants": "${workflow.input.submission.applicants}",
"index": "${loopSubmissionMapping.output.iteration}",
"evaluatorType": "javascript",
"expression": "(function () { var index = $.index || 0; var applicants = $.applicants; return applicants[index]; })()"
},
"type": "INLINE",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": []
},
{
"name": "worker_applicant_sql_mapping_task_test",
"taskReferenceName": "workerMapApplicant",
"inputParameters": {
"data": "${inlineGetApplicantByIndex.output.result}",
"meta": {
"type": "${workflow.input.type}"
}
},
"type": "SIMPLE",
"decisionCases": {},
"defaultCase": [],
"forkTasks": [],
"startDelay": 0,
"joinOn": [],
"optional": false,
"defaultExclusiveJoinTask": [],
"asyncComplete": false,
"loopOver": []
}
]
}
],
"inputParameters": [],
"outputParameters": {
"mapped": "${loopSubmissionMapping.output}"
},
"schemaVersion": 2,
"restartable": true,
"workflowStatusListenerEnabled": false,
"ownerEmail": "example@email.com",
"timeoutPolicy": "ALERT_ONLY",
"timeoutSeconds": 0,
"variables": {},
"inputTemplate": {}
} |
Beta Was this translation helpful? Give feedback.
Answered by
arketec
Sep 15, 2022
Replies: 1 comment
-
nevermind, issue was a bug in the worker. However Conductor 3.7 doesn't show errors from the DO_WHILE tasks in the UI so I had to make the tasks optional to see the errors |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
arketec
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nevermind, issue was a bug in the worker. However Conductor 3.7 doesn't show errors from the DO_WHILE tasks in the UI so I had to make the tasks optional to see the errors