Skip to end of metadata
Go to start of metadata

This is part of the Activity Plugin Migration Guide

Summary of changes

Taverna 2Taverna 3Changes
java files

Activity interface parameterized with JsonNode instead of ExampleActivityConfigBean

Port configuration moves to ExampleActivityFactory

Added new class

ExampleActivityHealthChecker.javaExampleActivityHealthChecker.javaUses JsonNode instead of ExampleActivityConfigBean
resource files


-META-INF/spring/context-osgi.xmlAdded OSGi service registration
-META-INF/spring/context.xmlAdded OSGi service instantiation
-schema.jsonActivity configuration JSON schema
project files

Updates to dependency versions

Add jackson dependency (for JSON support)

  1. Change version of reference-api dependency to 2.0.1-SNAPSHOT
  2. Change version of workflowmodel-api dendency to 2.0.1-SNAPSHOT
  3. Add dependency for jackson-databind

  4. Update any test dependencies, such as:
    1. activity-test-utils to 2.0.1-SNAPSHOT
    2. workflowmodel-impl to 2.0.1-SNAPSHOT
  5. Add maven-bundle-plugin plugin (unless already added to parent pom) 

  6. Change packaging type to bundle 


The JSON schema file specifies the configuration properties required by the activity.

  1. Add schema.json file to the project resources directory


  2. Add a property entry for each of the properties in the ExampleActivityConfigBean class

An ActivityFactory is a new interface for Taverna 3 that is used by the Taverna Platform to create instances of activities.

  1. Add new class ExampleActivityFactory 


  2. Move any port creation code from ExampleActivity to ExampleActivityFactory. Note that port creation code is split into separate methods for inputs and outputs.
  1. Change ExampleActivity class in use JsonNode as super type parameter

  2. Update configure method and remove any port configuration code (which should have been moved to ExampleActivityFactory).

  3. Update code to read configuration properties form JsonNode.
  1. Update code to read configuration properties form JsonNode.
  1. Create the Spring DM context-osgi.xml file. This is where services (created in the context.xml file) are registered with the OSGi service register and also where references to services exported by other modules are created.

  2. Add services to be exported by this module.

  3. Add references to services required by this module.

  1. Create the Spring context.xml file. This is where services are instantiated and any services required from other modules are injected as properties.

  2. Create the services that will be registered with the OSGi service register in the context-osgi.xml file.

The config bean has been replaced by JSON configuration and is no longer used.

  1. Delete this file.

The SPI configurations have been replaced by the Spring configurations.

  1. Delete this directory