From the story: http://www.mygrid.org.uk/dev/issues/browse/T2-9
Information on this page might be outdated as it was written before the release of Taverna 2.0.
Review current code
Activity serialization exists in Tools (in maelstrom-impl). XML generated looks like:
Dispatch layers are currently serialized to XML. To serialize the stack, we need iterate over each layer and wrap in a <dispatch stack/> element.
example XML for a layer is:
- Processors - DONE
- These essentially wrap a set of Activities and the Dispatch Stack
- Iteration Strategy - DONE
- Data links - DONE
- Merge type TokenProcessingEntity - DONE (identified by the datalink types)
- Processor and Dataflow are also TokenProcessingEntities
- See below....
- Ian has already done some of these as part of the prototyping: http://taverna.cvs.sourceforge.net/taverna/t2core/util/tools/src/main/java/net/sf/taverna/t2/util/tools/?pathrev=provenance-prototype
Some notes about things that might potentially go wrong .....
- The above example XML's where generated when running in non Raven mode, so do not generate details about the Raven artifact to use. This needs checking against running in Raven mode.
- Java XML allows arbitary code to be executed - so switched to using XStream - needs checking that it works with Raven runtime (i.e. the pom suitably declared its dependencies).
DataflowActivity has a Dataflow as an attribute of its internal configuration bean.
Rather than generate the <java>...</java> java.bean autogenerated XML for this configuration bean, it needs to be treated differently. It should add an element to indicate there is a dataflow, together with a URI like identifier, and then if add the serialized nested dataflow XML later in the overall XML document.
i.e. (very rough)
Content type and file extension
The official (but not yet IANA registered) content-type for Taverna 2 workflows is
application/vnd.taverna.t2flow+xml and the extension
.t2flow is used by Taverna 2.0.
The xmlns namespace is
The official XML schema has not yet been fully developed, but an observational draft has been started to describe the format. Note that as the final format has not been finalized this is also work in progress, and might not fully describe current workflows saved from Taverna 2.