Index: branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj
===================================================================
--- branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj	(revision 4598)
+++ branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj	(revision 4615)
@@ -80,5 +80,7 @@
   </ItemGroup>
   <ItemGroup>
-    <None Include="app.config" />
+    <None Include="app.config">
+      <SubType>Designer</SubType>
+    </None>
     <None Include="HiveDataContext.dbml">
       <Generator>MSLinqToSQLGenerator</Generator>
Index: branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDao.cs
===================================================================
--- branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDao.cs	(revision 4598)
+++ branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDao.cs	(revision 4615)
@@ -7,4 +7,5 @@
 namespace HeuristicLab.Services.Hive.DataAccess {
   using DT = HeuristicLab.Services.Hive.Common.DataTransfer;
+  using HeuristicLab.Services.Hive.Common.DataTransfer;
 
   public class HiveDao : IHiveDao {
@@ -43,4 +44,19 @@
       if (entity != null) db.Jobs.DeleteOnSubmit(entity);
       db.SubmitChanges();
+    }
+
+    public IEnumerable<DT.Job> GetAvailableParentJobs(Guid slaveId) {
+      // todo: slaveId is unused!
+      var query = from ar in db.AssignedResources
+                  where ar.Job.JobState == JobState.WaitForChildJobs &&
+                    (from child in db.Jobs
+                     where child.ParentJobId == ar.Job.JobId
+                     select child.JobState == JobState.Finished).All(x => x) &&
+                    (from child in db.Jobs // avoid returning WaitForChildJobs jobs where no child-jobs exist (yet)
+                     where child.ParentJobId == ar.Job.JobId
+                     select child).Count() > 0
+                  orderby ar.Job.Priority descending
+                  select Convert.ToDto(ar.Job);
+      return query.ToArray();
     }
     #endregion
Index: branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
===================================================================
--- branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml	(revision 4598)
+++ branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml	(revision 4615)
@@ -41,5 +41,5 @@
       <Column Name="Version" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" />
       <Column Name="BuildDate" Type="System.String" DbType="VarChar(20)" CanBeNull="false" />
-      <Association Name="PluginInfo_RequiredPlugin" Member="RequiredPlugins" ThisKey="PluginId" OtherKey="PluginId" Type="RequiredPlugin" />
+      <Association Name="Plugin_RequiredPlugin" Member="RequiredPlugins" ThisKey="PluginId" OtherKey="PluginId" Type="RequiredPlugin" />
       <Association Name="Plugin_PluginData" Member="PluginData" ThisKey="PluginId" OtherKey="PluginId" Type="PluginData" Cardinality="One" />
     </Type>
@@ -57,5 +57,5 @@
       <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
       <Column Name="PluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
-      <Association Name="PluginInfo_RequiredPlugin" Member="Plugin" Storage="_PluginInfo" ThisKey="PluginId" OtherKey="PluginId" Type="Plugin" IsForeignKey="true" DeleteRule="CASCADE" />
+      <Association Name="Plugin_RequiredPlugin" Member="Plugin" Storage="_PluginInfo" ThisKey="PluginId" OtherKey="PluginId" Type="Plugin" IsForeignKey="true" DeleteRule="CASCADE" />
       <Association Name="Job_RequiredPlugin" Member="Job" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />
     </Type>
@@ -82,5 +82,5 @@
         <Column Name="IsAllowedToCalculate" Type="System.Boolean" DbType="Bit" CanBeNull="false" />
         <Association Name="Slave_UptimeStatistic" Member="UptimeStatistics" ThisKey="ResourceId" OtherKey="ResourceId" Type="UptimeStatistic" />
-        <Association Name="Slave_Job" Member="Jobs" ThisKey="ResourceId" OtherKey="ResourceId" Type="Job" />
+        <Association Name="Slave_Job" Member="Jobs" ThisKey="ResourceId" OtherKey="SlaveId" Type="Job" />
         <Association Name="SlaveConfig_Slave" Member="SlaveConfig" ThisKey="SlaveConfigId" OtherKey="SlaveConfigId" Type="SlaveConfig" IsForeignKey="true" DeleteRule="SET NULL" />
       </Type>
@@ -94,6 +94,6 @@
       <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />
       <Column Name="ParentJobId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
-      <Column Name="JobState" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" />
-      <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
+      <Column Name="JobState" Type="global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState" DbType="VarChar(15)" CanBeNull="false" />
+      <Column Name="ResourceId" Member="SlaveId" Storage="_ResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="true" />
       <Column Name="ExecutionTime" Type="System.TimeSpan" DbType="Time" CanBeNull="true" />
       <Column Name="Exception" Type="System.String" DbType="VarChar(MAX)" CanBeNull="true" />
@@ -112,5 +112,5 @@
       <Association Name="Job_Job" Member="Job1" ThisKey="ParentJobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />
       <Association Name="Project_Job" Member="Project" ThisKey="ProjectId" OtherKey="ProjectId" Type="Project" IsForeignKey="true" DeleteRule="SET NULL" />
-      <Association Name="Slave_Job" Member="Slave" ThisKey="ResourceId" OtherKey="ResourceId" Type="Slave" IsForeignKey="true" DeleteRule="SET NULL" />
+      <Association Name="Slave_Job" Member="Slave" ThisKey="SlaveId" OtherKey="ResourceId" Type="Slave" IsForeignKey="true" DeleteRule="SET NULL" />
     </Type>
   </Table>
@@ -141,5 +141,5 @@
     <Type Name="JobData">
       <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
-      <Column Member="Data" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="false" UpdateCheck="Never" />
+      <Column Name="Data" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX)" CanBeNull="false" UpdateCheck="Never" />
       <Association Name="Job_JobData" Member="Job" ThisKey="JobId" OtherKey="JobId" Type="Job" IsForeignKey="true" />
     </Type>
