How to test workflows locally

Allie Hajian

When creating WDL workflows, you can test on a local installation of the Cromwell execution engine before uploading and testing in Terra. Cromwell is the workflow execution service used to run and test WDL workflows.

What is Cromwell?

Cromwell is a Java workflow management application that requires the Java 11 cloud environment. 
Cromwell is developed, tested, and containerized using AdoptOpenJDK 11 HotSpot.

How to install Cromwell and its dependencies

For full step-by-step instructions, see the Five minute introduction to Cromwell tutorial. 

1. Install the Java 11 Developer Kit if you do not already have it. Note: You should install the JDK, not the cloud environment or JRE.

Why use Java Development Kit packages?We point to the “JDK” (Java Development Kit) packages because they are the most complete Java packages (suitable for developing in Java as well as running Java executables), and we've had reports that the “JRE” (Java Runtime Environment) equivalents weren't sufficient to run GATK on some machines.

2. Download Docker. Installation instructions can be found here.

3. Download the latest Cromwell jar hereNote: be sure to do this after installing Java 11.

Test that your environment is set up correctly

To test that your environment works, try running the HelloWorld WDL below. You don't need an inputs file to run this workflow, and the output should be Hello World written in the stdout file.

workflowHelloWorld {callWriteGreeting}taskWriteGreeting {command{echo"Hello World"}output{Fileoutfile = stdout()}}

Once you verify that you can run WDLs locally, you can develop and test WDLs of any length on your own machine, before uploading to the Broad Methods Repository or Dockstore to share and use on Terra. 

Was this article helpful?

0 out of 1 found this helpful

Comments

4 comments

  • Comment author
    Peter van Galen

    Hi,

    To illustrate how new I am to this, until yesterday I had never heard of cromwell. That being said, I am developing a workflow, and would like to test it locally. After I download the latest Cromwell jar (cromwell-72.jar), what do I do? Do I need to install it somehow?

    How exactly can I "run" the HelloWorld WDL?

    Thank you,

    Peter

    0
  • Comment author
    Peter van Galen

    * I found the answer to my questions here: https://cromwell.readthedocs.io/en/stable/tutorials/FiveMinuteIntro/

    0
  • Comment author
    Andrew Davidson

    Documentation is incomplete. Please add the link Peter mentioned

    0
  • Comment author
    Allie Cliffe

    Andrew Davidson Thanks for the heads up! I added the link and updated some of the other information in the article as well. Hopefully it's more complete!

    0

Please sign in to leave a comment.