We've moved!
You can find our new documentation site and support forum for posting questions here.

How to exit in the middle of a linear chain tasks in wdl

I have a sequential of tasks. If I found the output of task1 has an error message "No space on the disk", I would like to exit the analysis. Don't continue with the following tasks. Is that implementable and how to do that in WDL? Thank you very much.

Best Answers


  • arielyharielyh Member

    @SChaluvadi Thanks for your answer, it's good to know the continueWhilePossible option. My case is slightly different than your answer. My task1 doesn't fail, it just has the "No space" message on the stderr log file. But the problem is task 1 actually generates an empty output file instead of performing the correct analysis. And the pipeline will continue with following tasks 2 and 3, which is a waste of time and money.

    The pipeline I mentioned is "esalinas/polysolverWorkflow" method. It has 3 tasks: polysolverType, polysolverMut and polysolverAnnot. The polysolverType task sometimes will generate an empty output. And if I check its stderr, I always found the "no space" error message. I'm thinking of adding a conditional check in the WDL, if the output file is empty, or if "no space" is in the stderr file, it can generate an error and break the pipeline. But I don't know how to implement this conditional check. Thanks.

  • arielyharielyh Member

    Hi @SChaluvadi. I looked up the explanation of failOnStderr, it says "Set failOnStderr to true for these tasks, and it will be considered a failure if anything is written to the standard error stream." However, I don't want the task to be failed for anything on the standard error. I only want it failed on several specific errors. Is there a way to set the specific message? I looked at this instruction and didn't find more details about how to set it to "No space on disk" error. https://cromwell.readthedocs.io/en/develop/RuntimeAttributes/#failOnStderr
    Maybe I looked at the wrong instruction? Could you please give me a link for the detailed instruction of continueOrReturnCode and failOnStderr settings? Thanks a lot.

  • arielyharielyh Member

    Thanks, @SChaluvadi , I will try this method and let you know if it works.

Sign In or Register to comment.