@@ -147,5 +147,5 @@
   <Table Name="" Member="PluginDatas">
     <Type Name="PluginData">
-      <Column Member="PluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
+      <Column Name="PluginId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" />
       <Column Name="Data" Type="System.Data.Linq.Binary" DbType="VarBinary(MAX) NOT NULL" CanBeNull="false" UpdateCheck="Never" />
       <Association Name="Plugin_PluginData" Member="Plugin" ThisKey="PluginId" OtherKey="PluginId" Type="Plugin" IsForeignKey="true" />
Index: branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout
===================================================================
--- branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 4598)
+++ branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout	(revision 4615)
@@ -75,5 +75,5 @@
       </nestedChildShapes>
     </classShape>
-    <classShape Id="bbd91675-92f2-4a69-8429-0950008fc8a4" absoluteBounds="14, 0.75, 2, 0.80938964843749961">
+    <classShape Id="bbd91675-92f2-4a69-8429-0950008fc8a4" absoluteBounds="14, 0.75, 2, 0.8093896484375">
       <DataClassMoniker Name="/HiveDataContext/SlaveGroup" />
       <nestedChildShapes>
@@ -81,5 +81,5 @@
       </nestedChildShapes>
     </classShape>
-    <inheritanceConnector edgePoints="[(11.75 : 1.44314697265625); (11.375 : 1.44314697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
+    <inheritanceConnector edgePoints="[(11.75 : 1.44314697265625); (11.375 : 1.44314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
       <nodes>
         <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
@@ -87,5 +87,5 @@
       </nodes>
     </inheritanceConnector>
-    <inheritanceConnector edgePoints="[(13.75 : 1.15469482421875); (14 : 1.15469482421875)]" fixedFrom="Algorithm" fixedTo="Algorithm" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
+    <inheritanceConnector edgePoints="[(13.75 : 1.15469482421875); (14 : 1.15469482421875)]" fixedFrom="NotFixed" fixedTo="NotFixed" TargetRelationshipDomainClassId="7a7fe09e-e9ef-4b01-9ff3-bde95e827b62">
       <nodes>
         <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
@@ -93,5 +93,5 @@
       </nodes>
     </inheritanceConnector>
-    <associationConnector edgePoints="[(13.25 : 2.1362939453125); (13.25 : 2.875)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(13.25 : 2.1362939453125); (13.25 : 2.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" />
       <nodes>
