right now I am working on alfresco share preview 2.
there is no build in workflow that can assign multiple assignees, so i should do it by myself,
there is such code in assign_workflow.post.json.js
// Get the workflow definition
var workflowDefinition = workflow.getDefinitionByName(workflowName);
// Create the workflow package to contain the file nodes
var workflowPackage = workflow.createPackage();
if (assignees.length == 1)
{
workflowParameters["bpm:assignee"] = assignees[0];
}
else
{
workflowParameters["bpm:assignees"] = assignees;
}
var workflowPath = workflowDefinition.startWorkflow(workflowPackage, workflowParameters);
so when there multiple assignees, it will assign all the assignees array to workflowParameters["bpm:assignees"]
//process define
<start-state name="start">
<task name="wf:submitAdhocTask" swimlane="initiator"/>
<transition name="" to="adhoc"/>
</start-state>
//model define
<type name="wf:submitAdhocTask">
<parent>bpm:startTask</parent>
<properties>
<property name="wf:notifyMe">
<type>d:boolean</type>
<default>false</default>
</property>
</properties>
<mandatory-aspects>
<aspect>bpm:assignees</aspect>
</mandatory-aspects>
</type>
but the buildin adhoc workflow only have a mandatory aspect that accept one assignee, so I change the
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
</mandatory-aspects>
to
<mandatory-aspects>
<aspect>bpm:assignees</aspect>
</mandatory-aspects>
and when I try to assign workflow to multiple assignees, it will cause a cast class exception —–arraylist exception.
I have tries many method to find out the problem, but i failed.
what can i do to figure out the problem ?
anyone knows where the alfresco convert javascript array into java arraylist and then save into repository ???
where is the class that actually do these kind of work locate in ??
Thanks very much !