Table of Contents
The Taverna Workbench allows users to construct complex analysis workflows from components located on both remote and local machines, run these workflows on their own data and visualise the results. To support this core functionality it also allows various operations on the components themselves such as discovery and description and the selection of personalised libraries of components previously discovered to be useful to a particular application. Aside from creating and editing, the most useful thing to be able to do with a workflow is to run it. The Taverna workbench provides an enactment engine for scientific workflows expressed in Scufl (Simple Conceptual Unified Flow language). The workflows can be run from the GUI provided by the Taverna workbench or they can executed programmatically. Since Taverna version 1.4 it has been possible to execute workflow through the WorkflowLauncher helper class. The WorkflowLauncher class provides API that can used to programmatically execute a workflow.
The Workflow component leverages the same infrastructure stack as the caGrid toolkit (GT4, Tomcat, Java, Ant, and Introduce) with the addition of the Taverna workflow engine. The TavernWorkflowService is a standard Introduce-built grid service that allows a workflow instance to be created from a workflow definition file. An EPR is returned to a WorkflowManagementService resource that can be used to start, cancel, and destroy the created workflow. The WorkflowManagementService is layered on top of the Taverna Workflow Engine, which provides the primary functionality for running the Taverna-defined workflows. See Figure 2 for an overview of this architecture.
The following actions are performed when a user invokes start on the workflow management service:
- Read the workflow definition file.
- The input arguments to the workflow are declared as an array of xsd:any. They are parsed and cast to the types that they are meant to be.
- Read the input parameters.
- Initiate a workflow launcher - that is, load the workflow definition file.
Where args is the array holding the input arguments.
- Invoke the workflow (synchronous) and get output
- The admin service responds with deployment summary reporting success if the workflow is deployed successfully.
- To start the workflow, a message is sent to the receiving partnerLink in the workflow.
- After the workflow successfully executes the results are returned to the client app/user by a call to getWorkflowOutput
Workflows are created using the TavernaWorkflowFactoryService, which is a grid service that follows the resource pattern. The returned object holds an EPR to a WorkflowManagementService, which can be used to manipulate the created workflow.
Public WMSOutputType createWorkflow(WMSInputType wMSInputElement) throws WorkflowException
Description: This method creates a workflow resource from the workflow definition file found in WMSInputType and returns an EPR of the created resource to the client. The Taverna resource, along with the most recent state, is persisted in the container and is recovered in the event of a container crash.
WMSInputType: This is the input to createWorkflow, and it consists of workflowName , a String tavernaDef, an Array of wsdlReferences, and an initial termination time for the workflow. If the termination time is not specified the service defaults to 24hrs. Termination of the workflow invalidates the WorkflowManagementService EPR and any running workflow is stopped.
WMSOutputType: This is the output of the createWorkflow method. An EPR is constructed by the factory and returned to the client. At this point the workflow document is deployed in the workflow engine, but it has not started. The EPR points to an instance of the WorkflowManagementService, which should be used to start the workflow.
UnableToDeployWorkflowFault: This fault is thrown if the workflow is unable to be deployed (e.g. the workflow definitions file submitted fails pre-deployment validation). We can probably validate the workflow using the following method:
InvalidBPELFault extends UnableToDeployWorkflowFault: This fault is throw if the workflow definition file submitted fails pre-deployment validation (e.g. not valid XML).
Factory ResourceProperties: We intend to provide aggregate resource properties on the factory service in our next iteration. Following are some of the examples of those:
- Total number of workflows
This service is used to manage the workflow resources created by the TavernaWorkflowFactoryService. The service provides asynchronous execution of deployed workflows. The following are the operations the service provides in addition to the standard WS-RF operations such as destroy(), setTerminationTime(), etc.
public WorkflowStatusType start (StartInputType startInput) throws WorkflowException, StartCalledOnStartedWorkflowFault
Description: This operation is used to start the workflow deployed using the factory with a set of input parameters. The input parameters are modeled as an array of xsd:any elements. The output is a void type.
StartCalledOnStartedWorkflowFault: This is thrown if start() is called on a workflow that is not in any one of the terminal states (i.e. Done, Failed, Cancelled).
WorkflowException: Every other fault results in the service throwing this with a message describing more details as to what went wrong.
Public WorkflowStatusType getStatus( ) throws WorkflowException
Description: This operation is used to query for the status of the deployed workflow. WorkflowStatusType includes a fault.
Public WorkflowOutputType getWorkflowOutput() throws WorkflowException
Description: This operation is used to get the final output of a completed workflow. It will return a fault if the workflow is not yet completed. If Taverna in future allows for intermediate access of results, then this operation can potentially return the last result that the workflow engine has for this workflow. The output is modeled as a array of xsd:any elements.
Public WorkflowStatusType pause() throws CannotPauseFault
Description: This operation pauses the workflow until resume() or cancel() is invoked.(Currently Taverna doesn't support pause/resume. This operation is not implemented yet.)
Public WorkflowStatusType resume() throws CannotResumeFault
Description: This operation resumes a paused workflow.(Currently Taverna doesn't support pause/resume. This operation is not implemented yet.)
Public void destroy()
Description: This is a standard WS-RF operation but mentioned here to clarify the semantics and what it means to a Workflow Resource. If called, this method will delete a Workflow resource along with the intermediate results and subscriptions for notifications. This operation is called by the GT4 framework when the lifetime of a resource is expired. The lifetime is set in the initial create() call in the factory. Internally, destroy() removes all the database entries for a particular workflow resource, all the subscriptions for notifications, and other temporary resources both in memory and on the disk.