Index: branches/OKB/HeuristicLab.Clients.OKB-3.3/OKBClient.cs
===================================================================
--- branches/OKB/HeuristicLab.Clients.OKB-3.3/OKBClient.cs	(revision 4591)
+++ branches/OKB/HeuristicLab.Clients.OKB-3.3/OKBClient.cs	(revision 4918)
@@ -373,6 +373,5 @@
             parameters.Add(p);
           }
-          AlgorithmParameterValue value = null;
-          // TODO
+          AlgorithmParameterValue value = CreateAlgorithmParameterValue(param.Value);
           value.AlgorithmParameterId = p.Id;
           value.DataTypeId = ConvertToDataType(param.Value.GetType()).Id;
@@ -383,22 +382,75 @@
       }
       return values;
+    }
+    private AlgorithmParameterValue CreateAlgorithmParameterValue(IItem item) {
+      if (item is BoolValue) {
+        AlgorithmParameterBoolValue value = new AlgorithmParameterBoolValue();
+        value.Value = ((BoolValue)item).Value;
+        return value;
+      } else if (item is DoubleValue) {
+        AlgorithmParameterFloatValue value = new AlgorithmParameterFloatValue();
+        value.Value = ((DoubleValue)item).Value;
+        return value;
+      } else if (item is IntValue) {
+        AlgorithmParameterIntValue value = new AlgorithmParameterIntValue();
+        value.Value = ((IntValue)item).Value;
+        return value;
+      } else if (item is StringValue) {
+        AlgorithmParameterStringValue value = new AlgorithmParameterStringValue();
+        value.Value = ((StringValue)item).Value;
+        return value;
+      } else {
+        AlgorithmParameterBlobValue value = new AlgorithmParameterBlobValue();
+        value.Value = null;
+        return value;
+      }
     }
     private List<ProblemParameterValue> CollectProblemParamterValues(long problemId, ItemCollection<ProblemParameter> parameters, IParameterizedItem item, string prefix) {
       List<ProblemParameterValue> values = new List<ProblemParameterValue>();
       foreach (IValueParameter param in item.Parameters.OfType<IValueParameter>()) {
-        if (param.GetsCollected && (param.Value != null) && (parameters.FirstOrDefault(x => x.Name == prefix + param.Name) == null)) {
-          ProblemParameter p = new ProblemParameter();
-          p.Name = prefix + param.Name;
-          p.Alias = prefix + param.Name;
-          p.Description = param.Description;
-          p.ProblemId = problemId;
-          p.DataTypeId = ConvertToDataType(param.DataType).Id;
-          p.Store();
-          parameters.Add(p);
-        }
+        if (param.GetsCollected && (param.Value != null)) {
+          ProblemParameter p = parameters.FirstOrDefault(x => x.Name == prefix + param.Name);
+          if (p == null) {
+            p = new ProblemParameter();
+            p.Name = prefix + param.Name;
+            p.Alias = prefix + param.Name;
+            p.Description = param.Description;
+            p.ProblemId = problemId;
+            p.DataTypeId = ConvertToDataType(param.DataType).Id;
+            p.Store();
+            parameters.Add(p);
+          }
+          ProblemParameterValue value = CreateProblemParameterValue(param.Value);
+          value.ProblemParameterId = p.Id;
+          value.DataTypeId = ConvertToDataType(param.Value.GetType()).Id;
+        }
+
         if (param.Value is IParameterizedItem)
           values.AddRange(CollectProblemParamterValues(problemId, parameters, (IParameterizedItem)param.Value, (string.IsNullOrEmpty(prefix) ? param.Name : prefix + param.Name) + "."));
       }
       return values;
+    }
+    private ProblemParameterValue CreateProblemParameterValue(IItem item) {
+      if (item is BoolValue) {
+        ProblemParameterBoolValue value = new ProblemParameterBoolValue();
+        value.Value = ((BoolValue)item).Value;
+        return value;
+      } else if (item is DoubleValue) {
+        ProblemParameterFloatValue value = new ProblemParameterFloatValue();
+        value.Value = ((DoubleValue)item).Value;
+        return value;
+      } else if (item is IntValue) {
+        ProblemParameterIntValue value = new ProblemParameterIntValue();
+        value.Value = ((IntValue)item).Value;
+        return value;
+      } else if (item is StringValue) {
+        ProblemParameterStringValue value = new ProblemParameterStringValue();
+        value.Value = ((StringValue)item).Value;
+        return value;
+      } else {
+        ProblemParameterBlobValue value = new ProblemParameterBlobValue();
+        value.Value = null;
+        return value;
+      }
     }
     private List<ResultValue> CollectResultValues(long algorithmId, ItemCollection<Result> results, IAlgorithm algorithm) {
@@ -418,4 +470,27 @@
       return values;
     }
+    private ResultValue CreateResiötValue(IItem item) {
+      if (item is BoolValue) {
+        ResultBoolValue value = new ResultBoolValue();
+        value.Value = ((BoolValue)item).Value;
+        return value;
+      } else if (item is DoubleValue) {
+        ResultFloatValue value = new ResultFloatValue();
+        value.Value = ((DoubleValue)item).Value;
+        return value;
+      } else if (item is IntValue) {
+        ResultIntValue value = new ResultIntValue();
+        value.Value = ((IntValue)item).Value;
+        return value;
+      } else if (item is StringValue) {
+        ResultStringValue value = new ResultStringValue();
+        value.Value = ((StringValue)item).Value;
+        return value;
+      } else {
+        ResultBlobValue value = new ResultBlobValue();
+        value.Value = null;
+        return value;
+      }
+    }
     #endregion
 
