Free cookie consent management tool by TermsFeed Policy Generator

Changeset 5636


Ignore:
Timestamp:
03/08/11 14:54:17 (12 years ago)
Author:
cneumuel
Message:

#1233

  • updated jobstates documentation
  • enhanced ganttChart
  • fixed setting of jobstates
  • added option to force lifecycle-trigger (mainly for testing purposes)
Location:
branches/HeuristicLab.Hive-3.4
Files:
1 added
2 deleted
33 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.LifecycleClient/Program.cs

    r5593 r5636  
    77      using (var factory = ClientFactory.CreateChannelFactory<IHiveService>("wsHttpBinding_IHiveService", null, "hiveslave", "hiveslave")) {
    88        IHiveService client = factory.Obj.CreateChannel();
    9         client.TriggerLifecycle();
     9        client.TriggerLifecycle(true);
    1010      }
    1111    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4.csproj

    r5599 r5636  
    7878  </ItemGroup>
    7979  <ItemGroup>
    80     <None Include="app.config" />
     80    <None Include="app.config">
     81      <SubType>Designer</SubType>
     82    </None>
    8183    <None Include="app_ascheibe.config">
    8284      <SubType>Designer</SubType>
    8385    </None>
     86    <None Include="app_f005pc.config" />
    8487    <None Include="app_services.config" />
    8588  </ItemGroup>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4/app_f005pc.config

    r5591 r5636  
    66      <wsHttpBinding>
    77        <binding name="wsHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
    8           <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
     8          <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647"/>
    99          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
    1010          <security mode="Message">
     
    1717   
    1818    <services>
    19       <service name="HeuristicLab.Clients.Hive.Slave.SlaveCommunicationService">       
    20         <endpoint address="net.pipe://localhost/HeuristicLabSlaveCom" binding="netNamedPipeBinding" contract="HeuristicLab.Clients.Hive.Slave.ServiceContracts.ISlaveCommunication"/>
     19      <service name="HeuristicLab.Clients.Hive.SlaveCore.SlaveCommunicationService">       
     20        <endpoint address="net.pipe://localhost/HeuristicLabSlaveCom" binding="netNamedPipeBinding" contract="HeuristicLab.Clients.Hive.SlaveCore.ServiceContracts.ISlaveCommunication"/>
    2121      </service>
    2222    </services>
    2323
    2424   <client>
    25      <!--http://localhost:9000/Hive-3.4-->
    2625    <endpoint address="http://localhost/Hive-3.4/HiveService.svc"
    2726              binding="wsHttpBinding"
    2827              bindingConfiguration="wsHttpBinding"
    29               contract="HeuristicLab.Services.Hive.Common.ServiceContracts.IHiveService"
     28              contract="HeuristicLab.Clients.Hive.IHiveService"
    3029              name="wsHttpBinding_IHiveService">
    3130              <identity>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.ConsoleClient-3.4/app_services.config

    r5599 r5636  
    66      <wsHttpBinding>
    77        <binding name="wsHttpBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
    8           <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="16384"/>
     8          <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="4096" maxNameTableCharCount="2147483647"/>
    99          <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false"/>
    1010          <security mode="Message">
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave.Tests/Mocks/MockHiveService.cs

    r5633 r5636  
    169169      // do nothing
    170170    }
     171
     172    public Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception) {
     173      throw new NotImplementedException();
     174    }
    171175    #endregion
    172176
     
    337341
    338342    #region Lifecycle Methods
    339     public void TriggerLifecycle() {
    340       throw new NotImplementedException();
    341     }
    342     #endregion
    343 
     343    public void TriggerLifecycle(bool force) {
     344      throw new NotImplementedException();
     345    }
     346    #endregion
    344347    #region Appointment Methods
    345348    public Guid AddAppointment(Appointment appointment) {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/Core.cs

    r5599 r5636  
    140140        switch (container.Message) {
    141141          case MessageContainer.MessageType.CalculateJob:
    142             Job myJob = wcfService.GetJob(container.JobId);
    143             //TODO: handle in own thread!!
    144             JobData jobData = wcfService.GetJobData(myJob.Id);
    145             StartJobInAppDomain(myJob, jobData);
     142            Job job = wcfService.GetJob(container.JobId);
     143            JobData jobData = wcfService.GetJobData(job.Id);
     144            job = wcfService.UpdateJobState(job.Id, JobState.Calculating, null);
     145            StartJobInAppDomain(job, jobData);
    146146            break;
    147147          case MessageContainer.MessageType.ShutdownSlave:
     
    181181    }
    182182
    183     private void DoPauseJob(Guid guid) {
    184       Job job = Jobs[guid];
     183    private void DoPauseJob(Guid jobId) {
     184      Job job = Jobs[jobId];
    185185
    186186      if (job != null) {
     
    192192        try {
    193193          ClientCom.LogMessage("Sending the paused job with id: " + job.Id);
    194           wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id);
     194          wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState.Paused);
    195195          SlaveStatusInfo.JobsProcessed++;    //TODO: count or not count, thats the question
    196196        }
     
    215215        try {
    216216          ClientCom.LogMessage("Sending the stoppped job with id: " + job.Id);
    217           wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id);
     217          wcfService.UpdateJobData(job, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState.Paused);
    218218          SlaveStatusInfo.JobsProcessed++;    //TODO: count or not count, thats the question
    219219        }
     
    347347      } else {
    348348        Job job = Jobs[data.JobId];
    349         job.SetState(JobState.Transferring);
    350         wcfService.UpdateJobData(job, data, ConfigManager.Instance.GetClientInfo().Id);
    351         job.SetState(JobState.Waiting); // todo: what if it was a ResumeOnChildJobsFinished job before? maybe look into StateLog
     349        wcfService.UpdateJobData(job, data, ConfigManager.Instance.GetClientInfo().Id, JobState.Paused);
     350        job.SetState(JobState.Waiting);
    352351        wcfService.UpdateJob(job);
    353352      }
     
    373372        }
    374373        Job cJob = jobs[jobId];
    375         cJob.State = JobState.Finished; // TODO: what if failed?
    376374        cJob.ExecutionTime = engines[jobId].ExecutionTime;
    377375
     
    382380        try {
    383381          ClientCom.LogMessage("Sending the finished job with id: " + jobId);
    384           wcfService.UpdateJobData(cJob, sJob, ConfigManager.Instance.GetClientInfo().Id);
     382          wcfService.UpdateJobData(cJob, sJob, ConfigManager.Instance.GetClientInfo().Id, JobState.Finished);
    385383          SlaveStatusInfo.JobsProcessed++;
    386384        }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/WcfService.cs

    r5599 r5636  
    4949    public NetworkEnum.WcfConnState ConnState { get; private set; }
    5050
     51    private WcfService() {
     52      ConnState = NetworkEnum.WcfConnState.Disconnected;
     53    }
     54
     55    #region Job Methods
     56    public Job GetJob(Guid jobId) {
     57      return CallHiveService(s => s.GetJob(jobId));
     58    }
     59
     60    public void UpdateJob(Job job) {
     61      CallHiveService(s => s.UpdateJob(job));
     62    }
     63
     64    public Guid AddChildJob(Guid parentJobId, Job job, JobData jobData) {
     65      return CallHiveService(s => s.AddChildJob(parentJobId, job, jobData));
     66    }
     67
     68    public IEnumerable<JobData> GetChildJobs(Guid? parentJobId) {
     69      return CallHiveService(service => {
     70        IEnumerable<LightweightJob> msg = service.GetLightweightChildJobs(parentJobId, false, false);
     71
     72        List<JobData> jobs = new List<JobData>();
     73        foreach (LightweightJob ljob in msg)
     74          jobs.Add(service.GetJobData(ljob.Id));
     75
     76        return jobs;
     77      });
     78    }
     79
     80    public void DeleteChildJobs(Guid jobId) {
     81      CallHiveService(s => s.DeleteChildJobs(jobId));
     82    }
     83    #endregion
     84
     85    #region JobData Methods
     86    public JobData GetJobData(Guid jobId) {
     87      return CallHiveService(s => s.GetJobData(jobId));
     88    }
     89
     90    /// <summary>
     91    /// Uploads the JobData and sets a new jobState (while correctly setting Transferring state)
     92    /// </summary>
     93    public void UpdateJobData(Job job, JobData jobData, Guid slaveId, JobState state) {
     94      CallHiveService(service => {
     95        service.UpdateJob(job);
     96        job = service.UpdateJobState(job.Id, JobState.Transferring, slaveId, null, null);
     97        service.UpdateJobData(job, jobData);
     98        service.UpdateJobState(job.Id, state, slaveId, null, null);
     99      });
     100    }
     101
     102    public Job UpdateJobState(Guid jobId, JobState jobState, string exception) {
     103      return CallHiveService(s => s.UpdateJobState(jobId, jobState, ConfigManager.GetUniqueMachineId(), null, exception));
     104    }
     105    #endregion
     106
     107    #region Heartbeat Methods
     108    public List<MessageContainer> SendHeartbeat(Heartbeat heartbeat) {
     109      return CallHiveService(s => s.Heartbeat(heartbeat));
     110    }
     111    #endregion
     112
     113    #region Plugin Methods
     114    public IEnumerable<Plugin> GetPlugins() {
     115      return CallHiveService(s => s.GetPlugins());
     116    }
     117
     118    public IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds) {
     119      return CallHiveService(s => s.GetPluginDatas(pluginIds));
     120    }
     121    #endregion
     122
     123    #region Events
    51124    public event EventHandler Connected;
    52125    private void OnConnected() {
     
    60133      if (handler != null) handler(this, new EventArgs<Exception>(e));
    61134    }
     135    #endregion
    62136
    63     /// <summary>
    64     /// Constructor
    65     /// </summary>
    66     private WcfService() {
    67       ConnState = NetworkEnum.WcfConnState.Disconnected;
    68     }
    69 
     137    #region Helpers
    70138    /// <summary>
    71139    /// Connects with the Server, registers the events and fires the Connected (and quiet possibly the ConnectionRestored) Event.
     
    99167    }
    100168
    101     /// <summary>
    102     /// Get a Job from the Server
    103     /// </summary>
    104     public Job GetJob(Guid jobId) {
    105       return CallHiveService(s => s.GetJob(jobId));
    106     }
    107 
    108     public JobData GetJobData(Guid jobId) {
    109       return CallHiveService(s => s.GetJobData(jobId));
    110     }
    111 
    112     public void UpdateJob(Job job) {
    113       CallHiveService(s => s.UpdateJob(job));
    114     }
    115 
    116     /// <summary>
    117     /// used on pause or if job finished to upload the job results
    118     /// </summary>
    119     /// <param name="job"></param>
    120     /// <param name="jobData"></param>   
    121     public void UpdateJobData(Job job, JobData jobData, Guid slaveId) {
    122       CallHiveService(service => {
    123         JobState before = job.State;
    124         job.SetState(JobState.Transferring, slaveId, "");
    125 
    126         service.UpdateJob(job);
    127 
    128         service.UpdateJobData(job, jobData);
    129 
    130         job.SetState(before, slaveId, "");
    131         service.UpdateJob(job);
    132       });
    133     }
    134 
    135     public List<MessageContainer> SendHeartbeat(Heartbeat heartbeat) {
    136       return CallHiveService(s => s.Heartbeat(heartbeat));
    137     }
    138 
    139     public IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds) {
    140       return CallHiveService(s => s.GetPluginDatas(pluginIds));
    141     }
    142 
    143     public IEnumerable<Plugin> GetPlugins() {
    144       return CallHiveService(s => s.GetPlugins());
    145     }
    146 
    147     public Guid AddChildJob(Guid parentJobId, Job job, JobData jobData) {
    148       return CallHiveService(s => s.AddChildJob(parentJobId, job, jobData));
    149     }
    150 
    151     public IEnumerable<JobData> GetChildJobs(Guid? parentJobId) {
    152       return CallHiveService(service => {
    153         IEnumerable<LightweightJob> msg = service.GetLightweightChildJobs(parentJobId, false, false);
    154 
    155         List<JobData> jobs = new List<JobData>();
    156         foreach (LightweightJob ljob in msg)
    157           jobs.Add(service.GetJobData(ljob.Id));
    158 
    159         return jobs;
    160       });
    161     }
    162 
    163     public void DeleteChildJobs(Guid jobId) {
    164       CallHiveService(s => s.DeleteChildJobs(jobId));
    165     }
    166 
    167169    public void CallHiveService(Action<IHiveService> call) {
    168170      try {
     
    183185      }
    184186    }
     187    #endregion
    185188  }
    186189}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/GanttChart.Designer.cs

    r5597 r5636  
    1 namespace HeuristicLab.Clients.Hive.Views.ExperimentManager {
     1namespace HeuristicLab.Clients.Hive.Views {
    22  partial class GanttChart {
    33    /// <summary>
     
    4444      series1.ChartArea = "ChartArea1";
    4545      series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.RangeBar;
     46      series1.CustomProperties = "DrawingStyle=Cylinder";
    4647      series1.IsVisibleInLegend = false;
    4748      series1.Legend = "Legend";
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/GanttChart.cs

    r5597 r5636  
    22using System.Collections.Generic;
    33using System.Drawing;
     4using System.Linq;
    45using System.Windows.Forms;
    56using System.Windows.Forms.DataVisualization.Charting;
    67
    7 namespace HeuristicLab.Clients.Hive.Views.ExperimentManager {
     8namespace HeuristicLab.Clients.Hive.Views {
    89  public partial class GanttChart : UserControl {
    910
    1011    private IDictionary<string, Color> categories = new Dictionary<string, Color>();
     12    private IDictionary<string, int> rowNames = new Dictionary<string, int>();
    1113
    1214    public GanttChart() {
     
    1921    }
    2022
    21     public void AddData(int id, string category, DateTime start, DateTime end, string tooltip, bool showLabel = true) {
    22       var point = CreateDataPoint(id, start, end, showLabel ? category : string.Empty, categories[category]);
     23    public void AddData(string rowName, string category, DateTime start, DateTime end, string tooltip, bool showLabel = true) {
     24      AddRowName(rowName);
     25      var point = CreateDataPoint(rowNames[rowName], rowName, start, end, showLabel ? category : string.Empty, categories[category]);
    2326      point.ToolTip = tooltip;
    2427      chart.Series[0].Points.Add(point);
    2528    }
    2629
    27     private static DataPoint CreateDataPoint(double x, DateTime start, DateTime end, string text, Color color) {
     30    private void AddRowName(string rowName) {
     31      if (!rowNames.ContainsKey(rowName)) {
     32        int nextId = rowNames.Count == 0 ? 1 : rowNames.Values.Max() + 1;
     33        rowNames.Add(rowName, nextId);
     34      }
     35    }
     36
     37    private static DataPoint CreateDataPoint(double x, string axisLabel, DateTime start, DateTime end, string text, Color color) {
    2838      var point = new DataPoint(x, new double[] { start.ToOADate(), end.ToOADate() });
    2939      point.Color = color;
    3040      point.Label = text;
     41      point.AxisLabel = axisLabel;
    3142      return point;
    3243    }
     
    3647      categories.Clear();
    3748      chart.Legends[0].CustomItems.Clear();
     49      rowNames.Clear();
    3850    }
    3951  }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/HiveJobView.cs

    r5597 r5636  
    135135          this.exceptionTextBox.Text = Content.Job.CurrentStateLog.Exception;
    136136          if (Content.OptimizerJob.ComputeInParallel) {
    137             this.stateLogViewHost.Content = new ItemList<StateLogItemList>(
    138                 this.Content.ChildHiveJobs.Select(child => new StateLogItemList(child.Job.StateLog.Select(x => new StateLogItem(x)))
     137            this.stateLogViewHost.Content = new ItemList<StateLogList>(
     138                this.Content.ChildHiveJobs.Select(child => new StateLogList(child.Job.StateLog)
    139139              ));
    140140          } else {
    141             this.stateLogViewHost.Content = new StateLogItemList(Content.Job.StateLog.Select(x => new StateLogItem(x)));
     141            this.stateLogViewHost.Content = new StateLogList(Content.Job.StateLog);
    142142          }
    143143        } else {
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogGanttChartListView.cs

    r5597 r5636  
    2020#endregion
    2121
     22using System;
    2223using System.Drawing;
     24using System.Linq;
    2325using HeuristicLab.Core;
    2426using HeuristicLab.Core.Views;
    2527using HeuristicLab.MainForm;
    26 using HeuristicLab.Services.Hive.Common.DataTransfer;
    2728
    2829namespace HeuristicLab.Clients.Hive.Views {
    2930  [View("StateLogGanttChartList View")]
    30   [Content(typeof(IItemList<StateLogItemList>), IsDefaultView = true)]
     31  [Content(typeof(IItemList<StateLogList>), IsDefaultView = true)]
    3132  public sealed partial class StateLogGanttChartListView : ItemView {
    32     public new IItemList<StateLogItemList> Content {
    33       get { return (IItemList<StateLogItemList>)base.Content; }
     33    public new IItemList<StateLogList> Content {
     34      get { return (IItemList<StateLogList>)base.Content; }
    3435      set { base.Content = value; }
    3536    }
     
    6162        // Add code when content has been changed and is not null
    6263        ganttChart.Reset();
    63         ganttChart.AddCategory(JobState.Offline.ToString(), Color.Brown);
    64         ganttChart.AddCategory(JobState.Waiting.ToString(), Color.Yellow);
    65         ganttChart.AddCategory(JobState.Transferring.ToString(), Color.Blue);
    66         ganttChart.AddCategory(JobState.Calculating.ToString(), Color.Green);
    67         ganttChart.AddCategory(JobState.Finished.ToString(), Color.DarkGreen);
    68         ganttChart.AddCategory(JobState.Aborted.ToString(), Color.Orange);
    69         ganttChart.AddCategory(JobState.Failed.ToString(), Color.Red);
     64        SetupCategories(ganttChart);
     65
     66        DateTime maxValue = Content.Max(x => x.Max(y => y.DateTime));
     67        var upperLimit = DateTime.FromOADate(Math.Min(DateTime.Now.AddSeconds(10).ToOADate(), maxValue.AddSeconds(10).ToOADate()));
    7068
    7169        for (int i = 0; i < Content.Count; i++) {
    7270          for (int j = 0; j < Content[i].Count - 1; j++) {
    73             string tooltip = string.Format("State: {0}\n{1} - {2}", Content[i][j].State, Content[i][j].DateTime, Content[i][j+1].DateTime);
    74             if (!string.IsNullOrEmpty(Content[i][j].Exception))
    75               tooltip += "\n" + Content[i][j].Exception;
    76             ganttChart.AddData(i + 1, Content[i][j].State.ToString(), Content[i][j].DateTime, Content[i][j + 1].DateTime, tooltip, false);
     71            if(Content[i][j].State != JobState.Offline && Content[i][j].State != JobState.Finished)
     72              AddData(ganttChart, i.ToString(), Content[i][j], Content[i][j+1], upperLimit);
     73          }
     74          if(Content[i].Count > 0) {
     75            AddData(ganttChart, i.ToString(), Content[i][Content[i].Count - 1], null, upperLimit);
    7776          }
    7877        }
     
    8079    }
    8180
     81    public static void SetupCategories(GanttChart ganttChart) {
     82      ganttChart.AddCategory(JobState.Offline.ToString(), Color.Gainsboro);
     83      ganttChart.AddCategory(JobState.Waiting.ToString(), Color.NavajoWhite);
     84      ganttChart.AddCategory(JobState.Transferring.ToString(), Color.CornflowerBlue);
     85      ganttChart.AddCategory(JobState.Calculating.ToString(), Color.DarkGreen);
     86      ganttChart.AddCategory(JobState.Finished.ToString(), Color.White);
     87      ganttChart.AddCategory(JobState.Aborted.ToString(), Color.Orange);
     88      ganttChart.AddCategory(JobState.Failed.ToString(), Color.Red);
     89    }
     90
     91    //private void AddData(int i, int j, DateTime upperLimit) {
     92    //  DateTime until = j < Content[i].Count - 1 ? Content[i][j + 1].DateTime : upperLimit;
     93    //  TimeSpan duration = until - Content[i][j].DateTime;
     94    //  string tooltip = string.Format("State: {0}\nDuration: {1}\n{2} - {3}", Content[i][j].State, Content[i][j].DateTime, duration, until);
     95    //  if (!string.IsNullOrEmpty(Content[i][j].Exception))
     96    //    tooltip += "\n" + Content[i][j].Exception;
     97    //  ganttChart.AddData(i + 1, Content[i][j].State.ToString(), Content[i][j].DateTime, until, tooltip, false);
     98    //}
     99
     100    public static void AddData(GanttChart ganttChart, string name, StateLog from, StateLog to, DateTime upperLimit) {
     101      DateTime until = to != null ? to.DateTime : upperLimit;
     102      TimeSpan duration = until - from.DateTime;
     103      string tooltip = string.Format("State: {0}\nDuration: {1}\n{2} - {3}", from.State, from.DateTime, duration, until);
     104      if (!string.IsNullOrEmpty(from.Exception))
     105        tooltip += "\n" + from.Exception;
     106      ganttChart.AddData(name, from.State.ToString(), from.DateTime, until, tooltip, false);
     107    }
     108   
    82109    protected override void SetEnabledStateOfControls() {
    83110      base.SetEnabledStateOfControls();
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogGanttChartListView.designer.cs

    r5597 r5636  
    2424    /// </summary>
    2525    private void InitializeComponent() {
    26       this.ganttChart = new HeuristicLab.Clients.Hive.Views.ExperimentManager.GanttChart();
     26      this.ganttChart = new HeuristicLab.Clients.Hive.Views.GanttChart();
    2727      this.SuspendLayout();
    2828      //
     
    5050    #endregion
    5151
    52     private ExperimentManager.GanttChart ganttChart;
     52    private GanttChart ganttChart;
    5353
    5454  }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogGanttChartView.cs

    r5597 r5636  
    2020#endregion
    2121
    22 using System.Drawing;
     22using System;
    2323using HeuristicLab.Core.Views;
    2424using HeuristicLab.MainForm;
    25 using HeuristicLab.Services.Hive.Common.DataTransfer;
    2625
    2726namespace HeuristicLab.Clients.Hive.Views {
    2827  [View("StateLogGanttChart View")]
    29   [Content(typeof(StateLogItemList), IsDefaultView = false)]
     28  [Content(typeof(StateLogList), IsDefaultView = false)]
    3029  public sealed partial class StateLogGanttChartView : ItemView {
    31     public new StateLogItemList Content {
    32       get { return (StateLogItemList)base.Content; }
     30    public new StateLogList Content {
     31      get { return (StateLogList)base.Content; }
    3332      set { base.Content = value; }
    3433    }
     
    6059        // Add code when content has been changed and is not null
    6160        ganttChart.Reset();
    62         ganttChart.AddCategory(JobState.Offline.ToString(), Color.Brown);
    63         ganttChart.AddCategory(JobState.Waiting.ToString(), Color.Yellow);
    64         ganttChart.AddCategory(JobState.Transferring.ToString(), Color.Blue);
    65         ganttChart.AddCategory(JobState.Calculating.ToString(), Color.Green);
    66         ganttChart.AddCategory(JobState.Finished.ToString(), Color.DarkGreen);
    67         ganttChart.AddCategory(JobState.Aborted.ToString(), Color.Orange);
    68         ganttChart.AddCategory(JobState.Failed.ToString(), Color.Red);
     61        StateLogGanttChartListView.SetupCategories(ganttChart);
     62        var upperLimit = DateTime.Now.AddSeconds(10);
    6963       
    7064        for (int i = 0; i < Content.Count-1; i++) {
    71           string tooltip = string.Format("State: {0}\n{1} - {2}", Content[i].State, Content[i].DateTime, Content[i + 1].DateTime);
    72           if (!string.IsNullOrEmpty(Content[i].Exception))
    73             tooltip += "\n" + Content[i].Exception;
    74           ganttChart.AddData(0, Content[i].State.ToString(), Content[i].DateTime, Content[i + 1].DateTime, tooltip);
     65          //string tooltip = string.Format("State: {0}\n{1} - {2}", Content[i].State, Content[i].DateTime, Content[i + 1].DateTime);
     66          //if (!string.IsNullOrEmpty(Content[i].Exception))
     67          //  tooltip += "\n" + Content[i].Exception;
     68          //ganttChart.AddData(Content[i].State.ToString(), Content[i].State.ToString(), Content[i].DateTime, Content[i + 1].DateTime, tooltip, false);
     69          StateLogGanttChartListView.AddData(ganttChart, i.ToString(), Content[i], Content[i+1], upperLimit);
    7570        }
     71        StateLogGanttChartListView.AddData(ganttChart, (Content.Count - 1).ToString(), Content[Content.Count - 1], null, upperLimit);
    7672      }
    7773    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogGanttChartView.designer.cs

    r5597 r5636  
    2424    /// </summary>
    2525    private void InitializeComponent() {
    26       this.ganttChart = new HeuristicLab.Clients.Hive.Views.ExperimentManager.GanttChart();
     26      this.ganttChart = new HeuristicLab.Clients.Hive.Views.GanttChart();
    2727      this.SuspendLayout();
    2828      //
     
    5050    #endregion
    5151
    52     private ExperimentManager.GanttChart ganttChart;
     52    private GanttChart ganttChart;
    5353
    5454  }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogListView.cs

    r5597 r5636  
    2525
    2626namespace HeuristicLab.Clients.Hive.Views {
    27   [View("StateLogItem View")]
    28   [Content(typeof(IItemList<StateLogItem>), false)]
    29   public partial class StateLogListView : ItemListView<StateLogItem> {
     27  [View("StateLog View")]
     28  [Content(typeof(IItemList<StateLog>), false)]
     29  public partial class StateLogListView : ItemListView<StateLog> {
    3030
    3131    public StateLogListView() {
     
    3434    }
    3535
    36     protected override StateLogItem CreateItem() {
     36    protected override StateLog CreateItem() {
    3737      return null;
    3838    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/ExperimentManager/StateLogView.cs

    r5597 r5636  
    2323using HeuristicLab.Core.Views;
    2424using HeuristicLab.MainForm;
     25using HeuristicLab.MainForm.WindowsForms;
    2526
    2627namespace HeuristicLab.Clients.Hive.Views {
    2728  [View("StateLog View")]
    28   [Content(typeof(StateLogItem), IsDefaultView = false)]
     29  [Content(typeof(StateLog), IsDefaultView = false)]
    2930  public sealed partial class StateLogView : ItemView {
    30     public new StateLogItem Content {
    31       get { return (StateLogItem)base.Content; }
     31    public new StateLog Content {
     32      get { return (StateLog)base.Content; }
    3233      set { base.Content = value; }
    3334    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/HeuristicLab.Clients.Hive.Views-3.4.csproj

    r5599 r5636  
    150150      <DependentUpon>StateLogGanttChartView.cs</DependentUpon>
    151151    </Compile>
    152     <Compile Include="ExperimentManager\StateLogItemList.cs" />
     152    <Compile Include="ExperimentManager\StateLogList.cs" />
    153153    <Compile Include="ExperimentManager\StateLogListView.cs">
    154154      <SubType>UserControl</SubType>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/HiveExperimentManagerClient.cs

    r5599 r5636  
    9393        }
    9494        currentlyUpdating = true;
     95        progress.Status = "Populating HiveExperiment list...";
    9596        IEnumerable<HiveExperiment> response = ServiceLocator.Instance.CallHiveService(s => s.GetHiveExperiments());
    96         progress.Status = "Populating HiveExperiment list...";
    9797        RefreshExperimentList(response);
    9898        currentlyUpdating = false;
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HeuristicLab.Clients.Hive-3.4.csproj

    r5614 r5636  
    127127    <Compile Include="ExperimentManager\PluginClient.cs" />
    128128    <Compile Include="Exceptions\ResourceNotFoundException.cs" />
    129     <Compile Include="ExperimentManager\StateLogItem.cs" />
    130129    <Compile Include="IServiceLocator.cs" />
    131130    <Compile Include="Jobs\OptimizerJob.cs" />
     
    143142    <Compile Include="Exceptions\ServiceClientFactoryException.cs" />
    144143    <Compile Include="ServiceClients\Appointment.cs" />
     144    <Compile Include="ServiceClients\HiveItem.cs" />
    145145    <Compile Include="ServiceClients\Heartbeat.cs" />
    146146    <Compile Include="ServiceClients\HiveExperimentPermission.cs" />
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/GenerateServiceClients.cmd

    r5599 r5636  
    77
    88svcutil.exe ^
    9   http://localhost/HiveService.svc?wsdl ^
     9  http://localhost/Hive-3.4/HiveService.svc?wsdl ^
    1010  /out:HiveServiceClient ^
    1111  /namespace:*,HeuristicLab.Clients.Hive ^
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveServiceClient.cs

    r5633 r5636  
    22// <auto-generated>
    33//     This code was generated by a tool.
    4 //     Runtime Version:4.0.30319.1
     4//     Runtime Version:4.0.30319.208
    55//
    66//     Changes to this file may cause incorrect behavior and will be lost if
     
    2020        "nsfer")]
    2121    [System.SerializableAttribute()]
    22     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Appointment))]
    2322    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.LightweightJob))]
    2423    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.StateLog))]
    2524    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Job))]
    26     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.PluginData))]
    2725    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.NamedHiveItem))]
    2826    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.HiveExperiment))]
    29     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Plugin))]
    3027    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Resource))]
    3128    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Slave))]
    3229    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))]
     30    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Plugin))]
     31    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.PluginData))]
     32    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Appointment))]
    3333    public partial class HiveItem : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged
    3434    {
     
    7777            {
    7878                propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
    79             }
    80         }
    81     }
    82    
    83     [System.Diagnostics.DebuggerStepThroughAttribute()]
    84     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    85     [System.Runtime.Serialization.DataContractAttribute(Name="Appointment", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +
    86         "nsfer")]
    87     [System.SerializableAttribute()]
    88     public partial class Appointment : HeuristicLab.Clients.Hive.HiveItem
    89     {
    90        
    91         [System.Runtime.Serialization.OptionalFieldAttribute()]
    92         private bool AllDayEventField;
    93        
    94         [System.Runtime.Serialization.OptionalFieldAttribute()]
    95         private System.DateTime EndDateField;
    96        
    97         [System.Runtime.Serialization.OptionalFieldAttribute()]
    98         private bool RecurringField;
    99        
    100         [System.Runtime.Serialization.OptionalFieldAttribute()]
    101         private System.Guid RecurringIdField;
    102        
    103         [System.Runtime.Serialization.OptionalFieldAttribute()]
    104         private System.Guid ResourceIdField;
    105        
    106         [System.Runtime.Serialization.OptionalFieldAttribute()]
    107         private System.DateTime StartDateField;
    108        
    109         [System.Runtime.Serialization.DataMemberAttribute()]
    110         public bool AllDayEvent
    111         {
    112             get
    113             {
    114                 return this.AllDayEventField;
    115             }
    116             set
    117             {
    118                 if ((this.AllDayEventField.Equals(value) != true))
    119                 {
    120                     this.AllDayEventField = value;
    121                     this.RaisePropertyChanged("AllDayEvent");
    122                 }
    123             }
    124         }
    125        
    126         [System.Runtime.Serialization.DataMemberAttribute()]
    127         public System.DateTime EndDate
    128         {
    129             get
    130             {
    131                 return this.EndDateField;
    132             }
    133             set
    134             {
    135                 if ((this.EndDateField.Equals(value) != true))
    136                 {
    137                     this.EndDateField = value;
    138                     this.RaisePropertyChanged("EndDate");
    139                 }
    140             }
    141         }
    142        
    143         [System.Runtime.Serialization.DataMemberAttribute()]
    144         public bool Recurring
    145         {
    146             get
    147             {
    148                 return this.RecurringField;
    149             }
    150             set
    151             {
    152                 if ((this.RecurringField.Equals(value) != true))
    153                 {
    154                     this.RecurringField = value;
    155                     this.RaisePropertyChanged("Recurring");
    156                 }
    157             }
    158         }
    159        
    160         [System.Runtime.Serialization.DataMemberAttribute()]
    161         public System.Guid RecurringId
    162         {
    163             get
    164             {
    165                 return this.RecurringIdField;
    166             }
    167             set
    168             {
    169                 if ((this.RecurringIdField.Equals(value) != true))
    170                 {
    171                     this.RecurringIdField = value;
    172                     this.RaisePropertyChanged("RecurringId");
    173                 }
    174             }
    175         }
    176        
    177         [System.Runtime.Serialization.DataMemberAttribute()]
    178         public System.Guid ResourceId
    179         {
    180             get
    181             {
    182                 return this.ResourceIdField;
    183             }
    184             set
    185             {
    186                 if ((this.ResourceIdField.Equals(value) != true))
    187                 {
    188                     this.ResourceIdField = value;
    189                     this.RaisePropertyChanged("ResourceId");
    190                 }
    191             }
    192         }
    193        
    194         [System.Runtime.Serialization.DataMemberAttribute()]
    195         public System.DateTime StartDate
    196         {
    197             get
    198             {
    199                 return this.StartDateField;
    200             }
    201             set
    202             {
    203                 if ((this.StartDateField.Equals(value) != true))
    204                 {
    205                     this.StartDateField = value;
    206                     this.RaisePropertyChanged("StartDate");
    207                 }
    20879            }
    20980        }
     
    580451    [System.Diagnostics.DebuggerStepThroughAttribute()]
    581452    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    582     [System.Runtime.Serialization.DataContractAttribute(Name="PluginData", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +
    583         "nsfer")]
    584     [System.SerializableAttribute()]
    585     public partial class PluginData : HeuristicLab.Clients.Hive.HiveItem
    586     {
    587        
    588         [System.Runtime.Serialization.OptionalFieldAttribute()]
    589         private byte[] DataField;
    590        
    591         [System.Runtime.Serialization.OptionalFieldAttribute()]
    592         private string FileNameField;
    593        
    594         [System.Runtime.Serialization.OptionalFieldAttribute()]
    595         private System.Guid PluginIdField;
    596        
    597         [System.Runtime.Serialization.DataMemberAttribute()]
    598         public byte[] Data
    599         {
    600             get
    601             {
    602                 return this.DataField;
    603             }
    604             set
    605             {
    606                 if ((object.ReferenceEquals(this.DataField, value) != true))
    607                 {
    608                     this.DataField = value;
    609                     this.RaisePropertyChanged("Data");
    610                 }
    611             }
    612         }
    613        
    614         [System.Runtime.Serialization.DataMemberAttribute()]
    615         public string FileName
    616         {
    617             get
    618             {
    619                 return this.FileNameField;
    620             }
    621             set
    622             {
    623                 if ((object.ReferenceEquals(this.FileNameField, value) != true))
    624                 {
    625                     this.FileNameField = value;
    626                     this.RaisePropertyChanged("FileName");
    627                 }
    628             }
    629         }
    630        
    631         [System.Runtime.Serialization.DataMemberAttribute()]
    632         public System.Guid PluginId
    633         {
    634             get
    635             {
    636                 return this.PluginIdField;
    637             }
    638             set
    639             {
    640                 if ((this.PluginIdField.Equals(value) != true))
    641                 {
    642                     this.PluginIdField = value;
    643                     this.RaisePropertyChanged("PluginId");
    644                 }
    645             }
    646         }
    647     }
    648    
    649     [System.Diagnostics.DebuggerStepThroughAttribute()]
    650     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    651453    [System.Runtime.Serialization.DataContractAttribute(Name="NamedHiveItem", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +
    652454        "nsfer")]
    653455    [System.SerializableAttribute()]
    654456    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.HiveExperiment))]
    655     [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Plugin))]
    656457    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Resource))]
    657458    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Slave))]
    658459    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))]
     460    [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Plugin))]
    659461    public partial class NamedHiveItem : HeuristicLab.Clients.Hive.HiveItem
    660462    {
     
    805607                    this.RootJobIdField = value;
    806608                    this.RaisePropertyChanged("RootJobId");
    807                 }
    808             }
    809         }
    810     }
    811    
    812     [System.Diagnostics.DebuggerStepThroughAttribute()]
    813     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    814     [System.Runtime.Serialization.DataContractAttribute(Name="Plugin", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +
    815         "nsfer")]
    816     [System.SerializableAttribute()]
    817     public partial class Plugin : HeuristicLab.Clients.Hive.NamedHiveItem
    818     {
    819        
    820         [System.Runtime.Serialization.OptionalFieldAttribute()]
    821         private System.DateTime DateCreatedField;
    822        
    823         [System.Runtime.Serialization.OptionalFieldAttribute()]
    824         private bool IsLocalField;
    825        
    826         [System.Runtime.Serialization.OptionalFieldAttribute()]
    827         private System.Guid UserIdField;
    828        
    829         [System.Runtime.Serialization.OptionalFieldAttribute()]
    830         private System.Version VersionField;
    831        
    832         [System.Runtime.Serialization.DataMemberAttribute()]
    833         public System.DateTime DateCreated
    834         {
    835             get
    836             {
    837                 return this.DateCreatedField;
    838             }
    839             set
    840             {
    841                 if ((this.DateCreatedField.Equals(value) != true))
    842                 {
    843                     this.DateCreatedField = value;
    844                     this.RaisePropertyChanged("DateCreated");
    845                 }
    846             }
    847         }
    848        
    849         [System.Runtime.Serialization.DataMemberAttribute()]
    850         public bool IsLocal
    851         {
    852             get
    853             {
    854                 return this.IsLocalField;
    855             }
    856             set
    857             {
    858                 if ((this.IsLocalField.Equals(value) != true))
    859                 {
    860                     this.IsLocalField = value;
    861                     this.RaisePropertyChanged("IsLocal");
    862                 }
    863             }
    864         }
    865        
    866         [System.Runtime.Serialization.DataMemberAttribute()]
    867         public System.Guid UserId
    868         {
    869             get
    870             {
    871                 return this.UserIdField;
    872             }
    873             set
    874             {
    875                 if ((this.UserIdField.Equals(value) != true))
    876                 {
    877                     this.UserIdField = value;
    878                     this.RaisePropertyChanged("UserId");
    879                 }
    880             }
    881         }
    882        
    883         [System.Runtime.Serialization.DataMemberAttribute()]
    884         public System.Version Version
    885         {
    886             get
    887             {
    888                 return this.VersionField;
    889             }
    890             set
    891             {
    892                 if ((object.ReferenceEquals(this.VersionField, value) != true))
    893                 {
    894                     this.VersionField = value;
    895                     this.RaisePropertyChanged("Version");
    896609                }
    897610            }
     
    1148861    }
    1149862   
     863    [System.Diagnostics.DebuggerStepThroughAttribute()]
     864    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
     865    [System.Runtime.Serialization.DataContractAttribute(Name="Plugin", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +
     866        "nsfer")]
     867    [System.SerializableAttribute()]
     868    public partial class Plugin : HeuristicLab.Clients.Hive.NamedHiveItem
     869    {
     870       
     871        [System.Runtime.Serialization.OptionalFieldAttribute()]
     872        private System.DateTime DateCreatedField;
     873       
     874        [System.Runtime.Serialization.OptionalFieldAttribute()]
     875        private bool IsLocalField;
     876       
     877        [System.Runtime.Serialization.OptionalFieldAttribute()]
     878        private System.Guid UserIdField;
     879       
     880        [System.Runtime.Serialization.OptionalFieldAttribute()]
     881        private System.Version VersionField;
     882       
     883        [System.Runtime.Serialization.DataMemberAttribute()]
     884        public System.DateTime DateCreated
     885        {
     886            get
     887            {
     888                return this.DateCreatedField;
     889            }
     890            set
     891            {
     892                if ((this.DateCreatedField.Equals(value) != true))
     893                {
     894                    this.DateCreatedField = value;
     895                    this.RaisePropertyChanged("DateCreated");
     896                }
     897            }
     898        }
     899       
     900        [System.Runtime.Serialization.DataMemberAttribute()]
     901        public bool IsLocal
     902        {
     903            get
     904            {
     905                return this.IsLocalField;
     906            }
     907            set
     908            {
     909                if ((this.IsLocalField.Equals(value) != true))
     910                {
     911                    this.IsLocalField = value;
     912                    this.RaisePropertyChanged("IsLocal");
     913                }
     914            }
     915        }
     916       
     917        [System.Runtime.Serialization.DataMemberAttribute()]
     918        public System.Guid UserId
     919        {
     920            get
     921            {
     922                return this.UserIdField;
     923            }
     924            set
     925            {
     926                if ((this.UserIdField.Equals(value) != true))
     927                {
     928                    this.UserIdField = value;
     929                    this.RaisePropertyChanged("UserId");
     930                }
     931            }
     932        }
     933       
     934        [System.Runtime.Serialization.DataMemberAttribute()]
     935        public System.Version Version
     936        {
     937            get
     938            {
     939                return this.VersionField;
     940            }
     941            set
     942            {
     943                if ((object.ReferenceEquals(this.VersionField, value) != true))
     944                {
     945                    this.VersionField = value;
     946                    this.RaisePropertyChanged("Version");
     947                }
     948            }
     949        }
     950    }
     951   
     952    [System.Diagnostics.DebuggerStepThroughAttribute()]
     953    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
     954    [System.Runtime.Serialization.DataContractAttribute(Name="PluginData", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +
     955        "nsfer")]
     956    [System.SerializableAttribute()]
     957    public partial class PluginData : HeuristicLab.Clients.Hive.HiveItem
     958    {
     959       
     960        [System.Runtime.Serialization.OptionalFieldAttribute()]
     961        private byte[] DataField;
     962       
     963        [System.Runtime.Serialization.OptionalFieldAttribute()]
     964        private string FileNameField;
     965       
     966        [System.Runtime.Serialization.OptionalFieldAttribute()]
     967        private System.Guid PluginIdField;
     968       
     969        [System.Runtime.Serialization.DataMemberAttribute()]
     970        public byte[] Data
     971        {
     972            get
     973            {
     974                return this.DataField;
     975            }
     976            set
     977            {
     978                if ((object.ReferenceEquals(this.DataField, value) != true))
     979                {
     980                    this.DataField = value;
     981                    this.RaisePropertyChanged("Data");
     982                }
     983            }
     984        }
     985       
     986        [System.Runtime.Serialization.DataMemberAttribute()]
     987        public string FileName
     988        {
     989            get
     990            {
     991                return this.FileNameField;
     992            }
     993            set
     994            {
     995                if ((object.ReferenceEquals(this.FileNameField, value) != true))
     996                {
     997                    this.FileNameField = value;
     998                    this.RaisePropertyChanged("FileName");
     999                }
     1000            }
     1001        }
     1002       
     1003        [System.Runtime.Serialization.DataMemberAttribute()]
     1004        public System.Guid PluginId
     1005        {
     1006            get
     1007            {
     1008                return this.PluginIdField;
     1009            }
     1010            set
     1011            {
     1012                if ((this.PluginIdField.Equals(value) != true))
     1013                {
     1014                    this.PluginIdField = value;
     1015                    this.RaisePropertyChanged("PluginId");
     1016                }
     1017            }
     1018        }
     1019    }
     1020   
     1021    [System.Diagnostics.DebuggerStepThroughAttribute()]
     1022    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
     1023    [System.Runtime.Serialization.DataContractAttribute(Name="Appointment", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +
     1024        "nsfer")]
     1025    [System.SerializableAttribute()]
     1026    public partial class Appointment : HeuristicLab.Clients.Hive.HiveItem
     1027    {
     1028       
     1029        [System.Runtime.Serialization.OptionalFieldAttribute()]
     1030        private bool AllDayEventField;
     1031       
     1032        [System.Runtime.Serialization.OptionalFieldAttribute()]
     1033        private System.DateTime EndDateField;
     1034       
     1035        [System.Runtime.Serialization.OptionalFieldAttribute()]
     1036        private bool RecurringField;
     1037       
     1038        [System.Runtime.Serialization.OptionalFieldAttribute()]
     1039        private System.Guid RecurringIdField;
     1040       
     1041        [System.Runtime.Serialization.OptionalFieldAttribute()]
     1042        private System.Guid ResourceIdField;
     1043       
     1044        [System.Runtime.Serialization.OptionalFieldAttribute()]
     1045        private System.DateTime StartDateField;
     1046       
     1047        [System.Runtime.Serialization.DataMemberAttribute()]
     1048        public bool AllDayEvent
     1049        {
     1050            get
     1051            {
     1052                return this.AllDayEventField;
     1053            }
     1054            set
     1055            {
     1056                if ((this.AllDayEventField.Equals(value) != true))
     1057                {
     1058                    this.AllDayEventField = value;
     1059                    this.RaisePropertyChanged("AllDayEvent");
     1060                }
     1061            }
     1062        }
     1063       
     1064        [System.Runtime.Serialization.DataMemberAttribute()]
     1065        public System.DateTime EndDate
     1066        {
     1067            get
     1068            {
     1069                return this.EndDateField;
     1070            }
     1071            set
     1072            {
     1073                if ((this.EndDateField.Equals(value) != true))
     1074                {
     1075                    this.EndDateField = value;
     1076                    this.RaisePropertyChanged("EndDate");
     1077                }
     1078            }
     1079        }
     1080       
     1081        [System.Runtime.Serialization.DataMemberAttribute()]
     1082        public bool Recurring
     1083        {
     1084            get
     1085            {
     1086                return this.RecurringField;
     1087            }
     1088            set
     1089            {
     1090                if ((this.RecurringField.Equals(value) != true))
     1091                {
     1092                    this.RecurringField = value;
     1093                    this.RaisePropertyChanged("Recurring");
     1094                }
     1095            }
     1096        }
     1097       
     1098        [System.Runtime.Serialization.DataMemberAttribute()]
     1099        public System.Guid RecurringId
     1100        {
     1101            get
     1102            {
     1103                return this.RecurringIdField;
     1104            }
     1105            set
     1106            {
     1107                if ((this.RecurringIdField.Equals(value) != true))
     1108                {
     1109                    this.RecurringIdField = value;
     1110                    this.RaisePropertyChanged("RecurringId");
     1111                }
     1112            }
     1113        }
     1114       
     1115        [System.Runtime.Serialization.DataMemberAttribute()]
     1116        public System.Guid ResourceId
     1117        {
     1118            get
     1119            {
     1120                return this.ResourceIdField;
     1121            }
     1122            set
     1123            {
     1124                if ((this.ResourceIdField.Equals(value) != true))
     1125                {
     1126                    this.ResourceIdField = value;
     1127                    this.RaisePropertyChanged("ResourceId");
     1128                }
     1129            }
     1130        }
     1131       
     1132        [System.Runtime.Serialization.DataMemberAttribute()]
     1133        public System.DateTime StartDate
     1134        {
     1135            get
     1136            {
     1137                return this.StartDateField;
     1138            }
     1139            set
     1140            {
     1141                if ((this.StartDateField.Equals(value) != true))
     1142                {
     1143                    this.StartDateField = value;
     1144                    this.RaisePropertyChanged("StartDate");
     1145                }
     1146            }
     1147        }
     1148    }
     1149   
    11501150    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    11511151    [System.Runtime.Serialization.DataContractAttribute(Name="JobState", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +
     
    11671167       
    11681168        [System.Runtime.Serialization.EnumMemberAttribute()]
    1169         Finished = 4,
     1169        Paused = 4,
    11701170       
    11711171        [System.Runtime.Serialization.EnumMemberAttribute()]
    1172         Aborted = 5,
     1172        Finished = 5,
    11731173       
    11741174        [System.Runtime.Serialization.EnumMemberAttribute()]
    1175         Failed = 6,
     1175        Aborted = 6,
     1176       
     1177        [System.Runtime.Serialization.EnumMemberAttribute()]
     1178        Failed = 7,
    11761179    }
    11771180   
     
    15621565    {
    15631566       
     1567        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/UpdateAppointment", ReplyAction="http://tempuri.org/IHiveService/UpdateAppointmentResponse")]
     1568        void UpdateAppointment(HeuristicLab.Clients.Hive.Appointment appointment);
     1569       
     1570        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetScheduleForResource", ReplyAction="http://tempuri.org/IHiveService/GetScheduleForResourceResponse")]
     1571        System.Collections.Generic.List<HeuristicLab.Clients.Hive.Appointment> GetScheduleForResource(System.Guid resourceId);
     1572       
     1573        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddJob", ReplyAction="http://tempuri.org/IHiveService/AddJobResponse")]
     1574        System.Guid AddJob(HeuristicLab.Clients.Hive.Job job, HeuristicLab.Clients.Hive.JobData jobData, System.Collections.Generic.List<System.Guid> resourceIds);
     1575       
     1576        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddChildJob", ReplyAction="http://tempuri.org/IHiveService/AddChildJobResponse")]
     1577        System.Guid AddChildJob(System.Guid parentJobId, HeuristicLab.Clients.Hive.Job job, HeuristicLab.Clients.Hive.JobData jobData);
     1578       
     1579        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetJob", ReplyAction="http://tempuri.org/IHiveService/GetJobResponse")]
     1580        HeuristicLab.Clients.Hive.Job GetJob(System.Guid jobId);
     1581       
     1582        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetJobs", ReplyAction="http://tempuri.org/IHiveService/GetJobsResponse")]
     1583        System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetJobs();
     1584       
     1585        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetLightweightJobs", ReplyAction="http://tempuri.org/IHiveService/GetLightweightJobsResponse")]
     1586        System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightJob> GetLightweightJobs(System.Collections.Generic.List<System.Guid> jobIds);
     1587       
     1588        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetLightweightChildJobs", ReplyAction="http://tempuri.org/IHiveService/GetLightweightChildJobsResponse")]
     1589        System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightJob> GetLightweightChildJobs(System.Nullable<System.Guid> parentJobId, bool recursive, bool includeParent);
     1590       
     1591        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetJobData", ReplyAction="http://tempuri.org/IHiveService/GetJobDataResponse")]
     1592        HeuristicLab.Clients.Hive.JobData GetJobData(System.Guid jobId);
     1593       
     1594        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/UpdateJob", ReplyAction="http://tempuri.org/IHiveService/UpdateJobResponse")]
     1595        void UpdateJob(HeuristicLab.Clients.Hive.Job jobDto);
     1596       
     1597        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/UpdateJobData", ReplyAction="http://tempuri.org/IHiveService/UpdateJobDataResponse")]
     1598        void UpdateJobData(HeuristicLab.Clients.Hive.Job jobDto, HeuristicLab.Clients.Hive.JobData jobDataDto);
     1599       
     1600        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/DeleteJob", ReplyAction="http://tempuri.org/IHiveService/DeleteJobResponse")]
     1601        void DeleteJob(System.Guid jobId);
     1602       
     1603        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/DeleteChildJobs", ReplyAction="http://tempuri.org/IHiveService/DeleteChildJobsResponse")]
     1604        void DeleteChildJobs(System.Guid parentJobId);
     1605       
     1606        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/UpdateJobState", ReplyAction="http://tempuri.org/IHiveService/UpdateJobStateResponse")]
     1607        HeuristicLab.Clients.Hive.Job UpdateJobState(System.Guid jobId, HeuristicLab.Clients.Hive.JobState jobState, System.Nullable<System.Guid> slaveId, System.Nullable<System.Guid> userId, string exception);
     1608       
     1609        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/StopJob", ReplyAction="http://tempuri.org/IHiveService/StopJobResponse")]
     1610        void StopJob(System.Guid jobId);
     1611       
     1612        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/PauseJob", ReplyAction="http://tempuri.org/IHiveService/PauseJobResponse")]
     1613        void PauseJob(System.Guid jobId);
     1614       
     1615        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetHiveExperiment", ReplyAction="http://tempuri.org/IHiveService/GetHiveExperimentResponse")]
     1616        HeuristicLab.Clients.Hive.HiveExperiment GetHiveExperiment(System.Guid id);
     1617       
     1618        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetHiveExperiments", ReplyAction="http://tempuri.org/IHiveService/GetHiveExperimentsResponse")]
     1619        System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetHiveExperiments();
     1620       
     1621        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetAllHiveExperiments", ReplyAction="http://tempuri.org/IHiveService/GetAllHiveExperimentsResponse")]
     1622        System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetAllHiveExperiments();
     1623       
     1624        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddHiveExperiment", ReplyAction="http://tempuri.org/IHiveService/AddHiveExperimentResponse")]
     1625        System.Guid AddHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto);
     1626       
     1627        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/UpdateHiveExperiment", ReplyAction="http://tempuri.org/IHiveService/UpdateHiveExperimentResponse")]
     1628        void UpdateHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto);
     1629       
     1630        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/DeleteHiveExperiment", ReplyAction="http://tempuri.org/IHiveService/DeleteHiveExperimentResponse")]
     1631        void DeleteHiveExperiment(System.Guid hiveExperimentId);
     1632       
     1633        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/Hello", ReplyAction="http://tempuri.org/IHiveService/HelloResponse")]
     1634        void Hello(HeuristicLab.Clients.Hive.Slave slave);
     1635       
     1636        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GoodBye", ReplyAction="http://tempuri.org/IHiveService/GoodByeResponse")]
     1637        void GoodBye(System.Guid slaveId);
     1638       
     1639        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/Heartbeat", ReplyAction="http://tempuri.org/IHiveService/HeartbeatResponse")]
     1640        System.Collections.Generic.List<HeuristicLab.Clients.Hive.MessageContainer> Heartbeat([System.ServiceModel.MessageParameterAttribute(Name="heartbeat")] HeuristicLab.Clients.Hive.Heartbeat heartbeat1);
     1641       
     1642        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddPlugin", ReplyAction="http://tempuri.org/IHiveService/AddPluginResponse")]
     1643        System.Guid AddPlugin(HeuristicLab.Clients.Hive.Plugin plugin, System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> pluginData);
     1644       
     1645        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetPlugins", ReplyAction="http://tempuri.org/IHiveService/GetPluginsResponse")]
     1646        System.Collections.Generic.List<HeuristicLab.Clients.Hive.Plugin> GetPlugins();
     1647       
     1648        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetPluginDatas", ReplyAction="http://tempuri.org/IHiveService/GetPluginDatasResponse")]
     1649        System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> GetPluginDatas(System.Collections.Generic.List<System.Guid> pluginIds);
     1650       
     1651        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddSlave", ReplyAction="http://tempuri.org/IHiveService/AddSlaveResponse")]
     1652        System.Guid AddSlave(HeuristicLab.Clients.Hive.Slave slave);
     1653       
     1654        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddSlaveGroup", ReplyAction="http://tempuri.org/IHiveService/AddSlaveGroupResponse")]
     1655        System.Guid AddSlaveGroup(HeuristicLab.Clients.Hive.SlaveGroup slaveGroup);
     1656       
     1657        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetSlave", ReplyAction="http://tempuri.org/IHiveService/GetSlaveResponse")]
     1658        HeuristicLab.Clients.Hive.Slave GetSlave(System.Guid slaveId);
     1659       
    15641660        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetSlaveGroup", ReplyAction="http://tempuri.org/IHiveService/GetSlaveGroupResponse")]
    15651661        HeuristicLab.Clients.Hive.SlaveGroup GetSlaveGroup(System.Guid slaveGroupId);
     
    15931689       
    15941690        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/TriggerLifecycle", ReplyAction="http://tempuri.org/IHiveService/TriggerLifecycleResponse")]
    1595         void TriggerLifecycle();
     1691        void TriggerLifecycle(bool force);
    15961692       
    15971693        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddAppointment", ReplyAction="http://tempuri.org/IHiveService/AddAppointmentResponse")]
     
    16001696        [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/DeleteAppointment", ReplyAction="http://tempuri.org/IHiveService/DeleteAppointmentResponse")]
    16011697        void DeleteAppointment(System.Guid appointmentId);
    1602        
    1603         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/UpdateAppointment", ReplyAction="http://tempuri.org/IHiveService/UpdateAppointmentResponse")]
    1604         void UpdateAppointment(HeuristicLab.Clients.Hive.Appointment appointment);
    1605        
    1606         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetScheduleForResource", ReplyAction="http://tempuri.org/IHiveService/GetScheduleForResourceResponse")]
    1607         System.Collections.Generic.List<HeuristicLab.Clients.Hive.Appointment> GetScheduleForResource(System.Guid resourceId);
    1608        
    1609         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddJob", ReplyAction="http://tempuri.org/IHiveService/AddJobResponse")]
    1610         System.Guid AddJob(HeuristicLab.Clients.Hive.Job job, HeuristicLab.Clients.Hive.JobData jobData, System.Collections.Generic.List<System.Guid> resourceIds);
    1611        
    1612         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddChildJob", ReplyAction="http://tempuri.org/IHiveService/AddChildJobResponse")]
    1613         System.Guid AddChildJob(System.Guid parentJobId, HeuristicLab.Clients.Hive.Job job, HeuristicLab.Clients.Hive.JobData jobData);
    1614        
    1615         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetJob", ReplyAction="http://tempuri.org/IHiveService/GetJobResponse")]
    1616         HeuristicLab.Clients.Hive.Job GetJob(System.Guid jobId);
    1617        
    1618         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetJobs", ReplyAction="http://tempuri.org/IHiveService/GetJobsResponse")]
    1619         System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetJobs();
    1620        
    1621         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetLightweightJobs", ReplyAction="http://tempuri.org/IHiveService/GetLightweightJobsResponse")]
    1622         System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightJob> GetLightweightJobs(System.Collections.Generic.List<System.Guid> jobIds);
    1623        
    1624         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetLightweightChildJobs", ReplyAction="http://tempuri.org/IHiveService/GetLightweightChildJobsResponse")]
    1625         System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightJob> GetLightweightChildJobs(System.Nullable<System.Guid> parentJobId, bool recursive, bool includeParent);
    1626        
    1627         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetJobData", ReplyAction="http://tempuri.org/IHiveService/GetJobDataResponse")]
    1628         HeuristicLab.Clients.Hive.JobData GetJobData(System.Guid jobId);
    1629        
    1630         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/UpdateJob", ReplyAction="http://tempuri.org/IHiveService/UpdateJobResponse")]
    1631         void UpdateJob(HeuristicLab.Clients.Hive.Job jobDto);
    1632        
    1633         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/UpdateJobData", ReplyAction="http://tempuri.org/IHiveService/UpdateJobDataResponse")]
    1634         void UpdateJobData(HeuristicLab.Clients.Hive.Job jobDto, HeuristicLab.Clients.Hive.JobData jobDataDto);
    1635        
    1636         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/DeleteJob", ReplyAction="http://tempuri.org/IHiveService/DeleteJobResponse")]
    1637         void DeleteJob(System.Guid jobId);
    1638        
    1639         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/DeleteChildJobs", ReplyAction="http://tempuri.org/IHiveService/DeleteChildJobsResponse")]
    1640         void DeleteChildJobs(System.Guid parentJobId);
    1641        
    1642         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/StopJob", ReplyAction="http://tempuri.org/IHiveService/StopJobResponse")]
    1643         void StopJob(System.Guid jobId);
    1644        
    1645         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/PauseJob", ReplyAction="http://tempuri.org/IHiveService/PauseJobResponse")]
    1646         void PauseJob(System.Guid jobId);
    1647        
    1648         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetHiveExperiment", ReplyAction="http://tempuri.org/IHiveService/GetHiveExperimentResponse")]
    1649         HeuristicLab.Clients.Hive.HiveExperiment GetHiveExperiment(System.Guid id);
    1650        
    1651         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetHiveExperiments", ReplyAction="http://tempuri.org/IHiveService/GetHiveExperimentsResponse")]
    1652         System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetHiveExperiments();
    1653        
    1654         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetAllHiveExperiments", ReplyAction="http://tempuri.org/IHiveService/GetAllHiveExperimentsResponse")]
    1655         System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetAllHiveExperiments();
    1656        
    1657         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddHiveExperiment", ReplyAction="http://tempuri.org/IHiveService/AddHiveExperimentResponse")]
    1658         System.Guid AddHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto);
    1659        
    1660         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/UpdateHiveExperiment", ReplyAction="http://tempuri.org/IHiveService/UpdateHiveExperimentResponse")]
    1661         void UpdateHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto);
    1662        
    1663         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/DeleteHiveExperiment", ReplyAction="http://tempuri.org/IHiveService/DeleteHiveExperimentResponse")]
    1664         void DeleteHiveExperiment(System.Guid hiveExperimentId);
    1665        
    1666         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/Hello", ReplyAction="http://tempuri.org/IHiveService/HelloResponse")]
    1667         void Hello(HeuristicLab.Clients.Hive.Slave slave);
    1668        
    1669         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GoodBye", ReplyAction="http://tempuri.org/IHiveService/GoodByeResponse")]
    1670         void GoodBye(System.Guid slaveId);
    1671        
    1672         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/Heartbeat", ReplyAction="http://tempuri.org/IHiveService/HeartbeatResponse")]
    1673         System.Collections.Generic.List<HeuristicLab.Clients.Hive.MessageContainer> Heartbeat([System.ServiceModel.MessageParameterAttribute(Name="heartbeat")] HeuristicLab.Clients.Hive.Heartbeat heartbeat1);
    1674        
    1675         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddPlugin", ReplyAction="http://tempuri.org/IHiveService/AddPluginResponse")]
    1676         System.Guid AddPlugin(HeuristicLab.Clients.Hive.Plugin plugin, System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> pluginData);
    1677        
    1678         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetPlugins", ReplyAction="http://tempuri.org/IHiveService/GetPluginsResponse")]
    1679         System.Collections.Generic.List<HeuristicLab.Clients.Hive.Plugin> GetPlugins();
    1680        
    1681         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetPluginDatas", ReplyAction="http://tempuri.org/IHiveService/GetPluginDatasResponse")]
    1682         System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> GetPluginDatas(System.Collections.Generic.List<System.Guid> pluginIds);
    1683        
    1684         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddSlave", ReplyAction="http://tempuri.org/IHiveService/AddSlaveResponse")]
    1685         System.Guid AddSlave(HeuristicLab.Clients.Hive.Slave slave);
    1686        
    1687         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddSlaveGroup", ReplyAction="http://tempuri.org/IHiveService/AddSlaveGroupResponse")]
    1688         System.Guid AddSlaveGroup(HeuristicLab.Clients.Hive.SlaveGroup slaveGroup);
    1689        
    1690         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetSlave", ReplyAction="http://tempuri.org/IHiveService/GetSlaveResponse")]
    1691         HeuristicLab.Clients.Hive.Slave GetSlave(System.Guid slaveId);
    16921698    }
    16931699   
     
    17261732        }
    17271733       
     1734        public void UpdateAppointment(HeuristicLab.Clients.Hive.Appointment appointment)
     1735        {
     1736            base.Channel.UpdateAppointment(appointment);
     1737        }
     1738       
     1739        public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Appointment> GetScheduleForResource(System.Guid resourceId)
     1740        {
     1741            return base.Channel.GetScheduleForResource(resourceId);
     1742        }
     1743       
     1744        public System.Guid AddJob(HeuristicLab.Clients.Hive.Job job, HeuristicLab.Clients.Hive.JobData jobData, System.Collections.Generic.List<System.Guid> resourceIds)
     1745        {
     1746            return base.Channel.AddJob(job, jobData, resourceIds);
     1747        }
     1748       
     1749        public System.Guid AddChildJob(System.Guid parentJobId, HeuristicLab.Clients.Hive.Job job, HeuristicLab.Clients.Hive.JobData jobData)
     1750        {
     1751            return base.Channel.AddChildJob(parentJobId, job, jobData);
     1752        }
     1753       
     1754        public HeuristicLab.Clients.Hive.Job GetJob(System.Guid jobId)
     1755        {
     1756            return base.Channel.GetJob(jobId);
     1757        }
     1758       
     1759        public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetJobs()
     1760        {
     1761            return base.Channel.GetJobs();
     1762        }
     1763       
     1764        public System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightJob> GetLightweightJobs(System.Collections.Generic.List<System.Guid> jobIds)
     1765        {
     1766            return base.Channel.GetLightweightJobs(jobIds);
     1767        }
     1768       
     1769        public System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightJob> GetLightweightChildJobs(System.Nullable<System.Guid> parentJobId, bool recursive, bool includeParent)
     1770        {
     1771            return base.Channel.GetLightweightChildJobs(parentJobId, recursive, includeParent);
     1772        }
     1773       
     1774        public HeuristicLab.Clients.Hive.JobData GetJobData(System.Guid jobId)
     1775        {
     1776            return base.Channel.GetJobData(jobId);
     1777        }
     1778       
     1779        public void UpdateJob(HeuristicLab.Clients.Hive.Job jobDto)
     1780        {
     1781            base.Channel.UpdateJob(jobDto);
     1782        }
     1783       
     1784        public void UpdateJobData(HeuristicLab.Clients.Hive.Job jobDto, HeuristicLab.Clients.Hive.JobData jobDataDto)
     1785        {
     1786            base.Channel.UpdateJobData(jobDto, jobDataDto);
     1787        }
     1788       
     1789        public void DeleteJob(System.Guid jobId)
     1790        {
     1791            base.Channel.DeleteJob(jobId);
     1792        }
     1793       
     1794        public void DeleteChildJobs(System.Guid parentJobId)
     1795        {
     1796            base.Channel.DeleteChildJobs(parentJobId);
     1797        }
     1798       
     1799        public HeuristicLab.Clients.Hive.Job UpdateJobState(System.Guid jobId, HeuristicLab.Clients.Hive.JobState jobState, System.Nullable<System.Guid> slaveId, System.Nullable<System.Guid> userId, string exception)
     1800        {
     1801            return base.Channel.UpdateJobState(jobId, jobState, slaveId, userId, exception);
     1802        }
     1803       
     1804        public void StopJob(System.Guid jobId)
     1805        {
     1806            base.Channel.StopJob(jobId);
     1807        }
     1808       
     1809        public void PauseJob(System.Guid jobId)
     1810        {
     1811            base.Channel.PauseJob(jobId);
     1812        }
     1813       
     1814        public HeuristicLab.Clients.Hive.HiveExperiment GetHiveExperiment(System.Guid id)
     1815        {
     1816            return base.Channel.GetHiveExperiment(id);
     1817        }
     1818       
     1819        public System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetHiveExperiments()
     1820        {
     1821            return base.Channel.GetHiveExperiments();
     1822        }
     1823       
     1824        public System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetAllHiveExperiments()
     1825        {
     1826            return base.Channel.GetAllHiveExperiments();
     1827        }
     1828       
     1829        public System.Guid AddHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto)
     1830        {
     1831            return base.Channel.AddHiveExperiment(hiveExperimentDto);
     1832        }
     1833       
     1834        public void UpdateHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto)
     1835        {
     1836            base.Channel.UpdateHiveExperiment(hiveExperimentDto);
     1837        }
     1838       
     1839        public void DeleteHiveExperiment(System.Guid hiveExperimentId)
     1840        {
     1841            base.Channel.DeleteHiveExperiment(hiveExperimentId);
     1842        }
     1843       
     1844        public void Hello(HeuristicLab.Clients.Hive.Slave slave)
     1845        {
     1846            base.Channel.Hello(slave);
     1847        }
     1848       
     1849        public void GoodBye(System.Guid slaveId)
     1850        {
     1851            base.Channel.GoodBye(slaveId);
     1852        }
     1853       
     1854        public System.Collections.Generic.List<HeuristicLab.Clients.Hive.MessageContainer> Heartbeat(HeuristicLab.Clients.Hive.Heartbeat heartbeat1)
     1855        {
     1856            return base.Channel.Heartbeat(heartbeat1);
     1857        }
     1858       
     1859        public System.Guid AddPlugin(HeuristicLab.Clients.Hive.Plugin plugin, System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> pluginData)
     1860        {
     1861            return base.Channel.AddPlugin(plugin, pluginData);
     1862        }
     1863       
     1864        public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Plugin> GetPlugins()
     1865        {
     1866            return base.Channel.GetPlugins();
     1867        }
     1868       
     1869        public System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> GetPluginDatas(System.Collections.Generic.List<System.Guid> pluginIds)
     1870        {
     1871            return base.Channel.GetPluginDatas(pluginIds);
     1872        }
     1873       
     1874        public System.Guid AddSlave(HeuristicLab.Clients.Hive.Slave slave)
     1875        {
     1876            return base.Channel.AddSlave(slave);
     1877        }
     1878       
     1879        public System.Guid AddSlaveGroup(HeuristicLab.Clients.Hive.SlaveGroup slaveGroup)
     1880        {
     1881            return base.Channel.AddSlaveGroup(slaveGroup);
     1882        }
     1883       
     1884        public HeuristicLab.Clients.Hive.Slave GetSlave(System.Guid slaveId)
     1885        {
     1886            return base.Channel.GetSlave(slaveId);
     1887        }
     1888       
    17281889        public HeuristicLab.Clients.Hive.SlaveGroup GetSlaveGroup(System.Guid slaveGroupId)
    17291890        {
     
    17761937        }
    17771938       
    1778         public void TriggerLifecycle()
    1779         {
    1780             base.Channel.TriggerLifecycle();
     1939        public void TriggerLifecycle(bool force)
     1940        {
     1941            base.Channel.TriggerLifecycle(force);
    17811942        }
    17821943       
     
    17901951            base.Channel.DeleteAppointment(appointmentId);
    17911952        }
    1792        
    1793         public void UpdateAppointment(HeuristicLab.Clients.Hive.Appointment appointment)
    1794         {
    1795             base.Channel.UpdateAppointment(appointment);
    1796         }
    1797        
    1798         public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Appointment> GetScheduleForResource(System.Guid resourceId)
    1799         {
    1800             return base.Channel.GetScheduleForResource(resourceId);
    1801         }
    1802        
    1803         public System.Guid AddJob(HeuristicLab.Clients.Hive.Job job, HeuristicLab.Clients.Hive.JobData jobData, System.Collections.Generic.List<System.Guid> resourceIds)
    1804         {
    1805             return base.Channel.AddJob(job, jobData, resourceIds);
    1806         }
    1807        
    1808         public System.Guid AddChildJob(System.Guid parentJobId, HeuristicLab.Clients.Hive.Job job, HeuristicLab.Clients.Hive.JobData jobData)
    1809         {
    1810             return base.Channel.AddChildJob(parentJobId, job, jobData);
    1811         }
    1812        
    1813         public HeuristicLab.Clients.Hive.Job GetJob(System.Guid jobId)
    1814         {
    1815             return base.Channel.GetJob(jobId);
    1816         }
    1817        
    1818         public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Job> GetJobs()
    1819         {
    1820             return base.Channel.GetJobs();
    1821         }
    1822        
    1823         public System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightJob> GetLightweightJobs(System.Collections.Generic.List<System.Guid> jobIds)
    1824         {
    1825             return base.Channel.GetLightweightJobs(jobIds);
    1826         }
    1827        
    1828         public System.Collections.Generic.List<HeuristicLab.Clients.Hive.LightweightJob> GetLightweightChildJobs(System.Nullable<System.Guid> parentJobId, bool recursive, bool includeParent)
    1829         {
    1830             return base.Channel.GetLightweightChildJobs(parentJobId, recursive, includeParent);
    1831         }
    1832        
    1833         public HeuristicLab.Clients.Hive.JobData GetJobData(System.Guid jobId)
    1834         {
    1835             return base.Channel.GetJobData(jobId);
    1836         }
    1837        
    1838         public void UpdateJob(HeuristicLab.Clients.Hive.Job jobDto)
    1839         {
    1840             base.Channel.UpdateJob(jobDto);
    1841         }
    1842        
    1843         public void UpdateJobData(HeuristicLab.Clients.Hive.Job jobDto, HeuristicLab.Clients.Hive.JobData jobDataDto)
    1844         {
    1845             base.Channel.UpdateJobData(jobDto, jobDataDto);
    1846         }
    1847        
    1848         public void DeleteJob(System.Guid jobId)
    1849         {
    1850             base.Channel.DeleteJob(jobId);
    1851         }
    1852        
    1853         public void DeleteChildJobs(System.Guid parentJobId)
    1854         {
    1855             base.Channel.DeleteChildJobs(parentJobId);
    1856         }
    1857        
    1858         public void StopJob(System.Guid jobId)
    1859         {
    1860             base.Channel.StopJob(jobId);
    1861         }
    1862        
    1863         public void PauseJob(System.Guid jobId)
    1864         {
    1865             base.Channel.PauseJob(jobId);
    1866         }
    1867        
    1868         public HeuristicLab.Clients.Hive.HiveExperiment GetHiveExperiment(System.Guid id)
    1869         {
    1870             return base.Channel.GetHiveExperiment(id);
    1871         }
    1872        
    1873         public System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetHiveExperiments()
    1874         {
    1875             return base.Channel.GetHiveExperiments();
    1876         }
    1877        
    1878         public System.Collections.Generic.List<HeuristicLab.Clients.Hive.HiveExperiment> GetAllHiveExperiments()
    1879         {
    1880             return base.Channel.GetAllHiveExperiments();
    1881         }
    1882        
    1883         public System.Guid AddHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto)
    1884         {
    1885             return base.Channel.AddHiveExperiment(hiveExperimentDto);
    1886         }
    1887        
    1888         public void UpdateHiveExperiment(HeuristicLab.Clients.Hive.HiveExperiment hiveExperimentDto)
    1889         {
    1890             base.Channel.UpdateHiveExperiment(hiveExperimentDto);
    1891         }
    1892        
    1893         public void DeleteHiveExperiment(System.Guid hiveExperimentId)
    1894         {
    1895             base.Channel.DeleteHiveExperiment(hiveExperimentId);
    1896         }
    1897        
    1898         public void Hello(HeuristicLab.Clients.Hive.Slave slave)
    1899         {
    1900             base.Channel.Hello(slave);
    1901         }
    1902        
    1903         public void GoodBye(System.Guid slaveId)
    1904         {
    1905             base.Channel.GoodBye(slaveId);
    1906         }
    1907        
    1908         public System.Collections.Generic.List<HeuristicLab.Clients.Hive.MessageContainer> Heartbeat(HeuristicLab.Clients.Hive.Heartbeat heartbeat1)
    1909         {
    1910             return base.Channel.Heartbeat(heartbeat1);
    1911         }
    1912        
    1913         public System.Guid AddPlugin(HeuristicLab.Clients.Hive.Plugin plugin, System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> pluginData)
    1914         {
    1915             return base.Channel.AddPlugin(plugin, pluginData);
    1916         }
    1917        
    1918         public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Plugin> GetPlugins()
    1919         {
    1920             return base.Channel.GetPlugins();
    1921         }
    1922        
    1923         public System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> GetPluginDatas(System.Collections.Generic.List<System.Guid> pluginIds)
    1924         {
    1925             return base.Channel.GetPluginDatas(pluginIds);
    1926         }
    1927        
    1928         public System.Guid AddSlave(HeuristicLab.Clients.Hive.Slave slave)
    1929         {
    1930             return base.Channel.AddSlave(slave);
    1931         }
    1932        
    1933         public System.Guid AddSlaveGroup(HeuristicLab.Clients.Hive.SlaveGroup slaveGroup)
    1934         {
    1935             return base.Channel.AddSlaveGroup(slaveGroup);
    1936         }
    1937        
    1938         public HeuristicLab.Clients.Hive.Slave GetSlave(System.Guid slaveId)
    1939         {
    1940             return base.Channel.GetSlave(slaveId);
    1941         }
    19421953    }
    19431954}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/JobState.cs

    r5526 r5636  
    5454   
    5555    /// <summary>
     56    /// Job is paused, will not be picked up by slaves
     57    /// </summary>
     58    Paused,
     59
     60    /// <summary>
    5661    /// Job as finished and is ready to be collected by the Client
    5762    /// </summary>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/LightweightJob.cs

    r5614 r5636  
    5353      this.State = job.State;
    5454    }
    55 
    56 
    57     public void SetState(JobState state) {
    58       this.State = state;
    59       this.StateLog.Add(new StateLog() { State = state, DateTime = DateTime.Now });
    60     }
    61 
    62     public void SetState(JobState state, Guid userId) {
    63       this.State = state;
    64       this.StateLog.Add(new StateLog() { State = state, DateTime = DateTime.Now, UserId = userId });
    65     }
    66 
    67     public void SetState(JobState state, Guid slaveId, string exception) {
    68       this.State = state;
    69       this.StateLog.Add(new StateLog() { State = state, DateTime = DateTime.Now, SlaveId = slaveId, Exception = exception });
    70     }
    7155  }
    7256}
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/HeuristicLab.Services.Hive.Common-3.4.csproj

    r5614 r5636  
    124124    <None Include="HeuristicLab.snk" />
    125125  </ItemGroup>
     126  <ItemGroup>
     127    <Folder Include="obj\" />
     128  </ItemGroup>
    126129  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
    127130  <PropertyGroup>
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ServiceContracts/IHiveService.cs

    r5633 r5636  
    4343    [OperationContract]
    4444    void DeleteChildJobs(Guid parentJobId);
     45
     46    [OperationContract]
     47    Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception);
    4548    #endregion
    4649
     
    143146
    144147    [OperationContract]
    145     void TriggerLifecycle();
     148    void TriggerLifecycle(bool force);
    146149    #endregion
    147150
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDao.cs

    r5633 r5636  
    126126      }
    127127    }
     128
     129    public DT.Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception) {
     130      using (var db = CreateContext()) {
     131        var job = db.Jobs.SingleOrDefault(x => x.JobId == jobId);
     132        job.State = jobState;
     133        db.StateLogs.InsertOnSubmit(new StateLog {
     134          JobId = jobId,
     135          State = jobState,
     136          SlaveId = slaveId,
     137          UserId = userId,
     138          Exception = exception,
     139          DateTime = DateTime.Now
     140        });
     141        db.SubmitChanges();
     142        job = db.Jobs.SingleOrDefault(x => x.JobId == jobId);
     143        return Convert.ToDto(job);
     144      }
     145    }
    128146    #endregion
    129147
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Interfaces/IHiveDao.cs

    r5633 r5636  
    1616    IEnumerable<DT.Job> GetWaitingJobs(DT.Slave slave, int count);
    1717    IEnumerable<DT.Job> GetParentJobs(IEnumerable<Guid> resourceIds, int count, bool finished);
     18    DT.Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception);
    1819    #endregion
    1920
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/DaoTests.cs

    r5526 r5636  
    2828
    2929      DT.Job job1 = new DT.Job();
    30       job1.SetState(JobState.Offline, Guid.NewGuid());
     30      job1.State = JobState.Offline;
     31      job1.StateLog.Add(new DT.StateLog { State = JobState.Offline, DateTime = DateTime.Now });
    3132
    3233      DT.Plugin plugin1 = new DT.Plugin();
     
    6970
    7071      // test jobstates
    71       job1.SetState(JobState.Transferring); Thread.Sleep(10);
    72       job1.SetState(JobState.Calculating); Thread.Sleep(10);
    73       job1.SetState(JobState.Transferring); Thread.Sleep(10);
    74       job1.SetState(JobState.Finished); Thread.Sleep(10);
     72      job1.StateLog.Add(new DT.StateLog { State = JobState.Transferring, DateTime = DateTime.Now }); Thread.Sleep(10);
     73      job1.StateLog.Add(new DT.StateLog { State = JobState.Calculating, DateTime = DateTime.Now }); Thread.Sleep(10);
     74      job1.StateLog.Add(new DT.StateLog { State = JobState.Transferring, DateTime = DateTime.Now }); Thread.Sleep(10);
     75      job1.StateLog.Add(new DT.StateLog { State = JobState.Finished, DateTime = DateTime.Now }); Thread.Sleep(10);
    7576      dao.UpdateJob(job1);
    7677
     
    170171
    171172      DT.Job job = new DT.Job();
    172       job.SetState(JobState.Offline, Guid.NewGuid());
     173      job.State = JobState.Offline;
     174      job.StateLog.Add(new DT.StateLog { State = JobState.Offline, DateTime = DateTime.Now });
    173175      job.Id = dao.AddJob(job);
    174176
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/ServiceTests.cs

    r5593 r5636  
    6161        Priority = 0
    6262      };
    63       job.SetState(JobState.Offline);
     63      job.State = JobState.Offline;
     64      job.StateLog.Add(new StateLog { State = JobState.Offline, DateTime = DateTime.Now });
    6465
    6566      DT.JobData jobData = new DT.JobData() {
     
    135136      Assert.AreEqual(JobState.Transferring, jobLoaded.State);
    136137
     138      // slave is responsible for updating state to 'Calculating'
     139      service.UpdateJobState(jobLoaded.Id, JobState.Calculating, slave.Id, null, null);
     140
    137141      // send progress
    138142      var progress = new Dictionary<Guid, TimeSpan>();
     
    183187        FinishWhenChildJobsFinished = true
    184188      };
    185       parentJob.SetState(JobState.Offline);
     189      parentJob.State = JobState.Offline;
     190      parentJob.StateLog.Add(new StateLog { State = JobState.Offline, DateTime = DateTime.Now });
    186191
    187192      DT.JobData parentJobData = new DT.JobData() { Data = new byte[0] };
     
    193198        Priority = 0
    194199      };
    195       parentJob.SetState(JobState.Offline);
     200      childJob.State = JobState.Offline;
     201      childJob.StateLog.Add(new StateLog { State = JobState.Offline, DateTime = DateTime.Now });
    196202
    197203      DT.JobData childJobData = new DT.JobData() { Data = new byte[1000] };
     
    241247
    242248      // lifecycle - let it process one server-heartbeat; the parent job must NOT be set to finished
    243       service.TriggerLifecycle();
     249      service.TriggerLifecycle(true);
    244250
    245251      parentJobLoaded = service.GetJob(parentJob.Id);
     
    247253
    248254      // set child job to finished
    249       childJobLoaded.SetState(JobState.Finished, slave.Id, "");
    250       service.UpdateJob(childJobLoaded);
     255      childJobLoaded = service.UpdateJobState(childJobLoaded.Id, JobState.Finished, slave.Id, null, null);
    251256
    252257      // lifecycle - let it process one server-heartbeat; this should set the parent job to finished
    253       service.TriggerLifecycle();
     258      service.TriggerLifecycle(true);
    254259
    255260      // test if parent job is finished
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HeartbeatManager.cs

    r5511 r5636  
    5353
    5454    private void AssignJob(Slave slave, Job job) {
    55       job.SetState(JobState.Transferring, slave.Id, "");
    56       dao.UpdateJob(job);
     55      dao.UpdateJobState(job.Id, JobState.Transferring, slave.Id, null, null);
    5756      dao.UpdateSlave(slave);
    5857    }
     
    8887              // a request to abort the job has been set
    8988              actions.Add(new MessageContainer(MessageContainer.MessageType.AbortJob, curJob.Id));
    90             } else if (curJob.State != JobState.Calculating) {
    91               // jobstate was 'Transferring' before, now calculating
    92               curJob.SetState(JobState.Calculating, heartbeat.SlaveId, "");
    9389            }
    9490            dao.UpdateJob(curJob);
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs

    r5633 r5636  
    3636    public Guid AddJob(Job job, JobData jobData, IEnumerable<Guid> resourceIds) {
    3737      using (trans.OpenTransaction()) {
    38         job.SetState(JobState.Waiting, auth.UserId);
    3938        job.Id = dao.AddJob(job);
    4039        jobData.JobId = job.Id;
     
    4847        }
    4948        dao.AddJobData(jobData);
     49        dao.UpdateJobState(job.Id, JobState.Waiting, null, auth.UserId, null);
    5050        return jobData.JobId;
    5151      }
     
    135135    }
    136136
     137    // [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     138    // [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     139    // [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)]
     140    public Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception) {
     141      using (trans.OpenTransaction()) {
     142        return dao.UpdateJobState(jobId, jobState, slaveId, userId, exception);
     143      }
     144    }
    137145    #endregion
    138146
     
    235243    // [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Slave)]
    236244    public List<MessageContainer> Heartbeat(Heartbeat heartbeat) {
    237       TriggerLifecycle();
     245      TriggerLifecycle(false);
    238246
    239247      using (trans.OpenTransaction()) {
     
    391399    }
    392400
    393     public void TriggerLifecycle() {
     401    public void TriggerLifecycle(bool force) {
    394402      using (trans.OpenTransaction()) {
    395403        DateTime lastCleanup = dao.GetLastCleanup();
    396         if (DateTime.Now - lastCleanup > TimeSpan.FromSeconds(59)) {
     404        if (force || DateTime.Now - lastCleanup > TimeSpan.FromSeconds(59)) {
    397405          dao.SetLastCleanup(DateTime.Now);
    398406          lifecycleManager.Cleanup();
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/LifecycleManager.cs

    r5593 r5636  
    4848      var parentJobsToFinish = dao.GetParentJobs(dao.GetResources(x => true).Select(x => x.Id), 0, true);
    4949      foreach (var job in parentJobsToFinish) {
    50         job.SetState(JobState.Finished);
    51         dao.UpdateJob(job);
     50        dao.UpdateJobState(job.Id, JobState.Finished, null, null, string.Empty);
    5251      }
    5352    }
Note: See TracChangeset for help on using the changeset viewer.