How to exit the workflow if conditions met

Hello,

Is there any way to specify to exit the workflow if specific conditions are met by skipping the following steps?

I could not find any command that will do the abovementioned task in the documentation. I am looking for something similar to exit() in python.

Hello @HrishiDhondge ; can you take a look at Conditional workflows – Common Workflow Language User Guide and see if that helps you?

This would be very tedious to apply in my case. Can we somehow use this conditional to specify run only if a certain input file exists?

You could have an optional input and test for it’s existence in the when expression.

Something like when: $(inputs.my_opt_file === null) but I haven’t tested that.

1 Like