conductor
conductor copied to clipboard
Feature: Add WHILE Task
Pull Request type
- [ ] Bugfix
- [X] Feature
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes (Please run
./gradlew generateLock saveLock
to refresh dependencies) - [ ] WHOSUSING.md
- [ ] Other (please describe):
NOTE: Please remember to run ./gradlew spotlessApply
to fix any format violations.
Changes in this PR
Describe the new behavior from this PR, and why it's needed
https://github.com/Netflix/conductor/discussions/3747
Alternatives considered
Describe alternative implementation you have considered
Does this support to do the decision from a SIMPLE task's output ? or a subworkflow's output ?
Does this support to do the decision from a SIMPLE task's output ? or a subworkflow's output ?
Yes, similar to the DO_WHILE
task, the output of each task is stored as part of the WHILE
task, indexed by the iteration value, allowing the condition to reference the output of a task for a specific iteration.
HI @Young-Zen thanks for the PR. This is a good to have, however, if we are adding a new task I think there is an opportunity here to address some of the shortcomings of do_while including support for nested loops, and a bit of usability with terminating conditions etc.
HI @Young-Zen thanks for the PR. This is a good to have, however, if we are adding a new task I think there is an opportunity here to address some of the shortcomings of do_while including support for nested loops, and a bit of usability with terminating conditions etc.
Hi, thank you for your feedback on the PR. I agree that there are opportunities to address the shortcomings of do_while, including support for nested loops and improving the usability of terminating conditions. I believe we can consider these enhancements in a subsequent PR to ensure a more comprehensive improvement. For the current PR, I will focus on adding the WHILE task as requested. If you have any further suggestions or considerations, please feel free to share them. Thank you!
I'm curious - what are the differences between this task and the existing DO_WHILE
task?
Edit: Nevermind, found it in the PR: However, unlike the `DO_WHILE` task, the `WHILE` task checks the condition before executing the task list, and if the condition is initially false, the task list will not be executed.