[maven-release-plugin]  copy for tag 0.14.0
[maven-release-plugin] prepare release 0.14.0
10 files changed
tree: 7427f91751f3aee37e33b1dabba2e5709829e577
  1. .gitignore
  2. LICENSE.txt
  3. README.md
  4. pom.xml
  5. scufl2-api/
  6. scufl2-integration-tests/
  7. scufl2-rdf/
  8. scufl2-rdfxml/
  9. scufl2-scufl/
  10. scufl2-t2flow/
  11. scufl2-ucfpackage/
  12. scufl2-usecases/
  13. scufl2-validation-correctness/
  14. scufl2-validation-integration/
  15. scufl2-validation-structural/
  16. scufl2-validation/
README.md

SCUFL2

See also the SCUFL2 wiki

(c) 2009-2014 University of Manchester, UK

Licensed under the GNU Lesser General Public License (LGPL) 2.1. See LICENSE.txt for the full terms of LGPL 2.1.

This is the API, model and format of SCUFL2, which replaces Taverna's workflow format .t2flow. This API allows JVM applications to inspect, generate and modify Taverna workflow definitions without depending on the Taverna runtime.

A new format, called Scufl2 Workflow Bundle is defined alongside this API. This format can be inspected, generated and modified independently of this API.

Note that the ability for Scufl2 API to read a workflow bundle (using the scufl2-rdfxml module) does not guarantee it is valid or structurally sound. The experimental modules scufl2-validation-* will in the future be able to provide such verification.

For more information, see the SCUFL2 API pages, the Javadoc and the SCUFL2 examples.

Requisites

  • Java 1.6 or newer (tested with Java 1.7)
  • Maven 2.2.2 or newer (for building, tested with Maven 3.0.5)

Building

  • mvn clean install

This will build each module and run their tests, producing JARs like scufl2-api/target/scufl2-api-0.14.0.jar.

First time you build Scufl2 this might download dependencies needed for compliation. These have separate open source licenses, but should be compatible with LGPL. None of the dependencies are neccessary for using the compiled SCUFL2 API.

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

Usage

Scufl2 is built as a Maven project, and the easiest way to use it is from other Maven projects.

Typical users of the Scufl2 API will depend on the three modules scufl2-api, scufl2-t2flow and scufl2-rdfxml. In your Maven project's POM file, add this to your <dependencies> section:

	<dependency>
		<groupId>uk.org.taverna.scufl2</groupId>
		<artifactId>scufl2-api</artifactId>
		<version>0.14.0</version>
	</dependency>
	<dependency>
		<groupId>uk.org.taverna.scufl2</groupId>
		<artifactId>scufl2-rdfxml</artifactId>
		<version>0.14.0</version>
	</dependency>
	<dependency>
		<groupId>uk.org.taverna.scufl2</groupId>
		<artifactId>scufl2-t2flow</artifactId>
		<version>0.14.0</version>
	</dependency>

All Scufl2 modules are also valid OSGi bundles, see the OSGi section below.

You can alternatively copy and add the JARs from these modules to your classpath:

  • scufl2-api/target/scufl2-api-0.14.0.jar
  • scufl2-rdfxml/target/scufl2-rdfxml-0.14.0.jar
  • scufl2-t2flow/target/scufl2-t2flow-0.14.0.jar

See the scufl2-validation folder for examples of usage. The best classes to start exploring would be uk.org.taverna.scufl2.api.io.WorkflowBundleIO and uk.org.taverna.scufl2.api.container.WorkflowBundle.

Example of converting .t2flow to .wfbundle:

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");

Check out the GitHub project scufl2-examples8 for examples of using Scufl2, including the above code.

Supported file formats with WorkflowBundleIO and their required modules:

OSGi services

To use SCUFL2 from OSGi, use the following OSGi Services. Example, from META-INF/spring/run-context.osgi.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/osgi"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns:beans="http://www.springframework.org/schema/beans"
            xsi:schemaLocation="http://www.springframework.org/schema/beans
                                http://www.springframework.org/schema/beans/spring-beans.xsd
                                http://www.springframework.org/schema/osgi
                                http://www.springframework.org/schema/osgi/spring-osgi.xsd">

    <service ref="myService" interface="com.example.MyService"/>

    <reference id="workflowBundleIO" interface="uk.org.taverna.scufl2.api.io.WorkflowBundleIO" />

</beans:beans>

And in run-context.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans.xsd">

    <bean id="myService" class="com.example.impl.MyServiceImpl" >
            <property name="workflowBundleIO" ref="workflowBundleIO"/>
    </bean>

</beans>

This will provide a WorkflowBundleIO instance with its readers and writers loaded through OSGi, which when the bundles for scufl2-t2flow and scufl2-rdfxml are loaded, would include support for the Taverna 2 t2flow format and the Taverna 3 wfbundle format.

Note that you do not need to use OSGi services to instantiate Scufl2Tools or URITools, but may do so if you wish.

Modules

Official modules:

  • scufl2-api Java Beans for working with SCUFL2
  • scufl2-t2flow .t2flow import from Taverna 2
  • scufl2-rdfxml .wfbundle import/export (RDF/XML)

Experimental modules:

  • scufl2-usecases Example code covering SCUFL2 use cases (out of date)
  • 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