Index: /trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs
===================================================================
--- /trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 2063)
+++ /trunk/sources/HeuristicLab.CEDMA.Server/3.3/GridExecuter.cs	(revision 2064)
@@ -71,5 +71,8 @@
             if (algorithm != null) {
               AtomicOperation op = new AtomicOperation(algorithm.Engine.OperatorGraph.InitialOperator, algorithm.Engine.GlobalScope);
-              AsyncGridResult asyncResult = jobManager.BeginExecuteEngine(new ProcessingEngine(algorithm.Engine.GlobalScope, op));
+              ProcessingEngine procEngine = new ProcessingEngine(algorithm.Engine.GlobalScope, op);
+              procEngine.OperatorGraph.AddOperator(algorithm.Engine.OperatorGraph.InitialOperator);
+              procEngine.OperatorGraph.InitialOperator = algorithm.Engine.OperatorGraph.InitialOperator;
+              AsyncGridResult asyncResult = jobManager.BeginExecuteEngine(procEngine);
               asyncResults.Add(asyncResult.WaitHandle, asyncResult);
               lock (activeAlgorithms) {
Index: /trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HeuristicLab.Grid.HiveBridge-3.2.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HeuristicLab.Grid.HiveBridge-3.2.csproj	(revision 2063)
+++ /trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HeuristicLab.Grid.HiveBridge-3.2.csproj	(revision 2064)
@@ -69,4 +69,5 @@
     <Compile Include="HiveGridServerWrapper.cs" />
     <Compile Include="HeuristicLabGridHiveBridgePlugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="ServiceLocator.cs" />
   </ItemGroup>
@@ -87,4 +88,8 @@
       <Project>{134F93D7-E7C8-4ECD-9923-7F63259A60D8}</Project>
       <Name>HeuristicLab.Hive.Contracts-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Hive.Engine\3.2\HeuristicLab.Hive.Engine-3.2.csproj">
+      <Project>{C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}</Project>
+      <Name>HeuristicLab.Hive.Engine-3.2</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Hive.JobBase\3.2\HeuristicLab.Hive.JobBase-3.2.csproj">
Index: /trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HeuristicLabGridHiveBridgePlugin.cs
===================================================================
--- /trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HeuristicLabGridHiveBridgePlugin.cs	(revision 2063)
+++ /trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HeuristicLabGridHiveBridgePlugin.cs	(revision 2064)
@@ -32,4 +32,5 @@
   [Dependency(Dependency = "HeuristicLab.Hive.Contracts-3.2")]
   [Dependency(Dependency = "HeuristicLab.Hive.JobBase-3.2")]
+  [Dependency(Dependency = "HeuristicLab.Hive.Engine-3.2")]
   public class HeuristicLabGridPlugin : PluginBase {
   }
Index: /trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HiveGridServerWrapper.cs
===================================================================
--- /trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HiveGridServerWrapper.cs	(revision 2063)
+++ /trunk/sources/HeuristicLab.Grid.HiveBridge/3.2/HiveGridServerWrapper.cs	(revision 2064)
@@ -65,6 +65,16 @@
       ResponseObject<JobResult> response = executionEngineFacade.GetLastResult(guid, false);
       if (response.Success && response.Obj != null) {
-        Job restoredJob = (Job)PersistenceManager.RestoreFromGZip(response.Obj.Result);
-        return restoredJob.SerializedJob;
+        HeuristicLab.Hive.Engine.Job restoredJob = (HeuristicLab.Hive.Engine.Job)PersistenceManager.RestoreFromGZip(response.Obj.Result);
+        // Serialize the engine
+        MemoryStream memStream = new MemoryStream();
+        GZipStream stream = new GZipStream(memStream, CompressionMode.Compress, true);
+        XmlDocument document = PersistenceManager.CreateXmlDocument();
+        Dictionary<Guid, IStorable> dictionary = new Dictionary<Guid, IStorable>();
+        XmlNode rootNode = document.CreateElement("Root");
+        document.AppendChild(rootNode);
+        rootNode.AppendChild(PersistenceManager.Persist(restoredJob.Engine, document, dictionary));
+        document.Save(stream);
+        stream.Close();
+        return memStream.ToArray();
       } else return null;
     }
@@ -73,6 +83,32 @@
       HeuristicLab.Hive.Contracts.BusinessObjects.Job jobObj = new HeuristicLab.Hive.Contracts.BusinessObjects.Job();
 
+      List<HivePluginInfo> requiredPlugins = new List<HivePluginInfo>();
+      IEngine engine = RestoreEngine(serializedEngine, requiredPlugins);
+
+      HeuristicLab.Hive.Engine.Job job = new HeuristicLab.Hive.Engine.Job();
+      job.Engine.OperatorGraph.AddOperator(engine.OperatorGraph.InitialOperator);
+      job.Engine.OperatorGraph.InitialOperator = engine.OperatorGraph.InitialOperator;
+
+      // Serialize the job
+      MemoryStream memStream = new MemoryStream();
+      GZipStream stream = new GZipStream(memStream, CompressionMode.Compress, true);
+      XmlDocument document = PersistenceManager.CreateXmlDocument();
+      Dictionary<Guid, IStorable> dictionary = new Dictionary<Guid, IStorable>();
+      XmlNode rootNode = document.CreateElement("Root");
+      document.AppendChild(rootNode);
+      rootNode.AppendChild(PersistenceManager.Persist(job, document, dictionary));
+      document.Save(stream);
+      stream.Close();
+
+      jobObj.SerializedJob = memStream.ToArray();
+      jobObj.CoresNeeded = 1;
+      jobObj.PluginsNeeded = requiredPlugins;
+      jobObj.State = HeuristicLab.Hive.Contracts.BusinessObjects.State.offline;
+      return jobObj;
+    }
+
+    private IEngine RestoreEngine(byte[] serializedEngine, List<HivePluginInfo> requiredPlugins) {
       // unzip and restore to determine the list of required plugins (NB: inefficient!)
-      MemoryStream memStream = new MemoryStream();
+      MemoryStream memStream = new MemoryStream(serializedEngine);
       GZipStream stream = new GZipStream(memStream, CompressionMode.Decompress, true);
       XmlDocument document = new XmlDocument();
@@ -80,6 +116,6 @@
 
       Dictionary<Guid, IStorable> dictionary = new Dictionary<Guid, IStorable>();
-      XmlNode rootNode = document.ChildNodes[0].ChildNodes[0];
-      PersistenceManager.Restore(rootNode, dictionary);
+      XmlNode rootNode = document.ChildNodes[1].ChildNodes[0];
+      IEngine engine = (IEngine)PersistenceManager.Restore(rootNode, dictionary);
       stream.Close();
 
@@ -97,6 +133,4 @@
       }
 
-      List<HivePluginInfo> pluginsNeeded =
-        new List<HivePluginInfo>();
       foreach (PluginInfo uniquePlugin in plugins) {
         HivePluginInfo pluginInfo =
@@ -105,12 +139,7 @@
         pluginInfo.Version = uniquePlugin.Version.ToString();
         pluginInfo.BuildDate = uniquePlugin.BuildDate;
-        pluginsNeeded.Add(pluginInfo);
+        requiredPlugins.Add(pluginInfo);
       }
-
-      jobObj.SerializedJob = serializedEngine;
-      jobObj.CoresNeeded = 1;
-      jobObj.PluginsNeeded = pluginsNeeded;
-      jobObj.State = HeuristicLab.Hive.Contracts.BusinessObjects.State.offline;
-      return jobObj;
+      return engine;
     }
   }
