Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Scufl2 has moved to Apache (incubator) 

Information in this section is out of date!

 

The SCUFL2 API provides Java classes that can be used independently from Taverna to inspect, modify and generate SCUFL2 workflows.

Table of Contents

Overview

The code and definitions for SCUFL2 are kept in the GitHub project scufl2.

Modules

Official modules:

  • scufl2-api Java Beans for working with SCUFL2 workflow structure
  • scufl2-t2flow .t2flow import from Taverna 2
  • scufl2-rdfxml .wfbundle import/export (RDF/XML)
  • scufl2-ucfpackage Structured ZIP-file support (used by scufl2-rdfxml)

Experimental modules:

  • scufl2-usecases Example code covering SCUFL2 use cases4codes. (Replaced by https://github.com/myGrid/scufl2-examples)
  • scufl2-rdf Pure RDF export/import (out of date)
  • scufl2-scufl SCUFL 1 .xml import from Taverna 1
  • scufl2-validation API for validating a Scufl2 workflow bundle
  • scufl2-validation-correctness Validate correctness of Scufl2 workflow definition
  • scufl2-validation-structural Validate that a Scufl2 workflow definition is structurally sound
  • scufl2-validation-integration Integration tests for scufl2-validation modules

Maven

The simplest way to use the SCUFL2 API is to use Maven 3 (Maven 2 should also work) and the myGrid Maven repository. See the example pom.xml.

In short, add to your pom.xml:

Code Block
xml
<properties>
	<scufl2.version>0.14.0</scufl2.version>
</properties>
<repositories>
	<repository>
		<releases />
		<snapshots>
			<enabled>false</enabled>
		</snapshots>
		<id>mygrid-repository</id>
		<name>myGrid Repository</name>
		<url>http://www.mygrid.org.uk/maven/repository</url>
	</repository>
</repositories>
<dependencies>
	<dependency>
		<groupId>uk.org.taverna.scufl2</groupId>
		<artifactId>scufl2-api</artifactId>
		<version>${scufl2.version}</version>
	</dependency>
	<dependency>
		<groupId>uk.org.taverna.scufl2</groupId>
		<artifactId>scufl2-t2flow</artifactId>
		<version>${scufl2.version}</version>
	</dependency>
	<dependency>
		<groupId>uk.org.taverna.scufl2</groupId>
		<artifactId>scufl2-rdfxml</artifactId>
		<version>${scufl2.version}</version>
	</dependency>
</dependencies>

The <property>scufl2.version</property> used above allows you to consistently upgrade to later versions of SCUFL2. Note that the version number above might not be the latest, see Release notes.

Releases

0.

...

14.0

2014-04-30: This release adds the methods WorkflowBundleIO.getSupportedReaderMediaTypes() and getSupportedWriterMediaTypes(). This version will not allow invalid names of workflow beans (e.g. containing /:or ASCII controll characters).

Changes: (commit log)

  • ReaderException if nested workflow uuid is not found
  • SCUFL2-87: Disallow certain invalid characters in name

  • use Accept headers for readBundle(URL)
  • t2flow parser: Updated error msg if missing dispatch layer
  • Log warning if multiple mediatypes are detected
  • Escape \ in annotations to \\ in Turtle

  • Content type "content/unknown" (as returned by OpenJDK 7 URLConnection) ignored 

0.13.1

2013-11-18: This patch release updates SCUFL2's t2flow parser to correctly set the @base for any SemanticAnnotation's, e.g. from Taverna 2's Component Plugin. This is used by scufl2-wfdesc which now embeds any annotations on workflows, processors and ports.

Changes: (commit log)

  • Correct @base for semantic annotations (e.g. so that <> annotates the correct processor)

0.13.0

2013-11-07: This release changes the API for the Processor dispatch stack. Retry, failover and looping are now set by configuring the Processor. The Dispatch Stack is now not directly exposed in SCUFL2. Custom dispatch stack layers can however still be added to the Processor configuration by using the keywords _below and _type within the processor configuration.

Changes: (commit log)

  • SCUFL2-126: Removed dispatch stack, Processor is Configurable
  • Added Scufl2Tools.createConfigurationFor()
  • Workflow Bundle version is bumped to manifest:version 0.4.0 

0.12.1

2013-10-07: This patch release primarily adds a manifest:version attribute in the Workflow Bundle's META-INF/manifest.xml, version 0.3.0 indicates the modified bundle format with JSON configurations as of SCUFL2 API 0.12.0.

Changes: (commit log)

  • Indicate rootfile version with manifest:version (0.3.0)
  • scufl2-t2flow: Spreadsheet Import uses correct start/end and avoids JSON array for column/row ranges

0.12.0

2013-10-07: This release changes the API for Configurations. PropertyResource and friends have been replaced with JSON configurations, accessible using Jackson. Note that this means that the configuration for all the default Taverna activities also have changed. The motivation for this was to simplify the flexibility of configurations within the SCUFL2 API, Taverna 3 activities and third-party read/write of Workflow Bundles.

Changes: (commit log)

  • Configuration done as JSON objects instead of PropertyResource. JSON is saved separately in Workflow Bundle.
    • Note: t2flow translation of External Tool activity is temporarily disabled as it has not yet been updated to JSON
  • PropertyResource, PropertyObject, etc. have been removed
  • Available as OSGi bundles
  • Scufl2Tools adds methods createConstant, createConfigurationFor, getConstantStringValue, getConstants
  • Workflows/profiles with "Escaped names" (e.g. with spaces) now saved with correct (unescaped) filename inside workflow bundle
  • set/getConfigurableType -> set/getType

0.11.0

2013-04-25: A "silent" release which updates annotation support, used by scufl2-wfdesc.

Changes: (commit log)

  • Support for annotations (experimental)
  • Revision API refactored
  • Nested workflow help in Scufl2Tools
  • Any workflow bean can be .clone()d
  • WorkflowBundleIO.save*() now always set the parents first

Fixes (from Jira):

Bug

  • [SCUFL2-81] - BlockingControlLink compare method fails to handle null block or untilFinished
  • [SCUFL2-82] - DataLink.compareTo(Object o) does not handle nulls
  • [SCUFL2-97] - Configuration.getConfigurableType() and setConfigurableType(URI) throw NullPointerException
  • [SCUFL2-120] - Stack overflow when parsing profile with nodes of type collection
  • [SCUFL2-121] - EmptyStackException when writing workflow bundle
  • [SCUFL2-123] - NPE on parsing Loop activity configuration

Improvement

  • [SCUFL2-96] - compareTo in AbstractNamed takes account of parent

New Feature

0.10-SNAPSHOT-biovel

2012-07-13: Internal snapshot release for the BioVel project

Changes: (commit log)

  • Improved parsing of External Tool activity
  • Fixes bugs SCUFL2-81, SCUFL2-82, SCUFL2-120, SCUFL2-121, SCUFL2-122
  • Read revision log of previous versions of workflow from t2flow (adds Workflow.getCurrentRevision() and uk.org.taverna.scufl2.api.annotation.Revision). Bump to new major version 0.10.x due to API addition.
  • When converting from t2flow, embeds original t2flow under history/

0.9.2

2012-06-12: First public release.

Changes: (commit log)

  • scufl2-usecases: Java examples moved to separate GitHub project: https://github.com/mygrid/scufl2-examples
  • scufl2-ucfpackage: Workflow Bundles handling of relative paths
  • scufl2-rdfxml: URIs for Nested workflows should be relative to profile, not bundle

...

  • scufl2-api: Error messages for missing JAXB now less intrusive
  • scufl2-rdfxml: File locking issues on Windows resolved

0.9

Changes: (commit log)

Important changes:

...

Changes: (commit log)

First internal release.

Maven

The simplest way to use the SCUFL2 API is to use Maven 3 (Maven 2 should also work) and the myGrid Maven repository. See the example pom.xml.

In short, add:

...


<properties>
	<scufl2.version>0.9.2</scufl2.version>
</properties>
<repositories>
	<repository>
		<releases />
		<snapshots>
			<enabled>false</enabled>
		</snapshots>
		<id>mygrid-repository</id>
		<name>myGrid Repository</name>
		<url>http://www.mygrid.org.uk/maven/repository</url>
	</repository>
</repositories>
<dependencies>
	<dependency>
		<groupId>uk.org.taverna.scufl2</groupId>
		<artifactId>scufl2-api</artifactId>
		<version>${scufl2.version}</version>
	</dependency>
	<dependency>
		<groupId>uk.org.taverna.scufl2</groupId>
		<artifactId>scufl2-t2flow</artifactId>
		<version>${scufl2.version}</version>
	</dependency>
	<dependency>
		<groupId>uk.org.taverna.scufl2</groupId>
		<artifactId>scufl2-rdfxml</artifactId>
		<version>${scufl2.version}</version>
	</dependency>
</dependencies>

The <property>scufl2.version</property> used above allows you to consistently upgrade to later versions of SCUFL2. Note that the version number above might not be the latest, see #Release notes.

Source code

You should not need to compile the SCUFL2 API for most uses, as the Maven deployment even includes the source code for retrieval by tools like Eclipse using the m2e plugin.

...

To inspect the code of the latest release, use git tag and git checkout:

No Format

: stain@ralph /tmp/93/scufl2; git tag
0.10-biovel-SNAPSHOT
0.11.0
0.5
0.9
0.9.1
0.9.2
eclipse-xsd-bug

: stain@ralph /tmp/93/scufl2; git checkout 0.9.2
Note: checking out '0.9.2'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 1a50c07... [maven-release-plugin]  copy for tag scufl2-0.9.2

: stain@ralph /tmp/93/scufl2 ;

...

Note
titleSeparate JARs

The build does not yet produce a single scufl2.jar for non-Maven users. This is planned for the 1.0 release. See #Usage Usage below on how to use the JARs independently.

...

Some of the experimental modules are not built automatically, to build them separately, run the same command from within their folder.

Example output:

No Format

: stain@ralph /tmp/93/scufl2; mvn clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]

