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

Allow logical AND and OR operators in expressions to imply truthiness from node states #218

Open
dustinblack opened this issue Oct 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@dustinblack
Copy link
Member

dustinblack commented Oct 17, 2024

Please describe what you would like to see in this project

With a standard expression, truthiness can be implied by simply reaching a particular node state in a workflow:

!expr $.steps.example.outputs

However, when a logical AND or OR is added to the expression, the expectation is explicit boolean values on each side. Because of this, it is not currently possible to evaluate multiple node states in an expression. This does not work:

!expr $.steps.example.outputs || $.steps.example.disabled.output

Also, the stringToBool() function does not work in this case since it will only convert explicitly truthy string values like true, false, y, n, 1, 0, etc. So this also does not work:

!expr stringToBool($.steps.example.outputs) || stringToBool($.steps.example.disabled.output)

Please describe your use case

This is particularly important when using a wait_for in a workflow step for explicit dependencies and serialization.

@dustinblack dustinblack added the enhancement New feature or request label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant