Task


This section explains how you can embed your programs and compose them in simple OpenMOLE workflows.

A workflow is a set of tasks linked with each other through transitions. From a high level point of view, tasks comprise inputs, outputs and optional default values. Tasks are the atomic computing element of OpenMOLE. They describe what OpenMOLE should execute and delegate to remote environments. They embed your own programs. Depending on what kind of program (binary executable, Java...) you want to embed in OpenMOLE you have to choose the matching task. Tasks execution depends on inputs variables, which are provided by the dataflow, and each task produces outputs which are provided to the dataflow and transmitted to the input of consecutive tasks.

Let's begin by a very useless task that does nothing to illustrate all this jargon:
// Define a variable i of type Int
val i = Val[Int]

// Instantiate a task that does nothing
// this task takes the i variable in input and provides it back as an output to the dataflow for the next task
val t = EmptyTask() set (
  inputs += i,
  outputs += i
)

It is also possible to specify default values which are used by the task in case no input data was provided in the dataflow:
val i = Val[Int]

val t = EmptyTask() set (
  inputs += i,
  outputs += i,
  // set i's default value to 0
  i := 0
)

Pick up the specific task corresponding to the application you want to explore with OpenMOLE and let's get down to business: