Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add WHILE Task #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Young-Zen
Copy link
Contributor

Pull Request type

  • Bugfix
  • 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
Netflix/conductor#3747
While

Alternatives considered

Describe alternative implementation you have considered

@meggarr
Copy link
Contributor

meggarr commented Dec 21, 2023

Does this support to do the decision from a SIMPLE task's output ? or a subworkflow's output ?

@Young-Zen
Copy link
Contributor Author

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.

@v1r3n
Copy link
Collaborator

v1r3n commented Dec 26, 2023

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.

@Young-Zen
Copy link
Contributor Author

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!

@bjpirt
Copy link
Contributor

bjpirt commented Feb 7, 2024

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.

Copy link

@JayblashYankixxlyricalpro JayblashYankixxlyricalpro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for sharing

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.

5 participants