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

onlyIf Pre Condition #820

Open
lukicdarkoo opened this issue May 17, 2024 · 2 comments
Open

onlyIf Pre Condition #820

lukicdarkoo opened this issue May 17, 2024 · 2 comments

Comments

@lukicdarkoo
Copy link

It would be great to have onlyIf pre-condition as it is more readable than skipIf (in most situations). The main problem is a "collision" with the skipIf pre-condition. They can be mutually exclusive, but maybe somebody has a better idea.

@facontidavide
Copy link
Collaborator

I 100% agree.

Sometimes, to avoid the reverse logic, I use successIf and failureIf

@lukicdarkoo
Copy link
Author

If successIf and failureIf are both true then the node will fail. Likewise, we can have onlyIf and skipIf and give priority to e.g. skipIf. Or maybe even better, throw an exception if both conditions are defined as it can lead to undesired behavior.

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

No branches or pull requests

2 participants