You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@taverna.apache.org by re...@apache.org on 2015/03/23 17:38:28 UTC

[44/51] [partial] incubator-taverna-engine git commit:

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/WorkflowToDataflowMapper.java
----------------------------------------------------------------------
diff --git a/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/WorkflowToDataflowMapper.java b/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/WorkflowToDataflowMapper.java
deleted file mode 100644
index 1ffd5ca..0000000
--- a/taverna-execution-local/src/main/java/uk/org/taverna/platform/execution/impl/local/WorkflowToDataflowMapper.java
+++ /dev/null
@@ -1,527 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.execution.impl.local;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.IdentityHashMap;
-import java.util.List;
-import java.util.Map;
-
-import net.sf.taverna.t2.reference.ExternalReferenceSPI;
-import net.sf.taverna.t2.workflowmodel.Dataflow;
-import net.sf.taverna.t2.workflowmodel.DataflowInputPort;
-import net.sf.taverna.t2.workflowmodel.DataflowOutputPort;
-import net.sf.taverna.t2.workflowmodel.Datalink;
-import net.sf.taverna.t2.workflowmodel.EditException;
-import net.sf.taverna.t2.workflowmodel.Edits;
-import net.sf.taverna.t2.workflowmodel.EventForwardingOutputPort;
-import net.sf.taverna.t2.workflowmodel.EventHandlingInputPort;
-import net.sf.taverna.t2.workflowmodel.Merge;
-import net.sf.taverna.t2.workflowmodel.MergeInputPort;
-import net.sf.taverna.t2.workflowmodel.ProcessorInputPort;
-import net.sf.taverna.t2.workflowmodel.ProcessorOutputPort;
-import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityInputPort;
-import net.sf.taverna.t2.workflowmodel.processor.activity.ActivityOutputPort;
-import net.sf.taverna.t2.workflowmodel.processor.activity.NestedDataflow;
-import net.sf.taverna.t2.workflowmodel.processor.dispatch.DispatchLayer;
-import net.sf.taverna.t2.workflowmodel.processor.dispatch.DispatchStack;
-import net.sf.taverna.t2.workflowmodel.processor.iteration.IterationStrategy;
-import net.sf.taverna.t2.workflowmodel.processor.iteration.NamedInputPortNode;
-import org.apache.taverna.platform.capability.api.ActivityConfigurationException;
-import org.apache.taverna.platform.capability.api.ActivityNotFoundException;
-import org.apache.taverna.platform.capability.api.ActivityService;
-import org.apache.taverna.platform.capability.api.DispatchLayerConfigurationException;
-import org.apache.taverna.platform.capability.api.DispatchLayerNotFoundException;
-import org.apache.taverna.platform.capability.api.DispatchLayerService;
-import uk.org.taverna.platform.execution.api.InvalidWorkflowException;
-import org.apache.taverna.scufl2.api.activity.Activity;
-import org.apache.taverna.scufl2.api.common.Scufl2Tools;
-import org.apache.taverna.scufl2.api.configurations.Configuration;
-import org.apache.taverna.scufl2.api.container.WorkflowBundle;
-import org.apache.taverna.scufl2.api.core.BlockingControlLink;
-import org.apache.taverna.scufl2.api.core.ControlLink;
-import org.apache.taverna.scufl2.api.core.DataLink;
-import org.apache.taverna.scufl2.api.core.Processor;
-import org.apache.taverna.scufl2.api.core.Workflow;
-import org.apache.taverna.scufl2.api.iterationstrategy.CrossProduct;
-import org.apache.taverna.scufl2.api.iterationstrategy.DotProduct;
-import org.apache.taverna.scufl2.api.iterationstrategy.IterationStrategyNode;
-import org.apache.taverna.scufl2.api.iterationstrategy.IterationStrategyStack;
-import org.apache.taverna.scufl2.api.iterationstrategy.IterationStrategyTopNode;
-import org.apache.taverna.scufl2.api.iterationstrategy.PortNode;
-import org.apache.taverna.scufl2.api.port.InputActivityPort;
-import org.apache.taverna.scufl2.api.port.InputProcessorPort;
-import org.apache.taverna.scufl2.api.port.InputWorkflowPort;
-import org.apache.taverna.scufl2.api.port.OutputActivityPort;
-import org.apache.taverna.scufl2.api.port.OutputProcessorPort;
-import org.apache.taverna.scufl2.api.port.OutputWorkflowPort;
-import org.apache.taverna.scufl2.api.port.Port;
-import org.apache.taverna.scufl2.api.port.ReceiverPort;
-import org.apache.taverna.scufl2.api.port.SenderPort;
-import org.apache.taverna.scufl2.api.profiles.ProcessorBinding;
-import org.apache.taverna.scufl2.api.profiles.ProcessorInputPortBinding;
-import org.apache.taverna.scufl2.api.profiles.ProcessorOutputPortBinding;
-import org.apache.taverna.scufl2.api.profiles.Profile;
-
-import com.fasterxml.jackson.databind.JsonNode;
-
-/**
- * Translates a scufl2 {@link Workflow} into a {@link Dataflow}.
- * 
- * @author David Withers
- */
-public class WorkflowToDataflowMapper {
-	private static final URI NESTED_WORKFLOW_URI = URI
-			.create("http://ns.taverna.org.uk/2010/activity/nested-workflow");
-
-	private Edits edits;
-	private final Scufl2Tools scufl2Tools = new Scufl2Tools();
-	private final Map<Port, EventHandlingInputPort> inputPorts;
-	private final Map<Port, EventForwardingOutputPort> outputPorts;
-	private final Map<Port, Merge> merges;
-	private final Map<Workflow, Dataflow> workflowToDataflow;
-	private final Map<Dataflow, Workflow> dataflowToWorkflow;
-	private final Map<Processor, net.sf.taverna.t2.workflowmodel.Processor> workflowToDataflowProcessors;
-	private final Map<net.sf.taverna.t2.workflowmodel.Processor, Processor> dataflowToWorkflowProcessors;
-	private final Map<Activity, net.sf.taverna.t2.workflowmodel.processor.activity.Activity<?>> workflowToDataflowActivities;
-	private final Map<net.sf.taverna.t2.workflowmodel.processor.activity.Activity<?>, Activity> dataflowToWorkflowActivities;
-	@SuppressWarnings("unused")
-	private final WorkflowBundle workflowBundle;
-	private final Profile profile;
-	private final ActivityService activityService;
-	private final DispatchLayerService dispatchLayerService;
-
-	public WorkflowToDataflowMapper(WorkflowBundle workflowBundle,
-			Profile profile, Edits edits, ActivityService activityService,
-			DispatchLayerService dispatchLayerService) {
-		this.workflowBundle = workflowBundle;
-		this.profile = profile;
-		this.edits = edits;
-		this.activityService = activityService;
-		this.dispatchLayerService = dispatchLayerService;
-		inputPorts = new IdentityHashMap<>();
-		outputPorts = new IdentityHashMap<>();
-		merges = new IdentityHashMap<>();
-		workflowToDataflow = new IdentityHashMap<>();
-		dataflowToWorkflow = new HashMap<>();
-		workflowToDataflowProcessors = new IdentityHashMap<>();
-		dataflowToWorkflowProcessors = new HashMap<>();
-		workflowToDataflowActivities = new IdentityHashMap<>();
-		dataflowToWorkflowActivities = new HashMap<>();
-	}
-
-	public Workflow getWorkflow(Dataflow dataflow) {
-		return dataflowToWorkflow.get(dataflow);
-	}
-
-	public Dataflow getDataflow(Workflow workflow)
-			throws InvalidWorkflowException {
-		if (!workflowToDataflow.containsKey(workflow)) {
-			try {
-				Dataflow dataflow = createDataflow(workflow);
-				workflowToDataflow.put(workflow, dataflow);
-				dataflowToWorkflow.put(dataflow, workflow);
-			} catch (EditException | ActivityConfigurationException
-					| DispatchLayerConfigurationException
-					| ActivityNotFoundException
-					| DispatchLayerNotFoundException e) {
-				throw new InvalidWorkflowException(e);
-			}
-		}
-		return workflowToDataflow.get(workflow);
-	}
-
-	public Processor getWorkflowProcessor(
-			net.sf.taverna.t2.workflowmodel.Processor dataflowProcessor) {
-		return dataflowToWorkflowProcessors.get(dataflowProcessor);
-	}
-
-	public net.sf.taverna.t2.workflowmodel.Processor getDataflowProcessor(
-			Processor workflowProcessor) {
-		return workflowToDataflowProcessors.get(workflowProcessor);
-	}
-
-	public Activity getWorkflowActivity(
-			net.sf.taverna.t2.workflowmodel.processor.activity.Activity<?> dataflowActiviy) {
-		return dataflowToWorkflowActivities.get(dataflowActiviy);
-	}
-
-	public net.sf.taverna.t2.workflowmodel.processor.activity.Activity<?> getDataflowActivity(
-			Activity workflowActivity) {
-		return workflowToDataflowActivities.get(workflowActivity);
-	}
-
-	protected Dataflow createDataflow(Workflow workflow) throws EditException,
-			ActivityNotFoundException, ActivityConfigurationException,
-			InvalidWorkflowException, DispatchLayerNotFoundException,
-			DispatchLayerConfigurationException {
-		// create the dataflow
-		Dataflow dataflow = edits.createDataflow();
-		// set the dataflow name
-		edits.getUpdateDataflowNameEdit(dataflow, workflow.getName()).doEdit();
-
-		addInputPorts(workflow, dataflow);
-		addOutputPorts(workflow, dataflow);
-		addProcessors(workflow, dataflow);
-		addDataLinks(workflow, dataflow);
-		addControlLinks(workflow);
-
-		return dataflow;
-	}
-
-	private void addProcessors(Workflow workflow, Dataflow dataflow)
-			throws EditException, ActivityNotFoundException,
-			ActivityConfigurationException, InvalidWorkflowException,
-			DispatchLayerNotFoundException, DispatchLayerConfigurationException {
-		for (Processor processor : workflow.getProcessors()) {
-			net.sf.taverna.t2.workflowmodel.Processor dataflowProcessor = edits
-					.createProcessor(processor.getName());
-			edits.getAddProcessorEdit(dataflow, dataflowProcessor).doEdit();
-			// map the processor
-			workflowToDataflowProcessors.put(processor, dataflowProcessor);
-			dataflowToWorkflowProcessors.put(dataflowProcessor, processor);
-			// add input ports
-			for (InputProcessorPort inputProcessorPort : processor
-					.getInputPorts()) {
-				if (inputProcessorPort.getDatalinksTo().isEmpty())
-					continue;
-				ProcessorInputPort processorInputPort = edits
-						.createProcessorInputPort(dataflowProcessor,
-								inputProcessorPort.getName(),
-								inputProcessorPort.getDepth());
-				edits.getAddProcessorInputPortEdit(dataflowProcessor,
-						processorInputPort).doEdit();
-				inputPorts.put(inputProcessorPort, processorInputPort);
-			}
-			// add output ports
-			for (OutputProcessorPort outputProcessorPort : processor
-					.getOutputPorts()) {
-				ProcessorOutputPort processorOutputPort = edits
-						.createProcessorOutputPort(dataflowProcessor,
-								outputProcessorPort.getName(),
-								outputProcessorPort.getDepth(),
-								outputProcessorPort.getGranularDepth());
-				edits.getAddProcessorOutputPortEdit(dataflowProcessor,
-						processorOutputPort).doEdit();
-				outputPorts.put(outputProcessorPort, processorOutputPort);
-			}
-
-			// add dispatch stack
-			addDispatchStack(processor, dataflowProcessor);
-
-			addIterationStrategy(processor, dataflowProcessor);
-
-			// add bound activities
-			for (ProcessorBinding processorBinding : scufl2Tools
-					.processorBindingsForProcessor(processor, profile))
-				addActivity(processorBinding);
-		}
-	}
-
-	private void addDispatchStack(Processor processor,
-			net.sf.taverna.t2.workflowmodel.Processor dataflowProcessor)
-			throws DispatchLayerNotFoundException,
-			DispatchLayerConfigurationException, EditException {
-		DispatchStack dispatchStack = dataflowProcessor.getDispatchStack();
-
-		JsonNode json = null;
-		try {
-			json = processor.getConfiguration(profile).getJson();
-		} catch (IndexOutOfBoundsException e) {
-			// no configuration for processor
-		}
-
-		int layer = 0;
-		addDispatchLayer(
-				dispatchStack,
-				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/Parallelize"),
-				layer++, json == null ? null : json.get("parallelize"));
-		addDispatchLayer(
-				dispatchStack,
-				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/ErrorBounce"),
-				layer++, null);
-		addDispatchLayer(
-				dispatchStack,
-				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/Failover"),
-				layer++, null);
-		addDispatchLayer(
-				dispatchStack,
-				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/Retry"),
-				layer++, json == null ? null : json.get("retry"));
-		addDispatchLayer(
-				dispatchStack,
-				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/Stop"),
-				layer++, null);
-		addDispatchLayer(
-				dispatchStack,
-				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/Invoke"),
-				layer++, null);
-
-	}
-
-	private void addDispatchLayer(DispatchStack dispatchStack,
-			URI dispatchLayerType, int layer, JsonNode json)
-			throws DispatchLayerConfigurationException,
-			DispatchLayerNotFoundException, EditException {
-		// create the dispatch layer
-		DispatchLayer<?> dispatchLayer = dispatchLayerService
-				.createDispatchLayer(dispatchLayerType, json);
-		// add the dispatch layer to the dispatch layer stack
-		edits.getAddDispatchLayerEdit(dispatchStack, dispatchLayer, layer)
-				.doEdit();
-	}
-
-	private void addIterationStrategy(Processor processor,
-			net.sf.taverna.t2.workflowmodel.Processor dataflowProcessor)
-			throws EditException, InvalidWorkflowException {
-		// get the iteration strategy from the processor
-		net.sf.taverna.t2.workflowmodel.processor.iteration.IterationStrategyStack dataflowIterationStrategyStack = dataflowProcessor
-				.getIterationStrategy();
-		// clear the iteration strategy
-		edits.getClearIterationStrategyStackEdit(dataflowIterationStrategyStack)
-				.doEdit();
-		IterationStrategyStack iterationStrategyStack = processor
-				.getIterationStrategyStack();
-		for (IterationStrategyTopNode iterationStrategyTopNode : iterationStrategyStack) {
-			// create iteration strategy
-			IterationStrategy dataflowIterationStrategy = edits
-					.createIterationStrategy();
-			// add iteration strategy to the stack
-			edits.getAddIterationStrategyEdit(dataflowIterationStrategyStack,
-					dataflowIterationStrategy).doEdit();
-			// add the node to the iteration strategy
-			addIterationStrategyNode(dataflowIterationStrategy,
-					dataflowIterationStrategy.getTerminalNode(),
-					iterationStrategyTopNode);
-		}
-	}
-
-	private void addIterationStrategyNode(
-			IterationStrategy dataflowIterationStrategy,
-			net.sf.taverna.t2.workflowmodel.processor.iteration.IterationStrategyNode dataflowIterationStrategyNode,
-			IterationStrategyNode iterationStrategyNode) throws EditException,
-			InvalidWorkflowException {
-		net.sf.taverna.t2.workflowmodel.processor.iteration.IterationStrategyNode childDataflowIterationStrategyNode = null;
-		if (iterationStrategyNode instanceof CrossProduct) {
-			CrossProduct crossProduct = (CrossProduct) iterationStrategyNode;
-			childDataflowIterationStrategyNode = new net.sf.taverna.t2.workflowmodel.processor.iteration.CrossProduct();
-			for (IterationStrategyNode iterationStrategyNode2 : crossProduct)
-				addIterationStrategyNode(dataflowIterationStrategy,
-						childDataflowIterationStrategyNode,
-						iterationStrategyNode2);
-		} else if (iterationStrategyNode instanceof DotProduct) {
-			DotProduct dotProduct = (DotProduct) iterationStrategyNode;
-			childDataflowIterationStrategyNode = new net.sf.taverna.t2.workflowmodel.processor.iteration.DotProduct();
-			for (IterationStrategyNode iterationStrategyNode2 : dotProduct)
-				addIterationStrategyNode(dataflowIterationStrategy,
-						childDataflowIterationStrategyNode,
-						iterationStrategyNode2);
-		} else if (iterationStrategyNode instanceof PortNode) {
-			PortNode portNode = (PortNode) iterationStrategyNode;
-			Integer desiredDepth = portNode.getDesiredDepth();
-			if (desiredDepth == null)
-				desiredDepth = portNode.getInputProcessorPort().getDepth();
-			NamedInputPortNode namedInputPortNode = new NamedInputPortNode(
-					portNode.getInputProcessorPort().getName(), desiredDepth);
-			edits.getAddIterationStrategyInputNodeEdit(
-					dataflowIterationStrategy, namedInputPortNode).doEdit();
-			childDataflowIterationStrategyNode = namedInputPortNode;
-		} else {
-			throw new InvalidWorkflowException(
-					"Unknown IterationStrategyNode type : "
-							+ iterationStrategyNode.getClass().getName());
-		}
-		childDataflowIterationStrategyNode
-				.setParent(dataflowIterationStrategyNode);
-	}
-
-	private void addActivity(ProcessorBinding processorBinding)
-			throws EditException, ActivityNotFoundException,
-			ActivityConfigurationException, InvalidWorkflowException {
-		net.sf.taverna.t2.workflowmodel.Processor processor = workflowToDataflowProcessors
-				.get(processorBinding.getBoundProcessor());
-		Activity scufl2Activity = processorBinding.getBoundActivity();
-		URI activityType = scufl2Activity.getType();
-		if (!activityService.activityExists(activityType))
-			throw new ActivityNotFoundException("No activity exists for "
-					+ activityType);
-		Configuration configuration = scufl2Activity.getConfiguration();
-
-		// create the activity
-		net.sf.taverna.t2.workflowmodel.processor.activity.Activity<?> activity = activityService
-				.createActivity(activityType, configuration.getJson());
-		// check if we have a nested workflow
-		if (activityType.equals(NESTED_WORKFLOW_URI)) {
-			if (activity instanceof NestedDataflow) {
-				Workflow nestedWorkflow = scufl2Tools
-						.nestedWorkflowForProcessor(
-								processorBinding.getBoundProcessor(), profile);
-				((NestedDataflow) activity)
-						.setNestedDataflow(getDataflow(nestedWorkflow));
-			} else
-				throw new ActivityConfigurationException(
-						"Activity is not an instance of NestedDataflow");
-		}
-
-		// add the activity to the processor
-		edits.getAddActivityEdit(processor, activity).doEdit();
-
-		// add input ports
-		for (InputActivityPort inputActivityPort : scufl2Activity
-				.getInputPorts()) {
-			ActivityInputPort activityInputPort = edits
-					.createActivityInputPort(
-							inputActivityPort.getName(),
-							inputActivityPort.getDepth(),
-							false,
-							new ArrayList<Class<? extends ExternalReferenceSPI>>(),
-							String.class);
-			edits.getAddActivityInputPortEdit(activity, activityInputPort)
-					.doEdit();
-		}
-		// add output ports
-		for (OutputActivityPort outputActivityPort : scufl2Activity
-				.getOutputPorts()) {
-			ActivityOutputPort activitytOutputPort = edits
-					.createActivityOutputPort(outputActivityPort.getName(),
-							outputActivityPort.getDepth(),
-							outputActivityPort.getGranularDepth());
-			edits.getAddActivityOutputPortEdit(activity, activitytOutputPort)
-					.doEdit();
-		}
-		// map input ports
-		for (ProcessorInputPortBinding portBinding : processorBinding
-				.getInputPortBindings()) {
-			InputProcessorPort processorPort = portBinding
-					.getBoundProcessorPort();
-			InputActivityPort activityPort = portBinding.getBoundActivityPort();
-			edits.getAddActivityInputPortMappingEdit(activity,
-					processorPort.getName(), activityPort.getName()).doEdit();
-		}
-		// map output ports
-		for (ProcessorOutputPortBinding portBinding : processorBinding
-				.getOutputPortBindings()) {
-			OutputProcessorPort processorPort = portBinding
-					.getBoundProcessorPort();
-			OutputActivityPort activityPort = portBinding
-					.getBoundActivityPort();
-			edits.getAddActivityOutputPortMappingEdit(activity,
-					processorPort.getName(), activityPort.getName()).doEdit();
-		}
-		workflowToDataflowActivities.put(scufl2Activity, activity);
-		dataflowToWorkflowActivities.put(activity, scufl2Activity);
-	}
-
-	private void addDataLinks(Workflow workflow, Dataflow dataflow)
-			throws EditException {
-		for (DataLink dataLink : workflow.getDataLinks()) {
-			ReceiverPort receiverPort = dataLink.getSendsTo();
-			SenderPort senderPort = dataLink.getReceivesFrom();
-			EventForwardingOutputPort source = outputPorts.get(senderPort);
-			EventHandlingInputPort sink = inputPorts.get(receiverPort);
-			Integer mergePosition = dataLink.getMergePosition();
-			if (mergePosition != null) {
-				if (!merges.containsKey(receiverPort)) {
-					Merge merge = edits.createMerge(dataflow);
-					edits.getAddMergeEdit(dataflow, merge).doEdit();
-					merges.put(receiverPort, merge);
-				}
-				Merge merge = merges.get(receiverPort);
-				// create merge input port
-				MergeInputPort mergeInputPort = edits.createMergeInputPort(
-						merge, "input" + mergePosition, sink.getDepth());
-				// add it to the correct position in the merge
-				@SuppressWarnings("unchecked")
-				List<MergeInputPort> mergeInputPorts = (List<MergeInputPort>) merge
-						.getInputPorts();
-				if (mergePosition > mergeInputPorts.size())
-					mergeInputPorts.add(mergeInputPort);
-				else
-					mergeInputPorts.add(mergePosition, mergeInputPort);
-				// connect a datalink into the merge
-				Datalink datalinkIn = edits.createDatalink(source,
-						mergeInputPort);
-				edits.getConnectDatalinkEdit(datalinkIn).doEdit();
-				// check if the merge output has been connected
-				EventForwardingOutputPort mergeOutputPort = merge
-						.getOutputPort();
-				if (mergeOutputPort.getOutgoingLinks().isEmpty()) {
-					Datalink datalinkOut = edits.createDatalink(
-							merge.getOutputPort(), sink);
-					edits.getConnectDatalinkEdit(datalinkOut).doEdit();
-				} else if (mergeOutputPort.getOutgoingLinks().size() == 1) {
-					if (mergeOutputPort.getOutgoingLinks().iterator().next()
-							.getSink() != sink)
-						throw new EditException(
-								"Cannot add a different sinkPort to a Merge that already has one defined");
-				} else
-					throw new EditException(
-							"The merge instance cannot have more that 1 outgoing Datalink");
-			} else {
-				Datalink datalink = edits.createDatalink(source, sink);
-				edits.getConnectDatalinkEdit(datalink).doEdit();
-			}
-		}
-	}
-
-	private void addControlLinks(Workflow workflow) throws EditException {
-		for (ControlLink controlLink : workflow.getControlLinks()) {
-			if (controlLink instanceof BlockingControlLink) {
-				BlockingControlLink blockingControlLink = (BlockingControlLink) controlLink;
-				Processor untilFinished = blockingControlLink
-						.getUntilFinished();
-				Processor block = blockingControlLink.getBlock();
-				edits.getCreateConditionEdit(
-						workflowToDataflowProcessors.get(untilFinished),
-						workflowToDataflowProcessors.get(block)).doEdit();
-			}
-		}
-	}
-
-	private void addOutputPorts(Workflow workflow, Dataflow dataflow)
-			throws EditException {
-		for (OutputWorkflowPort outputWorkflowPort : workflow.getOutputPorts()) {
-			DataflowOutputPort dataflowOutputPort = edits
-					.createDataflowOutputPort(outputWorkflowPort.getName(),
-							dataflow);
-			edits.getAddDataflowOutputPortEdit(dataflow, dataflowOutputPort)
-					.doEdit();
-			inputPorts.put(outputWorkflowPort,
-					dataflowOutputPort.getInternalInputPort());
-		}
-	}
-
-	private void addInputPorts(Workflow workflow, Dataflow dataflow)
-			throws EditException {
-		for (InputWorkflowPort inputWorkflowPort : workflow.getInputPorts()) {
-			DataflowInputPort dataflowInputPort = edits
-					.createDataflowInputPort(inputWorkflowPort.getName(),
-							inputWorkflowPort.getDepth(),
-							inputWorkflowPort.getDepth(), dataflow);
-			edits.getAddDataflowInputPortEdit(dataflow, dataflowInputPort)
-					.doEdit();
-			outputPorts.put(inputWorkflowPort,
-					dataflowInputPort.getInternalOutputPort());
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-local/src/main/resources/META-INF/spring/execution-local-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-execution-local/src/main/resources/META-INF/spring/execution-local-context-osgi.xml b/taverna-execution-local/src/main/resources/META-INF/spring/execution-local-context-osgi.xml
index 21a07c4..9ed6854 100644
--- a/taverna-execution-local/src/main/resources/META-INF/spring/execution-local-context-osgi.xml
+++ b/taverna-execution-local/src/main/resources/META-INF/spring/execution-local-context-osgi.xml
@@ -16,8 +16,8 @@
 		</service-properties>
 	</service>
 
-	<reference id="workflowModelEdits" interface="net.sf.taverna.t2.workflowmodel.Edits" />
-	<reference id="activityService" interface="uk.org.taverna.platform.capability.api.ActivityService" />
-	<reference id="dispatchLayerService" interface="uk.org.taverna.platform.capability.api.DispatchLayerService" />
-	<reference id="referenceService" interface="net.sf.taverna.t2.reference.ReferenceService" />
+	<reference id="workflowModelEdits" interface="org.apache.taverna.workflowmodel.Edits" />
+	<reference id="activityService" interface="org.apache.taverna.platform.capability.api.ActivityService" />
+	<reference id="dispatchLayerService" interface="org.apache.taverna.platform.capability.api.DispatchLayerService" />
+	<reference id="referenceService" interface="org.apache.taverna.reference.ReferenceService" />
 </beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-local/src/main/resources/META-INF/spring/execution-local-context.xml
----------------------------------------------------------------------
diff --git a/taverna-execution-local/src/main/resources/META-INF/spring/execution-local-context.xml b/taverna-execution-local/src/main/resources/META-INF/spring/execution-local-context.xml
index bf9a146..4f4c660 100644
--- a/taverna-execution-local/src/main/resources/META-INF/spring/execution-local-context.xml
+++ b/taverna-execution-local/src/main/resources/META-INF/spring/execution-local-context.xml
@@ -3,7 +3,7 @@
 	xsi:schemaLocation="http://www.springframework.org/schema/beans
                            http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-	<bean id="localExecution" class="uk.org.taverna.platform.execution.impl.local.LocalExecutionService">
+	<bean id="localExecution" class="org.apache.taverna.platform.execution.impl.local.LocalExecutionService">
 		<property name="edits" ref="workflowModelEdits" />
 		<property name="activityService" ref="activityService" />
 		<property name="dispatchLayerService" ref="dispatchLayerService" />

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-local/src/test/java/org/apache/taverna/platform/execution/impl/local/LocalExecutionTest.java
----------------------------------------------------------------------
diff --git a/taverna-execution-local/src/test/java/org/apache/taverna/platform/execution/impl/local/LocalExecutionTest.java b/taverna-execution-local/src/test/java/org/apache/taverna/platform/execution/impl/local/LocalExecutionTest.java
new file mode 100644
index 0000000..207847d
--- /dev/null
+++ b/taverna-execution-local/src/test/java/org/apache/taverna/platform/execution/impl/local/LocalExecutionTest.java
@@ -0,0 +1,165 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.execution.impl.local;
+
+import java.util.Map;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+import org.apache.taverna.platform.report.WorkflowReport;
+
+/**
+ * 
+ * @author David Withers
+ */
+public class LocalExecutionTest {
+	
+	/**
+	 * Test method for {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#start()}.
+	 */
+	@Test
+	@Ignore
+	public void testStart() {
+		// fail("Not yet implemented");
+	}
+
+	/**
+	 * Test method for {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#pause()}.
+	 */
+	@Test
+	@Ignore
+	public void testPause() {
+		// fail("Not yet implemented");
+	}
+
+	/**
+	 * Test method for {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#resume()}.
+	 */
+	@Test
+	@Ignore
+	public void testResume() {
+		// fail("Not yet implemented");
+	}
+
+	/**
+	 * Test method for {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#cancel()}.
+	 */
+	@Test
+	@Ignore
+	public void testCancel() {
+		// fail("Not yet implemented");
+	}
+
+	/**
+	 * Test method for
+	 * {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#DataflowExecution(org.apache.taverna.scufl2.api.core.Workflow, java.util.Map, net.sf.taverna.t2.reference.ReferenceService)}
+	 * .
+	 * 
+	 * @throws Exception
+	 */
+	@Test
+	@Ignore
+	public void testDataflowExecution() throws Exception {
+		// URL wfResource = getClass().getResource("/t2flow/in-out.t2flow");
+		// assertNotNull(wfResource);
+		// TavernaResearchObject researchObject = new
+		// T2FlowParser().parseT2Flow(wfResource.openStream());
+		// Workflow workflow = researchObject.getMainWorkflow();
+		// Profile profile = researchObject.getProfiles().iterator().next();
+		//
+		// T2Reference reference = context.getReferenceService().register("test-input", 0, true,
+		// context);
+		// Map<String, T2Reference> inputs = new HashMap<String, T2Reference>();
+		// inputs.put("in", reference);
+		//
+		// DataflowExecution execution = new DataflowExecution(workflow, profile, inputs,
+		// context.getReferenceService());
+		// WorkflowReport report = execution.getWorkflowReport();
+		// assertEquals(State.CREATED, report.getState());
+		// execution.start();
+		//
+		// Map<String, Object> results = execution.getResults();
+		// waitForResult(results, "out", report);
+		//
+		// String result = (String) context.getReferenceService().renderIdentifier((T2Reference)
+		// results.get("out"), String.class, context);
+		// assertEquals("test-input", result);
+		// assertEquals(State.COMPLETED, report.getState());
+		// System.out.println(report);
+	}
+
+	// @Test
+	// // @Ignore
+	// public void testDataflowExecution2() throws Exception {
+	// URL wfResource = getClass().getResource("/t2flow/beanshell.t2flow");
+	// assertNotNull(wfResource);
+	// T2FlowParser t2FlowParser = new T2FlowParser();
+	// t2FlowParser.setStrict(true);
+	// WorkflowBundle researchObject = t2FlowParser.parseT2Flow(wfResource.openStream());
+	// Workflow workflow = researchObject.getMainWorkflow();
+	// Profile profile = researchObject.getProfiles().iterator().next();
+	//
+	// InvocationContext context = null;
+	// T2Reference reference = context.getReferenceService().register("test-input", 0, true,
+	// context);
+	// Map<String, T2Reference> inputs = new HashMap<String, T2Reference>();
+	// inputs.put("in", reference);
+	//
+	// LocalExecution execution = new LocalExecution(workflow, profile, inputs,
+	// context.getReferenceService(), new EditsImpl());
+	// WorkflowReport report = execution.getWorkflowReport();
+	// System.out.println(report);
+	// assertEquals(State.CREATED, report.getState());
+	// execution.start();
+	// System.out.println(report);
+	//
+	// Map<String, Object> results = execution.getResults();
+	// waitForResult(results, "out", report);
+	//
+	// List<String> result = (List<String>) context.getReferenceService().renderIdentifier(
+	// (T2Reference) results.get("out"), String.class, context);
+	// assertEquals(1000, result.size());
+	// assertEquals("test-input:0", result.get(0));
+	// assertEquals(State.COMPLETED, report.getState());
+	// System.out.println(report);
+	// }
+
+	@SuppressWarnings("unused")
+	private void waitForResult(Map<String, Object> results, String port, WorkflowReport report)
+			throws InterruptedException {
+		int wait = 0;
+		while (!results.containsKey(port) && wait++ < 10) {
+			System.out.println(report);
+			Thread.sleep(500);
+		}
+	}
+
+	/**
+	 * Test method for
+	 * {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#resultTokenProduced(net.sf.taverna.t2.invocation.WorkflowDataToken, java.lang.String)}
+	 * .
+	 */
+	@Test
+	public void testResultTokenProduced() {
+		// fail("Not yet implemented");
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-local/src/test/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionTest.java
----------------------------------------------------------------------
diff --git a/taverna-execution-local/src/test/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionTest.java b/taverna-execution-local/src/test/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionTest.java
deleted file mode 100644
index 80b4d65..0000000
--- a/taverna-execution-local/src/test/java/uk/org/taverna/platform/execution/impl/local/LocalExecutionTest.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2010 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.execution.impl.local;
-
-import java.util.Map;
-
-import org.junit.Ignore;
-import org.junit.Test;
-
-import uk.org.taverna.platform.report.WorkflowReport;
-
-/**
- * 
- * @author David Withers
- */
-public class LocalExecutionTest {
-	
-	/**
-	 * Test method for {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#start()}.
-	 */
-	@Test
-	@Ignore
-	public void testStart() {
-		// fail("Not yet implemented");
-	}
-
-	/**
-	 * Test method for {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#pause()}.
-	 */
-	@Test
-	@Ignore
-	public void testPause() {
-		// fail("Not yet implemented");
-	}
-
-	/**
-	 * Test method for {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#resume()}.
-	 */
-	@Test
-	@Ignore
-	public void testResume() {
-		// fail("Not yet implemented");
-	}
-
-	/**
-	 * Test method for {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#cancel()}.
-	 */
-	@Test
-	@Ignore
-	public void testCancel() {
-		// fail("Not yet implemented");
-	}
-
-	/**
-	 * Test method for
-	 * {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#DataflowExecution(org.apache.taverna.scufl2.api.core.Workflow, java.util.Map, net.sf.taverna.t2.reference.ReferenceService)}
-	 * .
-	 * 
-	 * @throws Exception
-	 */
-	@Test
-	@Ignore
-	public void testDataflowExecution() throws Exception {
-		// URL wfResource = getClass().getResource("/t2flow/in-out.t2flow");
-		// assertNotNull(wfResource);
-		// TavernaResearchObject researchObject = new
-		// T2FlowParser().parseT2Flow(wfResource.openStream());
-		// Workflow workflow = researchObject.getMainWorkflow();
-		// Profile profile = researchObject.getProfiles().iterator().next();
-		//
-		// T2Reference reference = context.getReferenceService().register("test-input", 0, true,
-		// context);
-		// Map<String, T2Reference> inputs = new HashMap<String, T2Reference>();
-		// inputs.put("in", reference);
-		//
-		// DataflowExecution execution = new DataflowExecution(workflow, profile, inputs,
-		// context.getReferenceService());
-		// WorkflowReport report = execution.getWorkflowReport();
-		// assertEquals(State.CREATED, report.getState());
-		// execution.start();
-		//
-		// Map<String, Object> results = execution.getResults();
-		// waitForResult(results, "out", report);
-		//
-		// String result = (String) context.getReferenceService().renderIdentifier((T2Reference)
-		// results.get("out"), String.class, context);
-		// assertEquals("test-input", result);
-		// assertEquals(State.COMPLETED, report.getState());
-		// System.out.println(report);
-	}
-
-	// @Test
-	// // @Ignore
-	// public void testDataflowExecution2() throws Exception {
-	// URL wfResource = getClass().getResource("/t2flow/beanshell.t2flow");
-	// assertNotNull(wfResource);
-	// T2FlowParser t2FlowParser = new T2FlowParser();
-	// t2FlowParser.setStrict(true);
-	// WorkflowBundle researchObject = t2FlowParser.parseT2Flow(wfResource.openStream());
-	// Workflow workflow = researchObject.getMainWorkflow();
-	// Profile profile = researchObject.getProfiles().iterator().next();
-	//
-	// InvocationContext context = null;
-	// T2Reference reference = context.getReferenceService().register("test-input", 0, true,
-	// context);
-	// Map<String, T2Reference> inputs = new HashMap<String, T2Reference>();
-	// inputs.put("in", reference);
-	//
-	// LocalExecution execution = new LocalExecution(workflow, profile, inputs,
-	// context.getReferenceService(), new EditsImpl());
-	// WorkflowReport report = execution.getWorkflowReport();
-	// System.out.println(report);
-	// assertEquals(State.CREATED, report.getState());
-	// execution.start();
-	// System.out.println(report);
-	//
-	// Map<String, Object> results = execution.getResults();
-	// waitForResult(results, "out", report);
-	//
-	// List<String> result = (List<String>) context.getReferenceService().renderIdentifier(
-	// (T2Reference) results.get("out"), String.class, context);
-	// assertEquals(1000, result.size());
-	// assertEquals("test-input:0", result.get(0));
-	// assertEquals(State.COMPLETED, report.getState());
-	// System.out.println(report);
-	// }
-
-	@SuppressWarnings("unused")
-	private void waitForResult(Map<String, Object> results, String port, WorkflowReport report)
-			throws InterruptedException {
-		int wait = 0;
-		while (!results.containsKey(port) && wait++ < 10) {
-			System.out.println(report);
-			Thread.sleep(500);
-		}
-	}
-
-	/**
-	 * Test method for
-	 * {@link uk.org.taverna.platform.execution.impl.local.LocalExecution#resultTokenProduced(net.sf.taverna.t2.invocation.WorkflowDataToken, java.lang.String)}
-	 * .
-	 */
-	@Test
-	public void testResultTokenProduced() {
-		// fail("Not yet implemented");
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-local/src/test/resources/t2flow/beanshell.t2flow
----------------------------------------------------------------------
diff --git a/taverna-execution-local/src/test/resources/t2flow/beanshell.t2flow b/taverna-execution-local/src/test/resources/t2flow/beanshell.t2flow
index 59fa307..e763771 100644
--- a/taverna-execution-local/src/test/resources/t2flow/beanshell.t2flow
+++ b/taverna-execution-local/src/test/resources/t2flow/beanshell.t2flow
@@ -5,7 +5,7 @@
   <localDependencies />
   <artifactDependencies />
   <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <org.apache.taverna.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
       <handledReferenceSchemes />
       <translatedElementType>java.lang.String</translatedElementType>
       <allowsLiteralValues>true</allowsLiteralValues>
@@ -14,24 +14,24 @@
       <mimeTypes>
         <string>text/plain</string>
       </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    </org.apache.taverna.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
   </inputs>
   <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+    <org.apache.taverna.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
       <granularDepth>0</granularDepth>
       <name>out</name>
       <depth>0</depth>
       <mimeTypes />
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+    </org.apache.taverna.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
   </outputs>
-</net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
+</org.apache.taverna.activities.beanshell.BeanshellActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>org.apache.taverna.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>org.apache.taverna.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><org.apache.taverna.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
   <maxJobs>1</maxJobs>
-</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="
 ">
+</org.apache.taverna.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>org.apache.taverna.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>org.apache.taverna.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>org.apache.taverna.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>org.apache.taverna.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>org.apache.taverna.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>org.apache.taverna.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><org.apache.taverna.workflowmodel.processor.dispatch.layers.RetryConfig
  xmlns="">
   <backoffFactor>1.0</backoffFactor>
   <initialDelay>1000</initialDelay>
   <maxDelay>5000</maxDelay>
   <maxRetries>0</maxRetries>
-</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="in" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor><processor><name>ListGenerator</name><inputPorts><port><name>in</name><depth>0</depth></port></inputPorts><outputPorts><port><name>out</name><depth>1</depth><granularDepth>1</granularDepth></port></outputPorts><annotations /><activities><activity><raven><group>net.sf.taverna.t2.activities</group><artifact>beanshell-activity</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.activities.beanshell.BeanshellActivity</class><inputMap><
 map from="in" to="in" /></inputMap><outputMap><map from="out" to="out" /></outputMap><configBean encoding="xstream"><net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean xmlns="">
+</org.apache.taverna.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>org.apache.taverna.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>org.apache.taverna.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="in" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor><processor><name>ListGenerator</name><inputPorts><port><name>in</name><depth>0</depth></port></inputPorts><outputPorts><port><name>out</name><depth>1</depth><granularDepth>1</granularDepth></port></outputPorts><annotations /><activities><activity><raven><group>org.apache.taverna.activities</group><artifact>beanshell-activity</artifact><version>1.2</version></raven><class>org.apache.taverna.activities.beanshell.BeanshellActivity</class><input
 Map><map from="in" to="in" /></inputMap><outputMap><map from="out" to="out" /></outputMap><configBean encoding="xstream"><org.apache.taverna.activities.beanshell.BeanshellActivityConfigurationBean xmlns="">
   <script>out = new ArrayList();
 
 for (int i = 0; i &lt; 1000; i++) {
@@ -42,7 +42,7 @@ for (int i = 0; i &lt; 1000; i++) {
   <localDependencies />
   <artifactDependencies />
   <inputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    <org.apache.taverna.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
       <handledReferenceSchemes />
       <translatedElementType>java.lang.String</translatedElementType>
       <allowsLiteralValues>true</allowsLiteralValues>
@@ -51,87 +51,87 @@ for (int i = 0; i &lt; 1000; i++) {
       <mimeTypes>
         <string>text/plain</string>
       </mimeTypes>
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
+    </org.apache.taverna.workflowmodel.processor.activity.config.ActivityInputPortDefinitionBean>
   </inputs>
   <outputs>
-    <net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+    <org.apache.taverna.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
       <granularDepth>1</granularDepth>
       <name>out</name>
       <depth>1</depth>
       <mimeTypes />
-    </net.sf.taverna.t2.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
+    </org.apache.taverna.workflowmodel.processor.activity.config.ActivityOutputPortDefinitionBean>
   </outputs>
-</net.sf.taverna.t2.activities.beanshell.BeanshellActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
+</org.apache.taverna.activities.beanshell.BeanshellActivityConfigurationBean></configBean><annotations /></activity></activities><dispatchStack><dispatchLayer><raven><group>org.apache.taverna.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>org.apache.taverna.workflowmodel.processor.dispatch.layers.Parallelize</class><configBean encoding="xstream"><org.apache.taverna.workflowmodel.processor.dispatch.layers.ParallelizeConfig xmlns="">
   <maxJobs>1</maxJobs>
-</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig xmlns="
 ">
+</org.apache.taverna.workflowmodel.processor.dispatch.layers.ParallelizeConfig></configBean></dispatchLayer><dispatchLayer><raven><group>org.apache.taverna.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>org.apache.taverna.workflowmodel.processor.dispatch.layers.ErrorBounce</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>org.apache.taverna.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>org.apache.taverna.workflowmodel.processor.dispatch.layers.Failover</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer><dispatchLayer><raven><group>org.apache.taverna.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>org.apache.taverna.workflowmodel.processor.dispatch.layers.Retry</class><configBean encoding="xstream"><org.apache.taverna.workflowmodel.processor.dispatch.layers.RetryConfig
  xmlns="">
   <backoffFactor>1.0</backoffFactor>
   <initialDelay>1000</initialDelay>
   <maxDelay>5000</maxDelay>
   <maxRetries>0</maxRetries>
-</net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>net.sf.taverna.t2.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>net.sf.taverna.t2.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="in" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor></processors><conditions /><datalinks><datalink><sink type="processor"><processor>Echo</processor><port>in</port></sink><source type="processor"><processor>ListGenerator</processor><port>out</port></source></datalink><datalink><sink type="processor"><processor>ListGenerator</processor><port>in</port></sink><source type="dataflow"><port>in</port></source></datalink><datalink><sink type="dataflow"><port>out</port></sink><source type="processor"><
 processor>Echo</processor><port>out</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.impl.AnnotationChainImpl xmlns="">
+</org.apache.taverna.workflowmodel.processor.dispatch.layers.RetryConfig></configBean></dispatchLayer><dispatchLayer><raven><group>org.apache.taverna.core</group><artifact>workflowmodel-impl</artifact><version>1.2</version></raven><class>org.apache.taverna.workflowmodel.processor.dispatch.layers.Invoke</class><configBean encoding="xstream"><null xmlns="" /></configBean></dispatchLayer></dispatchStack><iterationStrategyStack><iteration><strategy><cross><port name="in" depth="0" /></cross></strategy></iteration></iterationStrategyStack></processor></processors><conditions /><datalinks><datalink><sink type="processor"><processor>Echo</processor><port>in</port></sink><source type="processor"><processor>ListGenerator</processor><port>out</port></source></datalink><datalink><sink type="processor"><processor>ListGenerator</processor><port>in</port></sink><source type="dataflow"><port>in</port></source></datalink><datalink><sink type="dataflow"><port>out</port></sink><source type="processor
 "><processor>Echo</processor><port>out</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><org.apache.taverna.annotation.impl.AnnotationChainImpl xmlns="">
   <annotationAssertions>
-    <net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.impl.annotationbeans.IdentificationAssertion">
+    <org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
+      <annotationBean class="org.apache.taverna.annotation.impl.annotationbeans.IdentificationAssertion">
         <identification>13c70169-dfaa-4ea6-b6ab-3551dae7fa84</identification>
       </annotationBean>
       <date>2010-08-19 12:28:57.881 BST</date>
       <creators />
       <curationEventList />
-    </net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
+    </org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
   </annotationAssertions>
-</net.sf.taverna.t2.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.impl.AnnotationChainImpl xmlns="">
+</org.apache.taverna.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><org.apache.taverna.annotation.impl.AnnotationChainImpl xmlns="">
   <annotationAssertions>
-    <net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.impl.annotationbeans.IdentificationAssertion">
+    <org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
+      <annotationBean class="org.apache.taverna.annotation.impl.annotationbeans.IdentificationAssertion">
         <identification>7ef10e93-7376-41a9-9255-552149094142</identification>
       </annotationBean>
       <date>2010-08-31 13:06:57.536 BST</date>
       <creators />
       <curationEventList />
-    </net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
+    </org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
   </annotationAssertions>
-</net.sf.taverna.t2.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.impl.AnnotationChainImpl xmlns="">
+</org.apache.taverna.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><org.apache.taverna.annotation.impl.AnnotationChainImpl xmlns="">
   <annotationAssertions>
-    <net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.impl.annotationbeans.IdentificationAssertion">
+    <org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
+      <annotationBean class="org.apache.taverna.annotation.impl.annotationbeans.IdentificationAssertion">
         <identification>3b7c0b9c-572d-466b-af6d-0fb40699e8a5</identification>
       </annotationBean>
       <date>2010-08-31 12:50:40.306 BST</date>
       <creators />
       <curationEventList />
-    </net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
+    </org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
   </annotationAssertions>
-</net.sf.taverna.t2.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.impl.AnnotationChainImpl xmlns="">
+</org.apache.taverna.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><org.apache.taverna.annotation.impl.AnnotationChainImpl xmlns="">
   <annotationAssertions>
-    <net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.impl.annotationbeans.IdentificationAssertion">
+    <org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
+      <annotationBean class="org.apache.taverna.annotation.impl.annotationbeans.IdentificationAssertion">
         <identification>eb6a550d-f34e-4de9-b0fc-1b3df8ab36c4</identification>
       </annotationBean>
       <date>2010-08-31 14:32:44.634 BST</date>
       <creators />
       <curationEventList />
-    </net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
+    </org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
   </annotationAssertions>
-</net.sf.taverna.t2.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.impl.AnnotationChainImpl xmlns="">
+</org.apache.taverna.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><org.apache.taverna.annotation.impl.AnnotationChainImpl xmlns="">
   <annotationAssertions>
-    <net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.impl.annotationbeans.IdentificationAssertion">
+    <org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
+      <annotationBean class="org.apache.taverna.annotation.impl.annotationbeans.IdentificationAssertion">
         <identification>78cb1427-d57f-42c2-a385-1d20c1580f3b</identification>
       </annotationBean>
       <date>2010-08-31 14:36:00.297 BST</date>
       <creators />
       <curationEventList />
-    </net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
+    </org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
   </annotationAssertions>
-</net.sf.taverna.t2.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.impl.AnnotationChainImpl xmlns="">
+</org.apache.taverna.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><org.apache.taverna.annotation.impl.AnnotationChainImpl xmlns="">
   <annotationAssertions>
-    <net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.impl.annotationbeans.IdentificationAssertion">
+    <org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
+      <annotationBean class="org.apache.taverna.annotation.impl.annotationbeans.IdentificationAssertion">
         <identification>ad638364-a6e0-4852-abca-9f609c9553d2</identification>
       </annotationBean>
       <date>2010-08-19 13:43:43.797 BST</date>
       <creators />
       <curationEventList />
-    </net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
+    </org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
   </annotationAssertions>
-</net.sf.taverna.t2.annotation.impl.AnnotationChainImpl></annotation_chain_2_2></annotations></dataflow></workflow>
\ No newline at end of file
+</org.apache.taverna.annotation.impl.AnnotationChainImpl></annotation_chain_2_2></annotations></dataflow></workflow>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-local/src/test/resources/t2flow/in-out.t2flow
----------------------------------------------------------------------
diff --git a/taverna-execution-local/src/test/resources/t2flow/in-out.t2flow b/taverna-execution-local/src/test/resources/t2flow/in-out.t2flow
index 8901a8d..fdccdf9 100644
--- a/taverna-execution-local/src/test/resources/t2flow/in-out.t2flow
+++ b/taverna-execution-local/src/test/resources/t2flow/in-out.t2flow
@@ -1,23 +1,23 @@
-<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.3-SNAPSHOT-20100817"><dataflow id="ad638364-a6e0-4852-abca-9f609c9553d2" role="top"><name>Workflow13</name><inputPorts><port><name>in</name><depth>0</depth><granularDepth>0</granularDepth><annotations /></port></inputPorts><outputPorts><port><name>out</name><annotations /></port></outputPorts><processors /><conditions /><datalinks><datalink><sink type="dataflow"><port>out</port></sink><source type="dataflow"><port>in</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.impl.AnnotationChainImpl xmlns="">
+<workflow xmlns="http://taverna.sf.net/2008/xml/t2flow" version="1" producedBy="taverna-2.3-SNAPSHOT-20100817"><dataflow id="ad638364-a6e0-4852-abca-9f609c9553d2" role="top"><name>Workflow13</name><inputPorts><port><name>in</name><depth>0</depth><granularDepth>0</granularDepth><annotations /></port></inputPorts><outputPorts><port><name>out</name><annotations /></port></outputPorts><processors /><conditions /><datalinks><datalink><sink type="dataflow"><port>out</port></sink><source type="dataflow"><port>in</port></source></datalink></datalinks><annotations><annotation_chain_2_2 encoding="xstream"><org.apache.taverna.annotation.impl.AnnotationChainImpl xmlns="">
   <annotationAssertions>
-    <net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.impl.annotationbeans.IdentificationAssertion">
+    <org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
+      <annotationBean class="org.apache.taverna.annotation.impl.annotationbeans.IdentificationAssertion">
         <identification>13c70169-dfaa-4ea6-b6ab-3551dae7fa84</identification>
       </annotationBean>
       <date>2010-08-19 12:28:57.881 BST</date>
       <creators />
       <curationEventList />
-    </net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
+    </org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
   </annotationAssertions>
-</net.sf.taverna.t2.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><net.sf.taverna.t2.annotation.impl.AnnotationChainImpl xmlns="">
+</org.apache.taverna.annotation.impl.AnnotationChainImpl></annotation_chain_2_2><annotation_chain_2_2 encoding="xstream"><org.apache.taverna.annotation.impl.AnnotationChainImpl xmlns="">
   <annotationAssertions>
-    <net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
-      <annotationBean class="net.sf.taverna.t2.annotation.impl.annotationbeans.IdentificationAssertion">
+    <org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
+      <annotationBean class="org.apache.taverna.annotation.impl.annotationbeans.IdentificationAssertion">
         <identification>ad638364-a6e0-4852-abca-9f609c9553d2</identification>
       </annotationBean>
       <date>2010-08-19 13:43:43.797 BST</date>
       <creators />
       <curationEventList />
-    </net.sf.taverna.t2.annotation.impl.AnnotationAssertionImpl>
+    </org.apache.taverna.annotation.impl.AnnotationAssertionImpl>
   </annotationAssertions>
-</net.sf.taverna.t2.annotation.impl.AnnotationChainImpl></annotation_chain_2_2></annotations></dataflow></workflow>
\ No newline at end of file
+</org.apache.taverna.annotation.impl.AnnotationChainImpl></annotation_chain_2_2></annotations></dataflow></workflow>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-remote/src/main/java/org/apache/taverna/platform/execution/impl/remote/RemoteExecution.java
----------------------------------------------------------------------
diff --git a/taverna-execution-remote/src/main/java/org/apache/taverna/platform/execution/impl/remote/RemoteExecution.java b/taverna-execution-remote/src/main/java/org/apache/taverna/platform/execution/impl/remote/RemoteExecution.java
new file mode 100644
index 0000000..c40f87f
--- /dev/null
+++ b/taverna-execution-remote/src/main/java/org/apache/taverna/platform/execution/impl/remote/RemoteExecution.java
@@ -0,0 +1,95 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.execution.impl.remote;
+
+import org.apache.taverna.robundle.Bundle;
+
+import org.apache.taverna.platform.execution.api.AbstractExecution;
+import org.apache.taverna.platform.report.ActivityReport;
+import org.apache.taverna.platform.report.ProcessorReport;
+import org.apache.taverna.platform.report.WorkflowReport;
+import org.apache.taverna.scufl2.api.activity.Activity;
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+import org.apache.taverna.scufl2.api.core.Processor;
+import org.apache.taverna.scufl2.api.core.Workflow;
+import org.apache.taverna.scufl2.api.profiles.Profile;
+
+/**
+ * An {@link org.apache.taverna.platform.execution.api.Execution Execution} for executing a Taverna workflow on a Taverna Server.
+ *
+ * @author David Withers
+ */
+public class RemoteExecution extends AbstractExecution {
+
+	public RemoteExecution(WorkflowBundle workflowBundle, Workflow workflow, Profile profile,
+			Bundle inputs) {
+		super(workflowBundle, workflow, profile, inputs);
+		// TODO Auto-generated constructor stub
+	}
+
+	@Override
+	protected WorkflowReport createWorkflowReport(Workflow workflow) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	protected ProcessorReport createProcessorReport(Processor processor) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	protected ActivityReport createActivityReport(Activity activity) {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public void start() {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void pause() {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void resume() {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void cancel() {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public void delete() {
+		// TODO Auto-generated method stub
+
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-remote/src/main/java/org/apache/taverna/platform/execution/impl/remote/RemoteExecutionService.java
----------------------------------------------------------------------
diff --git a/taverna-execution-remote/src/main/java/org/apache/taverna/platform/execution/impl/remote/RemoteExecutionService.java b/taverna-execution-remote/src/main/java/org/apache/taverna/platform/execution/impl/remote/RemoteExecutionService.java
new file mode 100644
index 0000000..7e4f143
--- /dev/null
+++ b/taverna-execution-remote/src/main/java/org/apache/taverna/platform/execution/impl/remote/RemoteExecutionService.java
@@ -0,0 +1,59 @@
+/*
+* Licensed to the Apache Software Foundation (ASF) under one
+* or more contributor license agreements. See the NOTICE file
+* distributed with this work for additional information
+* regarding copyright ownership. The ASF licenses this file
+* to you under the Apache License, Version 2.0 (the
+* "License"); you may not use this file except in compliance
+* with the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing,
+* software distributed under the License is distributed on an
+* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+* KIND, either express or implied. See the License for the
+* specific language governing permissions and limitations
+* under the License.
+*/
+
+package org.apache.taverna.platform.execution.impl.remote;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.apache.taverna.robundle.Bundle;
+
+import org.apache.taverna.platform.execution.api.AbstractExecutionService;
+import org.apache.taverna.platform.execution.api.Execution;
+import org.apache.taverna.platform.execution.api.ExecutionEnvironment;
+import org.apache.taverna.platform.execution.api.InvalidWorkflowException;
+import org.apache.taverna.scufl2.api.container.WorkflowBundle;
+import org.apache.taverna.scufl2.api.core.Workflow;
+import org.apache.taverna.scufl2.api.profiles.Profile;
+
+/**
+ * Service for executing Taverna workflows on a Taverna Server.
+ *
+ * @author David Withers
+ */
+public class RemoteExecutionService extends AbstractExecutionService {
+
+	public RemoteExecutionService() {
+		super(RemoteExecutionService.class.getName(), "Taverna Remote Execution Service",
+				"Execution Service for executing Taverna workflows on a Taverna Server");
+	}
+
+	@Override
+	protected Execution createExecutionImpl(WorkflowBundle workflowBundle, Workflow workflow,
+			Profile profile, Bundle inputs)
+			throws InvalidWorkflowException {
+		return new RemoteExecution(workflowBundle, workflow, profile, inputs);
+	}
+
+	@Override
+	public Set<ExecutionEnvironment> getExecutionEnvironments() {
+		return Collections.<ExecutionEnvironment>emptySet();
+	}
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-remote/src/main/java/uk/org/taverna/platform/execution/impl/remote/RemoteExecution.java
----------------------------------------------------------------------
diff --git a/taverna-execution-remote/src/main/java/uk/org/taverna/platform/execution/impl/remote/RemoteExecution.java b/taverna-execution-remote/src/main/java/uk/org/taverna/platform/execution/impl/remote/RemoteExecution.java
deleted file mode 100644
index eb33287..0000000
--- a/taverna-execution-remote/src/main/java/uk/org/taverna/platform/execution/impl/remote/RemoteExecution.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2011 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.execution.impl.remote;
-
-import org.apache.taverna.robundle.Bundle;
-
-import uk.org.taverna.platform.execution.api.AbstractExecution;
-import uk.org.taverna.platform.report.ActivityReport;
-import uk.org.taverna.platform.report.ProcessorReport;
-import uk.org.taverna.platform.report.WorkflowReport;
-import org.apache.taverna.scufl2.api.activity.Activity;
-import org.apache.taverna.scufl2.api.container.WorkflowBundle;
-import org.apache.taverna.scufl2.api.core.Processor;
-import org.apache.taverna.scufl2.api.core.Workflow;
-import org.apache.taverna.scufl2.api.profiles.Profile;
-
-/**
- * An {@link uk.org.taverna.platform.execution.api.Execution Execution} for executing a Taverna workflow on a Taverna Server.
- *
- * @author David Withers
- */
-public class RemoteExecution extends AbstractExecution {
-
-	public RemoteExecution(WorkflowBundle workflowBundle, Workflow workflow, Profile profile,
-			Bundle inputs) {
-		super(workflowBundle, workflow, profile, inputs);
-		// TODO Auto-generated constructor stub
-	}
-
-	@Override
-	protected WorkflowReport createWorkflowReport(Workflow workflow) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	protected ProcessorReport createProcessorReport(Processor processor) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	protected ActivityReport createActivityReport(Activity activity) {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public void start() {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public void pause() {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public void resume() {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public void cancel() {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public void delete() {
-		// TODO Auto-generated method stub
-
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-remote/src/main/java/uk/org/taverna/platform/execution/impl/remote/RemoteExecutionService.java
----------------------------------------------------------------------
diff --git a/taverna-execution-remote/src/main/java/uk/org/taverna/platform/execution/impl/remote/RemoteExecutionService.java b/taverna-execution-remote/src/main/java/uk/org/taverna/platform/execution/impl/remote/RemoteExecutionService.java
deleted file mode 100644
index 3e4b030..0000000
--- a/taverna-execution-remote/src/main/java/uk/org/taverna/platform/execution/impl/remote/RemoteExecutionService.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2011 The University of Manchester
- *
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- *
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package uk.org.taverna.platform.execution.impl.remote;
-
-import java.util.Collections;
-import java.util.Set;
-
-import org.apache.taverna.robundle.Bundle;
-
-import uk.org.taverna.platform.execution.api.AbstractExecutionService;
-import uk.org.taverna.platform.execution.api.Execution;
-import uk.org.taverna.platform.execution.api.ExecutionEnvironment;
-import uk.org.taverna.platform.execution.api.InvalidWorkflowException;
-import org.apache.taverna.scufl2.api.container.WorkflowBundle;
-import org.apache.taverna.scufl2.api.core.Workflow;
-import org.apache.taverna.scufl2.api.profiles.Profile;
-
-/**
- * Service for executing Taverna workflows on a Taverna Server.
- *
- * @author David Withers
- */
-public class RemoteExecutionService extends AbstractExecutionService {
-
-	public RemoteExecutionService() {
-		super(RemoteExecutionService.class.getName(), "Taverna Remote Execution Service",
-				"Execution Service for executing Taverna workflows on a Taverna Server");
-	}
-
-	@Override
-	protected Execution createExecutionImpl(WorkflowBundle workflowBundle, Workflow workflow,
-			Profile profile, Bundle inputs)
-			throws InvalidWorkflowException {
-		return new RemoteExecution(workflowBundle, workflow, profile, inputs);
-	}
-
-	@Override
-	public Set<ExecutionEnvironment> getExecutionEnvironments() {
-		return Collections.<ExecutionEnvironment>emptySet();
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-remote/src/main/resources/META-INF/spring/execution-remote-context-osgi.xml
----------------------------------------------------------------------
diff --git a/taverna-execution-remote/src/main/resources/META-INF/spring/execution-remote-context-osgi.xml b/taverna-execution-remote/src/main/resources/META-INF/spring/execution-remote-context-osgi.xml
index 2bce13d..974e855 100644
--- a/taverna-execution-remote/src/main/resources/META-INF/spring/execution-remote-context-osgi.xml
+++ b/taverna-execution-remote/src/main/resources/META-INF/spring/execution-remote-context-osgi.xml
@@ -7,6 +7,6 @@
                                  http://www.springframework.org/schema/osgi 
                                  http://www.springframework.org/schema/osgi/spring-osgi.xsd">
 
-    <service ref="remoteExecution" interface="uk.org.taverna.platform.execution.api.ExecutionService" />
+    <service ref="remoteExecution" interface="org.apache.taverna.platform.execution.api.ExecutionService" />
       
 </beans:beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-execution-remote/src/main/resources/META-INF/spring/execution-remote-context.xml
----------------------------------------------------------------------
diff --git a/taverna-execution-remote/src/main/resources/META-INF/spring/execution-remote-context.xml b/taverna-execution-remote/src/main/resources/META-INF/spring/execution-remote-context.xml
index 70f9f9d..1fee78b 100644
--- a/taverna-execution-remote/src/main/resources/META-INF/spring/execution-remote-context.xml
+++ b/taverna-execution-remote/src/main/resources/META-INF/spring/execution-remote-context.xml
@@ -3,6 +3,6 @@
 	xsi:schemaLocation="http://www.springframework.org/schema/beans 
                            http://www.springframework.org/schema/beans/spring-beans.xsd">
 
-	<bean id="remoteExecution" class="uk.org.taverna.platform.execution.impl.remote.RemoteExecutionService" />
+	<bean id="remoteExecution" class="org.apache.taverna.platform.execution.impl.remote.RemoteExecutionService" />
 
 </beans>

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/MultiCaster.java
----------------------------------------------------------------------
diff --git a/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/MultiCaster.java b/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/MultiCaster.java
deleted file mode 100644
index d563e39..0000000
--- a/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/MultiCaster.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.lang.observer;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.log4j.Logger;
-
-/**
- * Send notifications to registered observers about changes to models
- * 
- * @author Ian Dunlop
- * @author Stian Soiland
- * 
- * @param <Message>
- */
-public class MultiCaster<Message> implements Observable<Message> {
-
-	private static Logger logger = Logger.getLogger(MultiCaster.class);
-
-	private Observable<Message> observable;
-
-	protected List<Observer<Message>> observers = new ArrayList<Observer<Message>>();
-
-	/**
-	 * Set the {@link #observable} ie. the class that changes are happening to
-	 * and it's Message for this {@link MultiCaster}
-	 * 
-	 * @param observable
-	 */
-	public MultiCaster(Observable<Message> observable) {
-		this.observable = observable;
-	}
-
-	/**
-	 * Tell all the registered observers about the change to the model
-	 * 
-	 * @param message
-	 */
-	@SuppressWarnings("unchecked")
-	public void notify(Message message) {
-		// Use a copy that can be iterated even if register/remove is called
-		for (Observer<Message> observer : getObservers()) {
-			try {
-				observer.notify(observable, message);
-			} catch (Exception ex) {
-				logger.warn("Could not notify " + observer, ex);
-			}
-		}
-	}
-
-	/**
-	 * Register an observer ie. someone who wants informed about changes
-	 */
-	public synchronized void addObserver(Observer<Message> observer) {
-		observers.add(observer);
-	}
-
-	/**
-	 * Remove the observer and no longer send out any notifications about it
-	 */
-	public synchronized void removeObserver(Observer<Message> observer) {
-		observers.remove(observer);
-	}
-
-	/**
-	 * A list of all the classes currently registered with this
-	 * {@link MultiCaster}
-	 */
-	public synchronized List<Observer<Message>> getObservers() {
-		return new ArrayList<Observer<Message>>(observers);
-	}
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/Observable.java
----------------------------------------------------------------------
diff --git a/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/Observable.java b/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/Observable.java
deleted file mode 100644
index 1fa7425..0000000
--- a/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/Observable.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.lang.observer;
-
-import java.util.List;
-
-/**
- * Implements this if you want to notify other classes about changes
- * 
- * @author Ian Dunlop
- * @author Stian Soiland
- * 
- * @param <Message>
- */
-public interface Observable<Message> {
-	/**
-	 * Register an {@link Observer}
-	 * 
-	 * @param observer
-	 *            the class who wants notified of changes
-	 */
-	public void addObserver(Observer<Message> observer);
-
-	/**
-	 * Remove a class who is currently observing
-	 * 
-	 * @param observer
-	 *            the class who no longer wants notified
-	 */
-	public void removeObserver(Observer<Message> observer);
-
-	/**
-	 * A list of all the currently registered {@link Observer}s
-	 * 
-	 * @return
-	 */
-	public List<Observer<Message>> getObservers();
-}

http://git-wip-us.apache.org/repos/asf/incubator-taverna-engine/blob/5f1ddb71/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/Observer.java
----------------------------------------------------------------------
diff --git a/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/Observer.java b/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/Observer.java
deleted file mode 100644
index 81b7c85..0000000
--- a/taverna-observer/src/main/java/net/sf/taverna/t2/lang/observer/Observer.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*******************************************************************************
- * Copyright (C) 2007 The University of Manchester   
- * 
- *  Modifications to the initial code base are copyright of their
- *  respective authors, or their employers as appropriate.
- * 
- *  This program is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public License
- *  as published by the Free Software Foundation; either version 2.1 of
- *  the License, or (at your option) any later version.
- *    
- *  This program is distributed in the hope that it will be useful, but
- *  WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *    
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- ******************************************************************************/
-package net.sf.taverna.t2.lang.observer;
-
-/**
- * Implement if you want to register with an {@link Observable}
- * 
- * @author Ian Dunlop
- * @author Stian Soiland
- * 
- * @param <Message>
- */
-public interface Observer<Message> {
-	/**
-	 * Called by the {@link Observable} to notify the implementing class of
-	 * changes
-	 * 
-	 * @param sender
-	 *            the class where the changes have happened
-	 * @param message
-	 *            what has changed
-	 * @throws Exception
-	 */
-	public void notify(Observable<Message> sender, Message message)
-			throws Exception;
-}