07-14-2010 07:17 AM
07-15-2010 11:26 AM
var assignee = site.assocs["custom:AssigneePerson"][0]; // This could also be username literal, ie assignee = "admin"
var doc = site.childByNamePath("documentLibrary/path/to/filename.txt");
var date = new Date();
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$workflowModelNamespace:workflowName"; // the part after jbpm$ is found in your workflow definition/workflow model.
workflow.parameters["bpm:workflowDescription"] = "Something to distinct this workflow by in the My Tasks list";
workflow.parameters["bpm:assignee"] = assignee;
workflow.parameters["bpm:dueDate"] = date;
workflow.execute(doc);
<transition to="end" name="SomeTaskNode">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
// I put my javascript code to do whatever.
</script>
</action>
</transition>
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.