Next: , Previous: , Up: Top   [Contents][Index]


Defining a Workflow

A workflow is a combination of processes that run in a certain order or simultaneously. You can specify the dependencies of processes manually or let the GWL figure it out by matching up the declared inputs and outputs of all processes.

A workflow definition will look something like this:

workflow do-stuff
  processes
    . this
    . that
    . something-else

This defines a workflow with the name “do-stuff”, binds it to a variable do-stuff, and declares that it consists of the three processes this, that, and something-else. All of these processes will be run at the same time. This may not be what you want when the processes depend on each other.

If the processes all declare inputs and outputs, the GWL can connect the processes and ensure that only independent processes are run simultaneously. Use the auto-connect procedure on your processes:

workflow do-stuff
  processes
    auto-connect
      . this
      . that
      . something-else

You can also explicitly construct a graph of processes with the aptly named graph macro. The following workflow definition lets the process combine run after generate-A and generate-B, which will both run in parallel. The process compress will run after combine, and thus at the very end.

workflow frobnicate
  processes
    graph
      combine -> generate-A generate-B
      compress -> combine