I have made a simple task list with an assignee, due date, priority and title in share.
Now I want to start a workflow with a script.
This is my script : var person=document.assocs["dl:issueAssignedTo"][0]; // what does assocs in this rule? var username=person.properties["{http://www.alfresco.org/model/content/1.0}userName"]; //( can someone explain me what this rule do? ) var workflow = actions.create("start-workflow"); workflow.parameters.workflowName = "activiti$activitiAdhoc"; workflow.parameters["bpm:workflowDescription"] = document.properties["dl:issueID"] + " - "+ document.properties.title; workflow.parameters["bpm:assignee"] = people.getPerson(username); workflow.parameters["bpm:workflowDueDate"] = document.properties["dl:issueDueDate"]; workflow.execute(document);
After my script was uploaded, I make a rule on a folder. When i upload a file, I execute this script. But the problem is that my workflow don't start. Can someone help me please?