diff options
| -rw-r--r-- | src/main/resources/boot/SC/SetWorkflow.xml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/resources/boot/SC/SetWorkflow.xml b/src/main/resources/boot/SC/SetWorkflow.xml index 3dd5910..0b4b68a 100644 --- a/src/main/resources/boot/SC/SetWorkflow.xml +++ b/src/main/resources/boot/SC/SetWorkflow.xml @@ -2,7 +2,8 @@ <cristalscript>
<output name="errors" type="org.cristalise.kernel.scripting.ErrorInfo" />
<script language="javascript" name="SetWorkflow"><![CDATA[
-
// Fetch the requested name from the outcome field
+ importClass(org.cristalise.kernel.utils.CastorHashMap);
+
// Fetch the requested name from the outcome field
var wfDefName = job.getOutcome().getField("WorkflowDefinitionName");
var wfDefVersion = job.getOutcome().getField("WorkflowDefinitionVersion");
@@ -40,9 +41,12 @@ }
// add the new member
- var params = new Array(2);
+ var params = new Array(3);
+ var newProps = new CastorHashMap();
+ newProps.put("Version", wfDefVersion);
params[0] = "workflow";
params[1] = wfItem.getPath();
+ params[2] = agent.marshall(newProps);
agent.execute(item, "AddMemberToCollection", params);
]]></script>
|
