Skip to content

fix: allow DO_WHILE tasks with 'items' to pass validation without loopCondition#820

Open
nthmost-orkes wants to merge 11 commits intoconductor-oss:mainfrom
nthmost-orkes:fix/819-do-while-validator-items-field
Open

fix: allow DO_WHILE tasks with 'items' to pass validation without loopCondition#820
nthmost-orkes wants to merge 11 commits intoconductor-oss:mainfrom
nthmost-orkes:fix/819-do-while-validator-items-field

Conversation

@nthmost-orkes
Copy link
Copy Markdown
Contributor

Summary

Fixes #819

WorkflowTaskTypeConstraint.WorkflowTaskValidator unconditionally required loopCondition for all DO_WHILE tasks. When using list-iteration mode (the items field introduced in #624), the executor auto-generates the loop condition — users should not need to supply one. This prevented any workflow definition using list iteration from being saved.

  • When items is set (non-empty), skip the loopCondition requirement
  • When _items is in inputParameters (Orkes compatibility), same
  • Traditional mode (neither set) still requires loopCondition as before
  • loopOver remains required in all modes

Test plan

  • testWorkflowTaskTypeDoWhile — existing test, verifies traditional mode still requires both loopCondition and loopOver
  • testWorkflowTaskTypeDoWhileListIterationMode — new: items field set, no loopCondition, expects 0 violations
  • testWorkflowTaskTypeDoWhileListIterationModeOrkesCompat — new: _items in inputParameters, no loopCondition, expects 0 violations
  • Run ./gradlew :conductor-core:test --tests "com.netflix.conductor.validations.WorkflowTaskTypeConstraintTest"

🤖 Generated with Claude Code

…pCondition

When a DO_WHILE task uses list-iteration mode (items field set, or _items
in inputParameters for Orkes compat), the executor auto-generates the loop
condition. The validator was incorrectly requiring loopCondition in all
cases, blocking workflow definitions that used the list-iteration feature.

Fixes conductor-oss#819

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nthmost-orkes nthmost-orkes requested review from v1r3n March 6, 2026 21:41
@nthmost-orkes nthmost-orkes requested a review from bradyyie April 7, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't create workflow with list iteration in DO_WHILE

1 participant