@@ -100,5 +100,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(11.25 : 7.20274983723958); (14.34375 : 7.20274983723958); (14.34375 : 4.2612939453125)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(11.25 : 7.20274983723958); (14.34375 : 7.20274983723958); (14.34375 : 4.2612939453125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedResource" />
       <nodes>
@@ -107,5 +107,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(9.375 : 2.93674967447917); (6.5 : 2.93674967447917)]" fixedFrom="Algorithm" fixedTo="Algorithm">
+    <associationConnector edgePoints="[(9.375 : 2.93674967447917); (6.5 : 2.93674967447917)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Slave/Slave_UptimeStatistic" />
       <nodes>
@@ -114,5 +114,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(15.6910576194798 : 1.5593896484375); (15.6910576194798 : 2.875)]" fixedFrom="Algorithm" fixedTo="Caller">
+    <associationConnector edgePoints="[(15.6910576194798 : 1.5593896484375); (15.6910576194798 : 2.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/SlaveGroup/SlaveGroup_SlaveGroup_Resource" />
       <nodes>
@@ -121,5 +121,5 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(13.75 : 2.1362939453125); (14.125 : 2.5112939453125); (15.3497974555544 : 2.5112939453125); (15.3497974555544 : 2.875)]" fixedFrom="NotFixed" fixedTo="Caller">
+    <associationConnector edgePoints="[(13.75 : 2.1362939453125); (14.125 : 2.5112939453125); (15.3497974555544 : 2.5112939453125); (15.3497974555544 : 2.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">
       <AssociationMoniker Name="/HiveDataContext/Resource/Resource_SlaveGroup_Resource" />
       <nodes>
@@ -128,6 +128,81 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(10.125 : 10.625); (10.125 : 10.2612939453125)]" fixedFrom="Algorithm" fixedTo="Algorithm">
-      <AssociationMoniker Name="/HiveDataContext/Plugin/PluginInfo_RequiredPlugin" />
+    <associationConnector edgePoints="[(10.25 : 7.87660970052083); (10.25 : 8.875)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+      <AssociationMoniker Name="/HiveDataContext/Job/Job_RequiredPlugin" />
+      <nodes>
+        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
+        <classShapeMoniker Id="97b00810-fa30-457e-b484-b4e80b22f91b" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(9 : 1.44314697265625); (9.375 : 1.44314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+      <AssociationMoniker Name="/HiveDataContext/SlaveConfig/SlaveConfig_Slave" />
+      <nodes>
+        <classShapeMoniker Id="5d9c7dad-8113-49c9-bdfa-c64543554a7b" />
+        <classShapeMoniker Id="26f4edfa-91dd-4941-a058-359f89e567a8" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(11.0834359271285 : 7.87660970052083); (11.0834359271285 : 7.95910970052083); (11.1656121961154 : 7.95910970052083); (11.1656121961154 : 8.12660970052083); (10.5546153846154 : 8.12660970052083); (10.5546153846154 : 7.87660970052083)]" manuallyRouted="true" fixedFrom="NotFixed" fixedTo="NotFixed">
+      <AssociationMoniker Name="/HiveDataContext/Job/Job_Job" />
+      <nodes>
+        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
+        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(7 : 8.25); (7.875 : 8.125); (7.875 : 8.05644744428109); (8.875 : 8.05644744428109); (8.875 : 8.25160970052083); (9.25 : 7.87660970052083)]" manuallyRouted="true" fixedFrom="NotFixed" fixedTo="NotFixed">
+      <AssociationMoniker Name="/HiveDataContext/Project/Project_Job" />
+      <nodes>
+        <classShapeMoniker Id="85f04409-b6e0-4e2f-a140-7191436a806f" />
+        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(10.3125 : 3.67470540364583); (10.3125 : 4.375)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+      <AssociationMoniker Name="/HiveDataContext/Slave/Slave_Job" />
+      <nodes>
+        <classShapeMoniker Id="26f4edfa-91dd-4941-a058-359f89e567a8" />
+        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(12.21875 : 2.1362939453125); (12.21875 : 4.625)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_UptimeCalendar" />
+      <nodes>
+        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
+        <classShapeMoniker Id="8d5712f7-7a1a-4a89-bd4d-fd60200d3306" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(9.25 : 6.71875); (6.875 : 6.71875)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+      <AssociationMoniker Name="/HiveDataContext/Job/Job_HiveExperiment" />
+      <nodes>
+        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
+        <classShapeMoniker Id="e6f840cc-2968-4be1-b234-eef624ccacbb" />
+      </nodes>
+    </associationConnector>
+    <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="6.875, 4.375, 2, 1.1939925130208327">
+      <DataClassMoniker Name="/HiveDataContext/JobData" />
+      <nestedChildShapes>
+        <elementListCompartment Id="a068522c-7974-4679-b356-e33c941c465b" absoluteBounds="6.89, 4.835, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+      </nestedChildShapes>
+    </classShape>
+    <classShape Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" absoluteBounds="11.5, 10.625, 2, 1.1939925130208344">
+      <DataClassMoniker Name="/HiveDataContext/PluginData" />
+      <nestedChildShapes>
+        <elementListCompartment Id="acddb513-7de6-4bb4-8335-d6982fb2ef35" absoluteBounds="11.515, 11.085, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
+      </nestedChildShapes>
+    </classShape>
+    <associationConnector edgePoints="[(11 : 11.2219962565104); (11.5 : 11.2219962565104)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+      <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_PluginData" />
+      <nodes>
+        <classShapeMoniker Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" />
+        <classShapeMoniker Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(9.25 : 4.97199625651042); (8.875 : 4.97199625651042)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+      <AssociationMoniker Name="/HiveDataContext/Job/Job_JobData" />
+      <nodes>
+        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
+        <classShapeMoniker Id="6bc13f26-f9a8-4597-b054-35be34190d12" />
+      </nodes>
+    </associationConnector>
+    <associationConnector edgePoints="[(10.125 : 10.625); (10.125 : 10.2612939453125)]" fixedFrom="NotFixed" fixedTo="NotFixed">
+      <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_RequiredPlugin" />
       <nodes>
         <classShapeMoniker Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" />