[INFO] Taverna Scufl 2
[INFO] Taverna Scufl 2 UCF Package
[INFO] Taverna Scufl 2 API
[INFO] Taverna Scufl 2 RDF/XML
[INFO] Taverna Scufl 2 t2Flow parser
[INFO] Taverna Scufl 2 SCUFL parser
[INFO] Taverna Scufl 2 use cases
[INFO] Taverna Scufl 2 validation
[INFO] Taverna Scufl 2 validation structural
[INFO] Taverna Scufl 2 validation correctness
[INFO]
                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building Taverna Scufl 2 0.9.2
[INFO] ------------------------------------------------------------------------
...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]

[INFO] Taverna Scufl 2 ................................... SUCCESS [13.881s]
[INFO] Taverna Scufl 2 UCF Package ....................... SUCCESS [32.924s]
[INFO] Taverna Scufl 2 API ............................... SUCCESS [29.490s]
[INFO] Taverna Scufl 2 RDF/XML ........................... SUCCESS [1:20.551s]
[INFO] Taverna Scufl 2 t2Flow parser ..................... SUCCESS [1:37.902s]
[INFO] Taverna Scufl 2 SCUFL parser ...................... SUCCESS [11.911s]
[INFO] Taverna Scufl 2 use cases ......................... SUCCESS [15.337s]
[INFO] Taverna Scufl 2 validation ........................ SUCCESS [2.799s]
[INFO] Taverna Scufl 2 validation structural ............. SUCCESS [7.488s]
[INFO] Taverna Scufl 2 validation correctness ............ SUCCESS [12.120s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5:07.591s
[INFO] Finished at: Tue Jan 31 15:56:50 WET 2012
[INFO] Final Memory: 67M/176M
[INFO] ------------------------------------------------------------------------

...

The simplest way to use the SCUFL2 API is as Maven dependencies. See #Maven Maven above.

Typical use of the Scufl2 API will depend on the three modules scufl2-api, scufl2-t2flow and scufl2-rdfxml.

...

If you don't use Maven, you can alternatively copy and add the JARs from these modules to your classpath:

Note that version numbers and download links above might not be the latest, see #Release Release notes

JavaDocs

See the JavaDoc at:

...

titleOther modules

...

Javadocs

The SCUFL2 Javadocs document the core classes and functions of the SCUFL2 API. A good starting point is the package uk.org.taverna.scufl2.api.

If you are using Eclipse we recommend also using the m2e plugin for Maven support - which can , then the built-in Maven support (m2e plugin) is able to provide both JavaDocs and source code from within the editor. After adding the #Maven Maven dependencies for SCUFL2, try Open declaration or Open Type on a class like uk.org.taverna.scufl2.api.io.WorkflowBundleIO. (You can open the class with Navigate -> Open Type).

Examples

Examples of using the Scufl2 API are available as a separate Github project scufl2-examples. Also see If you don't use Git you can download the example project as a ZIP fie.

See the scufl2-validationusecases folder of the SCUFL2 API source code for examples of Workflow Bundle usage in other programming languages like Python or Ruby.

The best classes to start using would be uk.org.taverna.scufl2.api.io.WorkflowBundleIO and uk.org.taverna.scufl2.api.container.WorkflowBundle.

Example of converting .t2flow to .wfbundle:

Code Block
java
     import uk.org.taverna.scufl2.api.container.WorkflowBundle;
    import uk.org.taverna.scufl2.api.io.ReaderException;
    import uk.org.taverna.scufl2.api.io.WorkflowBundleIO;
    import uk.org.taverna.scufl2.api.io.WriterException;

    // ..

        WorkflowBundleIO io = new WorkflowBundleIO();
    File t2File = new File("workflow.t2flow");
    File scufl2File = new File("workflow.wfbundle");
    WorkflowBundle wfBundle = io.readBundle(t2File, "application/vnd.taverna.t2flow+xml");
    io.writeBundle(wfBundle, scufl2File, "application/vnd.taverna.scufl2.workflow-bundle");

Command line

The Github project scufl2-examples includes experimental SCUFL2 command line tools:

  • processornames - print list of processor names
  • servicetypes - print URIs of service types
  • t2flowtowfbundle - convert a Taverna 2 .t2flow to a SCUFL2 Workflow Bundle
  • jsonexport - show a simple JSON structure of workflow content

Other projects

These projects extend, use or relate to the SCUFL2 api: