AnsweredAssumed Answered

Files wont move after finish workflow.

Question asked by e-no91 on May 6, 2014
Latest reply on May 8, 2014 by kaynezhang
This is my review_pooled_processdefinition.xml that I've edited

<?xml version="1.0" encoding="UTF-8"?>

<process-definition xmlns="" name="wf:reviewpooled">

    <swimlane name="initiator" />

    <start-state name="start">
        <task name="wf:submitGroupReviewTask" swimlane="initiator" />
        <transition name="" to="review" />

    <swimlane name="reviewer">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">

    <task-node name="review">
        <task name="wf:reviewTask" swimlane="reviewer">
            <event type="task-create">
                   if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
                   if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
            <event type="task-end">
               <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
                     <variable name="bpm_assignee" access="write"/>
                        if (taskInstance.actorId != null)
        <transition name="approve" to="approved">

            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">


                      var dest = companyhome.childByNamePath("Site/test-script/documentLibrary/kepada");




        <transition name="reject" to="rejected"/>

    <task-node name="rejected">
        <task name="wf:rejectedTask" swimlane="initiator" />
        <transition name="" to="end" />


    <task-node name="approved">
        <task name="wf:approvedTask" swimlane="initiator" />
        <transition name="" to="end"/>


    <end-state name="end" />


And my js file,

function startWorkflow(assigneeGroup)
    var workflow = actions.create("start-workflow");
    workflow.parameters.workflowName = "activiti$activitiReviewPooled";
    workflow.parameters["bpm:workflowDescription"] = "Please review " +;
    workflow.parameters["bpm:groupAssignee"] = assigneeGroup;
    var futureDate = new Date();
    futureDate.setDate(futureDate.getDate() + 3);
    workflow.parameters["bpm:workflowDueDate"] = futureDate;
    return workflow.execute(document);

function main()
   var name =;
   var siteName = document.siteShortName;
   if (siteName == null)
      if (logger.isLoggingEnabled())
         logger.log("Did not start workflow as the document named " + name + " is not located within a site.");
   var reviewGroup = "GROUP_URUSETIA SEKRETARIAT";

   // make sure the group exists
   var group = people.getGroup(reviewGroup);
   if (group != null)
      if (logger.isLoggingEnabled())
         logger.log("Starting pooled review and approve workflow for document named " + name + " assigned to group " + reviewGroup);


      if (logger.isLoggingEnabled())
         logger.log("Started pooled review and approve workflow for document named " + name + " assigned to group " + reviewGroup);
   else if (logger.isLoggingEnabled())
      logger.log("Did not start workflow as the group " + reviewGroup + " could not be found.");


I set the js file to run whenever a new file is uploaded and to run in background.

I use the original review_pooled.bpmn20.xml. Both xml files are still in the workflow folder.

I've tried many ways for days but the files still wont move after clicking approve. Moreover, the due date only appears to the assigner..

What am I missing here??