function createWorkflow() {
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$wf:adhoc"; // Need to be replaced with our Custom workflow ?
workflow.parameters["bpm:workflowDescription"] = "The attached document has been uploaded to Alfresco. Please review within 3 days.";
workflow.parameters["bpm:assignee"] = "admin"; // TODO: not hard coded, this is testing
// workflow.parameters["bpm:groupAssignee"] = assigneeGroup; // Assign group depending on Division ?
var futureDate = new Date();
futureDate.setDate(futureDate.getDate() + 3);
workflow.parameters["bpm:workflowDueDate"] = futureDate;
return workflow.execute(document);
}
function moveDocument(doc, folder) {
doc.move(folder);
}
function main() {
//if (logger.isLoggingEnabled())
logger.log("Test OK");
logger.warn("Test warn OK");
createWorkflow();
}
main();
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.