Access Keys:
Skip to content (Access Key - 0)

Workflow

Taverna 2.1.2 Design Guide for caGrid 1.4

Table of Contents

Introduction


caBIG aims to bring together disparate data and analytic resources into a "World Wide Web of cancer research." This will be achieved through common standards and software frameworks for the federation of these resources into "grid" services. Many of the tasks in the collection and analysis of cancer-related data on the grid involve the use of workflow. Here, we define workflow as the connecting of services to solve a problem that each individual service could not solve. caGrid implements workflow by providing a grid service for submitting and running workflows that are composed of other grid services. The next chapters describe the architecture and APIs for interacting with caGrid workflow.

Taverna Overview


Introduction

Taverna, a part of myGrid project, is an application that helps in building and executing workflows to the users who are not necessarily experts in web services and programming. It provides access to a range of services with programmatic interfaces, primarily the molecular biology tools and databases available on the web, especially as web services. It allows bioinformaticians to construct workflows or pipelines of services to perform a range of different analyses, such as sequence analysis and genome annotation. These high-level workflows can integrate many different resources into a single analysis.

Taverna Workbench


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.

Scufl


Scufl (Simple Conceptual Unified Flow Language) is a simple workflow language, with a focus on bioinformatics, that has been developed on the Taverna project involving myGrid, in collaboration with the European Bioinformatics Institute and the Human Genome Mapping Project. The Workflow Service described in this document uses a Scufl based workflow definition file as an input.

Example Scufl Document

<?xml version="1.0" encoding="UTF-8"?>
<s:scufl xmlns:s="http://org.embl.ebi.escience/xscufl/0.1alpha" version="0.2" log="0">
  <s:workflowdescription lsid="urn:lsid:www.mygrid.org.uk:operation:W0TIAJ5S3K0" author="Tom Oinn" title="Example of a conditional execution workflow">If the input is true then the string 'foo' is emited, if false then 'bar'. Just a simple example to show how the monster works, so to speak.</s:workflowdescription>
  <s:processor name="Fail_if_false">
    <s:local>org.embl.ebi.escience.scuflworkers.java.FailIfFalse</s:local>
  </s:processor>
  <s:processor name="Fail_if_true">
    <s:local>org.embl.ebi.escience.scuflworkers.java.FailIfTrue</s:local>
  </s:processor>
  <s:processor name="foo">
    <s:stringconstant>Foo</s:stringconstant>
  </s:processor>
  <s:processor name="bar">
    <s:stringconstant>Bar</s:stringconstant>
  </s:processor>
  <s:processor name="Echo_list">
    <s:local>org.embl.ebi.escience.scuflworkers.java.EchoList</s:local>
  </s:processor>
  <s:link source="condition" sink="Fail_if_true:test" />
  <s:link source="condition" sink="Fail_if_false:test" />
  <s:link source="foo:value" sink="Echo_list:inputlist" />
  <s:link source="bar:value" sink="Echo_list:inputlist" />
  <s:link source="Echo_list:outputlist" sink="result" />
  <s:source name="condition">
    <s:metadata>
      <s:description>Enter the string 'true' or 'false' here to show the conditional branching</s:description>
    </s:metadata>
  </s:source>
  <s:sink name="result" />
  <s:coordination name="bar_BLOCKON_Fail_if_true">
    <s:condition>
      <s:state>Completed</s:state>
      <s:target>Fail_if_true</s:target>
    </s:condition>
    <s:action>
      <s:target>bar</s:target>
      <s:statechange>
        <s:from>Scheduled</s:from>
        <s:to>Running</s:to>
      </s:statechange>
    </s:action>
  </s:coordination>
  <s:coordination name="foo_BLOCKON_Fail_if_false">
    <s:condition>
      <s:state>Completed</s:state>
      <s:target>Fail_if_false</s:target>
    </s:condition>
    <s:action>
      <s:target>foo</s:target>
      <s:statechange>
        <s:from>Scheduled</s:from>
        <s:to>Running</s:to>
      </s:statechange>
    </s:action>
  </s:coordination>
</s:scufl>

The Scufl based workflow description file above is represented in the Figure below:

Figure 1: Example Workflow in Taverna Workbench

Workflow Architecture


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.
InputStream workflowInputStream = getWorkflowInputStream();
  • 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.
Map<String, DataThing> inputs = loadInputDocument();
  • Initiate a workflow launcher – that is, load the workflow definition file.
WorkflowExecutionThread executor = new WorkflowExecutionThread(args, this.getResourcePropertySet());

Where args is the array holding the input arguments.

  • Invoke the workflow (synchronous) and get output
launcher.start();
  • 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

Last edited by
Bronwyn Gagne (843 days ago)
Adaptavist Theme Builder Powered by Atlassian Confluence