AnsweredAssumed Answered

Comment as a separate workflow?

Question asked by e-no91 on May 23, 2014
Latest reply on May 23, 2014 by e-no91
I have a js code that assigns a task whenever a content is uploaded in the folder.

var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$wf:reviewpooled";
workflow.parameters["bpm:workflowDescription"] = "Proses semakan dokumen : "+document.properties.name;
workflow.parameters["bpm:groupAssignee"] = "GROUP_URUSETIA SEKRETARIAT";
workflow.parameters["bpm:approveDestination"] = "Sites/ar-rahnutest/documentLibrary/KELULUSAN";
workflow.parameters["bpm:rejectDestination"] = "Sites/ar-rahnutest/documentLibrary/RUJUKAN LAIN-LAIN";
var futureDate = new Date();
   futureDate.setDate(futureDate.getDate() + 3);
   workflow.parameters["bpm:workflowDueDate"] = futureDate;
workflow.parameters["bpm:workflowPriority"]="2";
workflow.parameters["bpm:mailSubject"]="Peringatan : Sila lakukan semakan pada dokumen "+document.properties.name+" dalam masa SATU HARI lagi";
workflow.parameters["bpm:mailText"]="Dokumen boleh didapati melalui pautan : \n127.0.0.1:8080/share/page/document-details?nodeRef="+document.nodeRef+"\n\nAlfresco"
workflow.execute(document);



The problem is, if there is a comment in the document/content, that too will be assigned as a separate task. How do I remove these tasks on comment?

I've tried setting rule tasks will only be assigned if the document type is 'Microsoft Word' or 'Adobe PDF Document'. But no tasks is sent at all under this setting.

Thank you in advance!

Outcomes