4.9. Executing a workflow without the GUI

Distributed with Taverna is a utility script called executeworkflow.sh or executeworkflow.bat that allows a workflow to be executed outside of the Taverna workbench.

Note

In Mac OS X, this script is located within the Taverna application. So if Taverna was installed to /Applications, you can invoke the script as:

/Applications/Taverna.app/Contents/MacOS/executeworkflow.sh

The minimum requirement is to provide the name, or URL, to the workflow scufl document. The default behaviour is to save the workflow results into a directory with the same name of the workflow appended with _output. Within this directory is store the progress report of the workflow, and additional directories that contain the actual results. These directories are named after the workflow output names. Be aware that existing results are automatically overwritten if they exist.

Supplying inputs and modifying the default behaviour can be achieved with the following options.

-help displays this list of options.
-input name filename load a single value for the named input port from a file or URL.
-inputdoc filename load inputs from a Baclava XML document.
-outputdoc filename save the outputs to a new Baclava XML document.
-output directory save outputs as files in directory.
-report filename save the progress report as an XML document.

If outputs are stored as baclava data documents using -outputdoc, these results can be viewed graphically using the data viewer utility. This is used using the dataviewer script that can be found in the same location as executeworkflow.

Example 1.1. Executeworkflow examples

executeworkflow myworkflow.xml

executeworkflow http://somewhere.org/myworkflow.xml

executeworkflow -input myinput myinput.txt myworkflow.xml

executeworkflow -input myinput http://somewhere.org/myinput.txt myworkflow.xml

executeworkflow -inputdoc inputs.xml myworkflow.xml

executeworkflow -output result_run1 myworkflow.xml

Note that while the workflow is running you won't get much feedback about the progress of the workflow. Stack traces might or might not indicate an error, for instance a workflow with a processor that intentionally fails would produce a stack trace from the enactor even if the workflow itself did not fail. For more detailed log messages, explore log/taverna.log in your Taverna home directory.

If you are interested in executing a workflow from within your own application you should also read the section Programmatically executing a workflow.