@@ -135,79 +210,4 @@
       </nodes>
     </associationConnector>
-    <associationConnector edgePoints="[(10.25 : 7.87660970052083); (10.25 : 8.875)]" fixedFrom="Algorithm" fixedTo="Algorithm">
-      <AssociationMoniker Name="/HiveDataContext/Job/Job_RequiredPlugin" />
-      <nodes>
-        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
-        <classShapeMoniker Id="97b00810-fa30-457e-b484-b4e80b22f91b" />
-      </nodes>
-    </associationConnector>
-    <associationConnector edgePoints="[(9 : 1.44314697265625); (9.375 : 1.44314697265625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
-      <AssociationMoniker Name="/HiveDataContext/SlaveConfig/SlaveConfig_Slave" />
-      <nodes>
-        <classShapeMoniker Id="5d9c7dad-8113-49c9-bdfa-c64543554a7b" />
-        <classShapeMoniker Id="26f4edfa-91dd-4941-a058-359f89e567a8" />
-      </nodes>
-    </associationConnector>
-    <associationConnector edgePoints="[(11.0834359271285 : 7.87660970052083); (11.0834359271285 : 7.95910970052083); (11.1656121961154 : 7.95910970052083); (11.1656121961154 : 8.12660970052083); (10.5546153846154 : 8.12660970052083); (10.5546153846154 : 7.87660970052083)]" manuallyRouted="true" fixedFrom="Caller" fixedTo="Algorithm">
-      <AssociationMoniker Name="/HiveDataContext/Job/Job_Job" />
-      <nodes>
-        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
-        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
-      </nodes>
-    </associationConnector>
-    <associationConnector edgePoints="[(7 : 8.25); (7.875 : 8.125); (7.875 : 8.05644744428109); (8.875 : 8.05644744428109); (8.875 : 8.25160970052083); (9.25 : 7.87660970052083)]" manuallyRouted="true" fixedFrom="Algorithm" fixedTo="Algorithm">
-      <AssociationMoniker Name="/HiveDataContext/Project/Project_Job" />
-      <nodes>
-        <classShapeMoniker Id="85f04409-b6e0-4e2f-a140-7191436a806f" />
-        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
-      </nodes>
-    </associationConnector>
-    <associationConnector edgePoints="[(10.3125 : 3.67470540364583); (10.3125 : 4.375)]" fixedFrom="Algorithm" fixedTo="Algorithm">
-      <AssociationMoniker Name="/HiveDataContext/Slave/Slave_Job" />
-      <nodes>
-        <classShapeMoniker Id="26f4edfa-91dd-4941-a058-359f89e567a8" />
-        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
-      </nodes>
-    </associationConnector>
-    <associationConnector edgePoints="[(12.21875 : 2.1362939453125); (12.21875 : 4.625)]" fixedFrom="Algorithm" fixedTo="Algorithm">
-      <AssociationMoniker Name="/HiveDataContext/Resource/Resource_UptimeCalendar" />
-      <nodes>
-        <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />
-        <classShapeMoniker Id="8d5712f7-7a1a-4a89-bd4d-fd60200d3306" />
-      </nodes>
-    </associationConnector>
-    <associationConnector edgePoints="[(9.25 : 6.71875); (6.875 : 6.71875)]" fixedFrom="Algorithm" fixedTo="Algorithm">
-      <AssociationMoniker Name="/HiveDataContext/Job/Job_HiveExperiment" />
-      <nodes>
-        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
-        <classShapeMoniker Id="e6f840cc-2968-4be1-b234-eef624ccacbb" />
-      </nodes>
-    </associationConnector>
-    <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="6.875, 4.375, 2, 1.1939925130208327">
-      <DataClassMoniker Name="/HiveDataContext/JobData" />
-      <nestedChildShapes>
-        <elementListCompartment Id="a068522c-7974-4679-b356-e33c941c465b" absoluteBounds="6.89, 4.835, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
-      </nestedChildShapes>
-    </classShape>
-    <classShape Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" absoluteBounds="11.5, 10.625, 2, 1.1939925130208344">
-      <DataClassMoniker Name="/HiveDataContext/PluginData" />
-      <nestedChildShapes>
-        <elementListCompartment Id="acddb513-7de6-4bb4-8335-d6982fb2ef35" absoluteBounds="11.515, 11.085, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
-      </nestedChildShapes>
-    </classShape>
-    <associationConnector edgePoints="[(11 : 11.2219962565104); (11.5 : 11.2219962565104)]" fixedFrom="Algorithm" fixedTo="Algorithm">
-      <AssociationMoniker Name="/HiveDataContext/Plugin/Plugin_PluginData" />
-      <nodes>
-        <classShapeMoniker Id="7d998e56-4fba-41ca-a1a8-1dcdb9068edf" />
-        <classShapeMoniker Id="ad25bd0f-80e8-4a06-abd8-190eb678eec7" />
-      </nodes>
-    </associationConnector>
-    <associationConnector edgePoints="[(9.25 : 4.97199625651042); (8.875 : 4.97199625651042)]" fixedFrom="Algorithm" fixedTo="Algorithm">
-      <AssociationMoniker Name="/HiveDataContext/Job/Job_JobData" />
-      <nodes>
-        <classShapeMoniker Id="695bfc39-59f3-4e60-8644-f847964bf62c" />
-        <classShapeMoniker Id="6bc13f26-f9a8-4597-b054-35be34190d12" />
-      </nodes>
-    </associationConnector>
   </nestedChildShapes>
 </ordesignerObjectsDiagram>
