09-24-2012 10:26 PM
10-23-2012 06:12 PM
var cats = search.luceneSearch("PATH:\"/cm:generalclassifiable/cm:Languages/cm:French\"");
englishCatNode = cats[0];
var docs = search.luceneSearch("@cm\\:name:\"sample-a.pdf\"");
var doc = docs[0];
print(doc.name);
if (!doc.hasAspect("cm:generalclassifiable")) {
doc.addAspect("cm:generalclassifiable");
}
var currentCats = doc.properties['cm:categories'];
if (currentCats == null) {
currentCats = new Array();
}
currentCats.push(englishCatNode);
doc.properties['cm:categories'] = currentCats;
doc.save();
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string>
if (wf_requiredApprovePercent == wf_actualPercent)
{
var cats = search.luceneSearch("PATH:\"/cm:generalclassifiable/cm:Document_x0020_Review_x0020_Status/cm:Approved\"");
approvedCatNode = cats[0];
var doc = bpm_package.children[0];
if (!doc.hasAspect("cm:generalclassifiable")) {
doc.addAspect("cm:generalclassifiable");
}
var currentCats = doc.properties['cm:categories'];
if (currentCats == null) {
currentCats = new Array();
}
currentCats.push(approvedCatNode);
doc.properties['cm:categories'] = currentCats;
doc.save();
}
</activiti:string>
</activiti:field>
</activiti:taskListener>
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.