To test your installation and configuration and to become familiar with the features of the software please follow the tutorial below.
Prerequisites
This tutorial follows on from the tutorial provided in the GRIA Workflow Plugins for Taverna guide. You should complete the GRIA Workflow
Plugins tutorial before proceeding with this tutorial. After completing the GRIA Workflow Plugins tutorial,
ensure that you save the final workflow in a convenient location, if you intend to close Taverna.
This tutorial requires that you have Taverna 1.4 with the GRIA Workflow Plugins
version 2.0.0 or later installed and configured. However, in order to use GRIA 5.2 services, you must use version 2.1.0 or later.
You will also need administrative access to a machine running the
GRIA Basic Application Services, version 5.0.1 or later. The GRIA Workflow Application software should be
installed on this machine according to the instructions provided in the installation section.
You should already have Taverna and the GRIA Workflow Plugins installed and configured, as this
is a prerequisite to completing the GRIA Workflow Plugins tutorial. Administrative access to a
GRIA Basic Application Services server and a working installation of the GRIA Workflow Application
software are required so that you are able to deploy the tutorial workflow as a GRIA application.
Finally, you will need a suitable client to test if the workflow application works correctly after it
has been deployed to the GRIA Job Service. Either the GRIA Client version 5.0.1 or later
or Taverna 1.4 with the GRIA Workflow Plugins version 2.0.0
or later can be used (or version 2.1.0, if using a GRIA 5.2 Job Service).
Overview
In the GRIA Workflow Plugins tutorial an image processing workflow was created. The workflow has an upload
processor to upload an input image, two job processors for performing the image processing, and a download
processor to retrieve the processed image. The final workflow can be seen below.

Image processing workflow developed in the GRIA Workflow Plugins tutorial
In this tutorial, the image processing workflow will be modified to make it suitable for deployment
as a workflow application. Before deploying the workflow, it is necessary to create a new input parameter
and create a new output parameter. When the workflow is deployed as a GRIA application, the workflow input
will be mapped to an input data stager and the workflow output will be mapped to an output data stager.
After clients have created jobs from the workflow application, they will be able to upload input data
to the input data stager, have the input data processed by the workflow by starting the job, and download the results from
the output data stager.
The workflow that will be produced at the end of this tutorial is shown below.

Final tutorial workflow
Compose Workflow
Start Taverna
If Taverna (with the GRIA Worfklow Plugins installed) is not already
running, follow the system-specific instructions provided below, to
start the workbench.
Note that when the the Taverna distribution was originally unpacked
during installation, a new directory was created. This directory will
hereafter be referred to as TAVERNA_HOME.
On WinXP, start the Taverna workbench by double clicking on the file:
TAVERNA_HOME/runme.bat
On Linux systems, first change directory to TAVERNA_HOME. Next, set execute permissions on the runme.sh, before executing it.
chmod u+x runme.sh
./runme.sh
Load the workflow
Load the final workflow that was created in the GRIA Workflow Plugins tutorial. Select the Load tool bar button
in the Advanced model explorer before selecting the Load from a file option from the context menu.

Loading the workflow
This displays a file system browser dialog, called Open workflow, from which you can select
the workflow to load.
Add a workflow input
Add a workflow input by right-clicking on the Workflow inputs node in the Advanced model explorer
and selecting Create New Input... in the context menu. You will be prompted for a name for the new input.
Call it imageIn.

Add a workflow input
Add a workflow output
Similarly, add a workflow output by right-clicking on the Workflow outputs node in the Advanced model explorer
and selecting Create New Output... in the context menu. Again, you will be prompted for a name.
Call it imageOut.

Add a workflow output
Add a string constant
Expand the Local Services node in the Available Services panel and right-click on the
String Constant processor. Select Add to model with name... from the context menu. You
will be prompted for a name for the new string constant processor. Use downloadedFile as
the name.

Add a string constant processor
Create data links
Place data links between processors in the workflow until the workflow
looks like the diagram below. Recall from the Taverna documentation
that data links are added using context menus available from the Advanced model explorer window. As an example, consider making the data link from the imageIn workflow input to the Upload processor. Select the imageIn workflow input in the Advanced model explorer window. Right-click and use the context menu to make a data link to the localFile input port of the Upload processor. Add the other data links in a similar way.

Add data links until the workflow looks like this
Edit string value
The download processor saves the swirl processor's swirled-image data stager contents as a new file
on the file system. Specify the name of the file by right-clicking on the downloadedFile processor in the
Advanced model explorer and selecting Edit string value... in the context menu. You will be
prompted for a new value. Set the value as swirlResults.

Edit string value to specify a download file
Mark processors as critical
Expand the Processors node in the Advanced model explorer. Select the Critical
checkbox alongside each processor in the workflow. This ensures that if there is a problem executing
the processor at runtime, the workflow will report failure correctly. In contrast, if a non-critical
processor fails, the workflow may report success.

Mark processors as critical
Configure processor lifecycle
Configure processors that create remote resources such that they terminate when the workflow finishes. This ensures
that remote resources are cleaned up on workflow completion. The Upload, Paint and Swirl
processors all create remote resources (data stagers and jobs). Configure each of these in turn. Select
the processor in the Advanced model explorer window. Right-click and select the approprate configure
option in the context menu (either Configure Upload or Configure GRIA Job). In the dialog,
find the Life cycle panel and ensure that the Terminate with workflow radio button is selected.
Select the OK button so that any changes take effect.