Index: branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
===================================================================
--- branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 4598)
+++ branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs	(revision 4615)
@@ -1011,5 +1011,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PluginInfo_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="PluginId", OtherKey="PluginId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_RequiredPlugin", Storage="_RequiredPlugins", ThisKey="PluginId", OtherKey="PluginId")]
 		public EntitySet<RequiredPlugin> RequiredPlugins
 		{
@@ -1274,5 +1274,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="PluginInfo_RequiredPlugin", Storage="_PluginInfo", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true, DeleteRule="CASCADE")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Plugin_RequiredPlugin", Storage="_PluginInfo", ThisKey="PluginId", OtherKey="PluginId", IsForeignKey=true, DeleteRule="CASCADE")]
 		public Plugin Plugin
 		{
@@ -1864,5 +1864,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Slave_Job", Storage="_Jobs", ThisKey="ResourceId", OtherKey="ResourceId")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Slave_Job", Storage="_Jobs", ThisKey="ResourceId", OtherKey="SlaveId")]
 		public EntitySet<Job> Jobs
 		{
@@ -1989,5 +1989,5 @@
 		private System.Nullable<System.Guid> _ParentJobId;
 		
-		private string _JobState;
+		private global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState _JobState;
 		
 		private System.Nullable<System.Guid> _ResourceId;
@@ -2035,8 +2035,8 @@
     partial void OnParentJobIdChanging(System.Nullable<System.Guid> value);
     partial void OnParentJobIdChanged();
-    partial void OnJobStateChanging(string value);
+    partial void OnJobStateChanging(global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState value);
     partial void OnJobStateChanged();
-    partial void OnResourceIdChanging(System.Nullable<System.Guid> value);
-    partial void OnResourceIdChanged();
+    partial void OnSlaveIdChanging(System.Nullable<System.Guid> value);
+    partial void OnSlaveIdChanged();
     partial void OnExecutionTimeChanging(System.Nullable<System.TimeSpan> value);
     partial void OnExecutionTimeChanged();
@@ -2117,6 +2117,6 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobState", DbType="VarChar(MAX)", CanBeNull=false)]
-		public string JobState
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JobState", DbType="VarChar(15)", CanBeNull=false)]
+		public global::HeuristicLab.Services.Hive.Common.DataTransfer.JobState JobState
 		{
 			get
@@ -2137,6 +2137,6 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResourceId", DbType="UniqueIdentifier")]
-		public System.Nullable<System.Guid> ResourceId
+		[global::System.Data.Linq.Mapping.ColumnAttribute(Name="ResourceId", Storage="_ResourceId", DbType="UniqueIdentifier")]
+		public System.Nullable<System.Guid> SlaveId
 		{
 			get
@@ -2148,13 +2148,9 @@
 				if ((this._ResourceId != value))
 				{
-					if (this._Slave.HasLoadedOrAssignedValue)
-					{
-						throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
-					}
-					this.OnResourceIdChanging(value);
+					this.OnSlaveIdChanging(value);
 					this.SendPropertyChanging();
 					this._ResourceId = value;
-					this.SendPropertyChanged("ResourceId");
-					this.OnResourceIdChanged();
+					this.SendPropertyChanged("SlaveId");
+					this.OnSlaveIdChanged();
 				}
 			}
@@ -2501,5 +2497,5 @@
 		}
 		
-		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Slave_Job", Storage="_Slave", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]
+		[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Slave_Job", Storage="_Slave", ThisKey="SlaveId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="SET NULL")]
 		public Slave Slave
 		{
Index: branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/Interfaces/IHiveDao.cs
===================================================================
--- branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/Interfaces/IHiveDao.cs	(revision 4598)
+++ branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/Interfaces/IHiveDao.cs	(revision 4615)
@@ -15,4 +15,5 @@
     void UpdateJob(DT.Job dto);
     void DeleteJob(Guid id);
+    IEnumerable<DT.Job> GetAvailableParentJobs(Guid slaveId);
     #endregion
 
Index: branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/app.config
===================================================================
--- branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/app.config	(revision 4598)
+++ branches/HeuristicLab.Hive/sources/HeuristicLab.Hive.New/HeuristicLab.Services.Hive.DataAccess/3.3/app.config	(revision 4615)
@@ -1,3 +1,10 @@
 ﻿<?xml version="1.0" encoding="utf-8" ?>
 <configuration>
+  <configSections>
+  </configSections>
+  <connectionStrings>
+    <add name="HeuristicLab.Services.Hive.DataAccess.Properties.Settings.HeuristicLab_Hive_LinqConnectionString"
+        connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive;Integrated Security=True;"
+        providerName="System.Data.SqlClient" />
+  </connectionStrings>
 </configuration>
