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


Defining a Process

In the GWL a “process” is a combination of some kind of command or script to be executed, the software packages that need to be available when executing the commands, and declarations of inputs and generated outputs. A process has a name, and optionally a synopsis and a description, for display purposes.

We create a process with the make-process constructor like this:

make-process
  name "hello"
  procedure
     ' display "hello"

This creates a process with the name “hello”, which will print the string "hello" once the process is executed. The procedure field holds the Scheme code that does all the work of saying “hello”. We will talk about the procedure field a little later and show how to write code snippets in languages other than Scheme.

Often we will want to refer to previously created processes later, for example to combine them in a workflow definition. To do that we need to bind the created processes to variable names. Here we bind the above process to a variable named hello:

define hello
  make-process
    name "hello"
    procedure
       ' display "hello"

This is a very common thing to do, so the GWL offers a shorter syntax for not only creating a process but also binding it to a variable. The following example is equivalent to the above definition:

process hello
  procedure
     ' display "hello"

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