Configure processors to terminate with the workflow
Save the workflow
Select the Save toolbar button in the Advanced model explorer. This displays a file system browser dialog, called Save workflow, from which you can select a convenient location and file name to save the workflow. For the purpose of the
tutorial, we will assume that the workflow has been saved with a file name, tutorial-workflow.xml .
Deploy workflow
There are two steps to deploying the workflow. First, the deploy
tool will be used to generate the application wrapper script
and application descriptions files. The second step is using the Job
Service administration web page to deploy the application to GRIA.
Run the deploy tool
Open a console session on the machine that hosts the GRIA Basic Application Services and the GRIA Workflow Application.
On Windows systems, the command prompt is available under Start, All Programs or Programs, then Accessories. Select Command Prompt to start the console session.
On Linux systems, consult your system documentation on opening a console session, if necessary. You must also ensure
that you are logged in as the user that runs tomcat. For example, assuming that tomcat runs as the tomcat user, use
su to change to that user.
su tomcat
In the console, run the deploy tool without any arguments to see usage information.
deploy.pl
Note that Linux users can also use the following command, with the .pl file extension omitted.
deploy
The first line of the usage information shows the command format. This is similar to the text below.
deploy [OPTION]... WORKFLOW APPNAME [DESTINATION]
The command requires a Taverna workflow file, WORKFLOW, a name for the new application, APPNAME, and optionally can accept a destination directory, DESTINATION,
in which to place generated files. If a destination directory is not
provided, the files will be created in the current directory.
Chose a suitable destination directory for generated files. There is
no need to create the directory, but its parent directory must already
exist. We will use the deploy tool to create the destination directory
as well as generate the deployment files.
For this tutorial, we will assume that a Windows server is being used and that the tutorial workflow was saved at c:\tutorial-workflow, and that there is a directory, c:\gria\applications, under which we wish a destination directory, gwa-tutorial-app, to be created. Also, we will call the new application http://www.gria.org/workflow-application/tutorial-app.
Adjust paths
as appropriate, according to your systems requirements and your
preferences. Run the deploy tool from the console, but with your own
paths substituted. For example:
deploy.pl -c c:\tutorial-workflow.xml http://www.gria.org/workflow-application/tutorial-app c:\gria\applications\gwa-tutorial-app
Note that the -c switch is used so that the destination directory will be created.
The command should return to the console prompt with out any error
message being displayed. A destination directory containing three files
should have been created at your chosen location. The three files are: startJob.pl, ApplicationMetadata.xml and workflow.xml.
Deploy the application
Deployment is straightforward and is the same procedure as deploying any GRIA application. For full details of
GRIA Job Service administration and managing applications, see the The Job Service section of the
GRIA Basic Application Services User Guide.
Browse to the Job Service Administration web page. This can be accessed by following the Job Service
link from the main administration page for the GRIA Basic Application
Services. This is usually at a location similar to the one shown below,
but with the HOST and PORT substituted as appropriate for your system.
https://<HOST>:<PORT>/gria-basic-app-services
Scroll down to the Applications section and enter the absolute path to the destination directory that was created by the deploy tool, before selecting the Deploy new application button.

Deploy the workflow as an application
In the Application Properties section of the displayed page, select the Accept button to complete deployment
of the new application.
Test the application
Any GRIA Client can be used to test the tutorial workflow application.
For example, Taverna, with the GRIA Workflow Plugins installed, or the
GRIA Client would be suitable. For this tutorial, the GRIA Client will
be used for testing.
Start the client
On Linux systems, start the client by first changing directory to the client installation directory, and then running the gridcli command.
gridcli
On Windows systems start the client by double-clicking on the gridcli.bat file in the client installation directory.
Add the job service
Add your Job Service to the client according to the instructions in the
Adding Services section of the Client User's Tutorial. The easiest way to do this is by drag and drop of the WSDL
link for the Job Service, from a browser to the client. The WSDL link
is available in the main administration web page for the GRIA Basic
Application services.
Create a new job
Create a new job, according to the Creating a job section of the Client User's Tutorial. When prompted for the application type, select the new workflow application, as shown below.

Create a workflow job
Upload job input data
Upload an input image to the imageIn input data stager of the newly created job. Right-click
on the imageIn node in the client. In the context menu, follow Data Functions and select
Upload data. This will display a file system browser dialog called Open. Use any convenient image you have
available on your file system. For this tutorial, the account-types.png image from the GRIA Client 5.0.1
release will be used.

Upload job input data
Run the job
Run the job by right-clicking on the job in the client. Select Start job in the context menu. When prompted
for arguments, click Ok so that no arguments are provided.

Run the job
The Job Monitor dialog will be displayed and updated with
monitoring information while the job is executing. After job execution,
the end of the text in the dialog should be similar to the text shown
below.

Job monitoring output
Download the output
Download the processed image by previewing the image in the client. Right-click on the imageOut output data stager
in the client. In the context menu, select Data properties and then select the Preview tab in the dialog.
Click Ok in the warning dialog to indicate that you are happy to download the data for preview. If you used the
same input image, your output will look similar to that shown below.

Preview the output image
This completes the tutorial. You have successfully modified a workflow
to make it suitable for deployment as a workflow application.
You have used the deploy tool to generate deployment files that the GRIA Job service requires. You have deployed the new
application using the Job Service administration pages. Finally, the GRIA Client has been used to test the new application.
Consult the Reference section for information that may not have been coverred in the tutorial.