05-26-2014 04:29 AM
05-26-2014 05:32 AM
06-04-2014 04:35 AM
var taskId = "activiti$" + task.getId();
bpm_package.children[j].properties['cm:description']+= workflow.getTask(taskId).getProperties()["bpm:comment"];
<expression>
comment = "";
if (token.comments.size() > 0)
comment = token.comments.get(0).message;
</expression>
<variable name="comment" access="write"/>
bpm_package.children[j].properties['cm:description'] = comment;
bpm_package.children[j].save();
06-05-2014 06:20 AM
06-11-2014 11:51 AM
<userTask id="approved" name="Document Approved"
activiti:formKey="wf:approvedParallelTask" >
<documentation>
The document was reviewed and approved.
</documentation>
<extensionElements>
<activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (typeof bpm_workflowDueDate != 'undefined') task.dueDate = bpm_workflowDueDate
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;
// Set parallel review params on task, to be kept in history
task.setVariableLocal('wf_reviewerCount', wf_reviewerCount);
task.setVariableLocal('wf_requiredPercent', wf_requiredPercent);
task.setVariableLocal('wf_actualPercent', wf_actualPercent);
task.setVariableLocal('wf_approveCount', wf_approveCount);
for(var j=0; j<bpm_package.children.length; j++)
{
if(bpm_package.children[j].properties['cm:description'] == "EN COURS D'APPROBATION")
{
if(wf_actualPercent == 100)
{
bpm_package.children[j].properties['cm:description'] = "APPLICABLE";
bpm_package.children[j].save();
var doc = bpm_package.children[j];
doc.addAspect("cm:versionable");
var tmp = doc.checkout();
doc = tmp.checkin("Document applicable",true);
bpm_package.children[j] = doc
}
}
else
{
if(wf_actualPercent == 100)
{
bpm_package.children[j].properties['cm:description'] = "EN COURS D'APPROBATION";
bpm_package.children[j].save();
}
}
var comment = "";
if (token.comments.size() > 0)
comment = token.comments.get(0).message;
var doc= bpm_package.children[j];
doc.properties['cm:description'] = comment;
doc.save();
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.