4.
Reference
Up one level
Input and output mapping
GRIA Jobs have inputs and outputs in the form of files that are held in data stagers. They can also have command line arguments, but these are not used by the GRIA Workflow Application. When a job is implemented with a Taverna workflow, the system must determine both which workflow input or output corresponds to a paticular data stager, and how the data should be transferred between the two.

Mapping between data stagers and workflow inputs and outputs
The system uses the ApplicationMetadata.xml file to determine the workflow input or output that corresponds to a particular data stager. Recall from the tutorial that this file is auto generated using the deploy tool. In contrast, the workflow author must specify how data should be transferred between a staged input file and a workflow input, and between a workflow output and a staged output file.
Two strategies are supported for transferring data: Pass by reference and Pass by value. Explanations of these strategies are provided in sections below. First, we will consider how to declare that a workflow input or output should use a particular strategy. The MIME types feature in Taverna is used to provide some additional typing of workflow inputs and outputs.
In the Advanced model explorer window in Taverna, right-click on a workflow input or output and select Edit metadata in the context menu.

Editing workflow input and output metadata
A dialog for editing metadata will be displayed. Click on the MIME Types tab to view the MIME types that have been associated with the input or output. The strategy that you wish to be used for transferring data can be entered in the Enter new MIME type and hit return text box.

Specifying a MIME type for an input or output
Pass by reference is the default strategy and there is no need to add an entry if this is the behaviour you require. It is possible to be explicit, however, by entering a value of filename and hitting return.

Specifying pass by reference
Alternatively, if you wish pass by value to be used, enter value and hit return.

Specifying pass by value
Note that you should never specify both filename and value for the same workflow input or output.
Pass by reference
As mentioned above, pass by reference is the default strategy. In this case, the file name of the staged file is passed to a workflow input, or read from a workflow output, at runtime.
The system will provide a workflow input with the file name of a staged input file. In contrast, the workflow author must ensure that a workflow output is passed the correct file name for a file that should be staged as an output.
When using pass by reference, relative file names should always be used. In general, be very careful if using absolute paths in workflows that will be deployed as workflow applications.
Pass by reference is useful when data sets are being used that are not trivial in size.
The workflow developed, deployed and tested in the tutorial used pass by reference for its inputs and outputs.
Pass by value
To use pass by value for a workflow input or output, you must explicitly declare value as a MIME type, as described above. In this case, the system will pass the contents of an input data stager to a workflow input at runtime. Similarly, the contents of a workflow output will be used to create a file that will be staged in an output stager.
Pass by value is useful when very small data sets are being used.
Example
A simple example of a workflow that uses pass by value for all of its inputs and outputs is included in this release. The workflow definition is available at:
GRIA_WORKFLOW_HOME/samples/pass-by-value.xml
The workflow has a local (Java) processor for concatenating two input strings to produce
a single output string, as shown in the diagram below.

Pass by value example workflow
This workflow is ready to be deployed as a GRIA application using the deploy tool. Refer to the Deploy Workflow section of the tutorial for details of using the deploy tool and deploying GRIA applications.
Log files
Log files for plugins can be found under the directory:
GRIA_WORKFLOW_HOME/logs
