Skip to content

[BUG] DO_WHILE with an empty items iterates and executes anyway loopOver tasks #876

@adefretin-adista

Description

@adefretin-adista

Describe the bug
When we use a DO_WHILE task with an empty item list, it executes anyway loopOver tasks

Details
Conductor version: v3.22.2
Persistence implementation: Postgres
Queue implementation: Postgres
Workflow definition:

{ "createTime": 1773677259105, "updateTime": 0, "name": "test_do_while_with_empty_items", "description": "test_do_while_with_empty_items", "version": 1, "tasks": [ { "name": "do_while", "taskReferenceName": "do_while_ref", "inputParameters": {}, "type": "DO_WHILE", "decisionCases": {}, "defaultCase": [], "forkTasks": [], "startDelay": 0, "joinOn": [], "optional": false, "defaultExclusiveJoinTask": [], "asyncComplete": false, "loopCondition": "", "items": [], "loopOver": [ { "name": "http", "taskReferenceName": "http_ref", "inputParameters": { "uri": "https://orkes-api-tester.orkesconductor.com/api", "method": "GET", "accept": "application/json", "contentType": "application/json", "encode": true }, "type": "HTTP", "decisionCases": {}, "defaultCase": [], "forkTasks": [], "startDelay": 0, "joinOn": [], "optional": false, "defaultExclusiveJoinTask": [], "asyncComplete": false, "loopOver": [], "onStateChange": {}, "permissive": false } ], "onStateChange": {}, "permissive": false } ], "inputParameters": [], "outputParameters": {}, "failureWorkflow": "", "schemaVersion": 2, "restartable": true, "workflowStatusListenerEnabled": false, "ownerEmail": "adefretin+orkes@adista.fr", "timeoutPolicy": "ALERT_ONLY", "timeoutSeconds": 0, "variables": {}, "inputTemplate": {}, "enforceSchema": true, "metadata": {}, "maskedFields": [] }

To Reproduce
Steps to reproduce the behavior:

  1. Use and launch above workflow definition
  2. Check DO_WHILE task output

Expected behavior
A DO_WHILE task with an empty item list should not iterates and executes loopOver task list.

Screenshots
DO_WHILE task output is not empty
{ "1": { "http_ref": { "response": { "headers": { "content-length": [ "181" ], "content-type": [ "application/json" ], "date": [ "Mon, 16 Mar 2026 16:07:39 GMT" ], "strict-transport-security": [ "max-age=15724800; includeSubDomains" ] }, "reasonPhrase": "", "body": { "randomString": "xjxeslvqoxgalvjumhvj", "randomInt": 217, "hostName": "orkes-api-sampler-67dfc8cf58-24kxt", "apiRandomDelay": "0 ms", "sleepFor": "0 ms", "statusCode": "200", "queryParams": {} }, "statusCode": 200 } } }, "iteration": 1 }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions