diff options
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewSlot.java')
| -rw-r--r-- | src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewSlot.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewSlot.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewSlot.java index a482a43..facf7e1 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewSlot.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewSlot.java @@ -49,8 +49,9 @@ public class AddNewSlot extends PredefinedStep * Creates a new slot in the given aggregation, that holds instances of the given item description
*
* Params:
- * 0 - collection name
- * 1 - Item Description key (optional)
+ * <ol><li>Collection name</li>
+ * <li>Item Description key (optional)</li>
+ * </ol>
*/
@Override
protected String runActivityLogic(AgentPath agent, ItemPath item,
@@ -64,9 +65,10 @@ public class AddNewSlot extends PredefinedStep String[] params = getDataList(requestData);
if (Logger.doLog(3)) Logger.msg(3, "AddNewSlot: called by "+agent+" on "+item+" with parameters "+Arrays.toString(params));
+ // resolve desc item path and version
try {
collName = params[0];
- if (params.length > 1 && params[1].length() > 0) descKey = new ItemPath(params[1]);
+ if (params.length > 1 && params[1].length() > 0) descKey = new ItemPath(params[1]);
} catch (Exception e) {
throw new InvalidDataException("AddNewSlot: Invalid parameters "+Arrays.toString(params), "");
}
@@ -90,7 +92,7 @@ public class AddNewSlot extends PredefinedStep if (descKey != null) {
PropertyDescriptionList propList;
try {
- propList = PropertyUtility.getPropertyDescriptionOutcome(descKey);
+ propList = PropertyUtility.getPropertyDescriptionOutcome(descKey, "last");
} catch (ObjectNotFoundException e) {
throw new InvalidDataException("AddNewSlot: Item "+descKey+" does not contain a PropertyDescription outcome to define a slot", "");
}
|
