AnsweredAssumed Answered

Notification by datalists in 5.0c

Question asked by marcinm on Jan 13, 2015
Latest reply on Feb 5, 2015 by marcinm
Hi,
Is it possible to use Your script in Alfresco Community 5.0c:
<javascript>
var person=document.assocs["dl:dl:taskAssignee"][0];
var username=person.properties["{http://www.alfresco.org/model/content/1.0}userName"];
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "activiti$activitiAdhoc";
workflow.parameters["bpm:workflowDescription"] =  document.properties.title;
workflow.parameters["bpm:assignee"] = people.getPerson(username);
workflow.parameters["bpm:workflowDueDate"] = document.properties["dl:ganttEndDate"];
workflow.parameters["wf:notifyMe"] = true;

workflow.execute(document);
</javascript>

I copied Your script to Repository/Data Dictionary/Scripts and set a rule on all newly created items that executes this script (on TaskList folder) but it don't do anything.

In alfresco.global.properties i have system.workflow.engine.jbpm.enabled=false but changed workflowName to activity as shown in script.

Thanks for any tips

Outcomes