We've moved!
For WDL questions, see the WDL specification and WDL docs.
For Cromwell questions, see the Cromwell docs and please post any issues on Github.


Geraldine_VdAuweraGeraldine_VdAuwera Cambridge, MAMember, Administrator, Broadie admin

Import statements can be used to pull in tasks/workflows from other locations as well as create namespaces. In the simplest case, an import statement adds the tasks/workflows that are imported into the current namespace. For example:


task x {
  command { python script.py }
task y {
  command { python script2.py }


import "tasks.wdl"

workflow wf {
  call x
  call y

Tasks x and y are in the same namespace as workflow wf is. However, if workflow.wdl could put all of those tasks behind a namespace:


import "tasks.wdl" as ns

workflow wf {
  call ns.x
  call ns.y

Now everything inside of tasks.wdl must be accessed through the namespace ns.

Each namespace contains: namespaces, tasks, and workflows. The names of these needs to be unique within that namespace. For example, there cannot be a task named foo and also a namespace named foo. Also there can't be a task and a workflow with the same names, or two workflows with the same name.

Sign In or Register to comment.