AnsweredAssumed Answered

Email reviewers on parallel review workflow

Question asked by ph73nt on Jan 20, 2011
Latest reply on Feb 1, 2011 by mthomas
Dear forum

I edited the sample parallel review workflow in an attempt to email reviewers on initiation. I've been able to do something similar (by searching this forum) for the parallel group review and the adhoc task, but not this one. I'm suspicious that the problem is to do with the way I use bpm_assignees in my start-state:

<swimlane name="initiator" />

    <start-state name="start">
      <task name="wf:submitParallelReviewTask" swimlane="initiator" />
      <transition name="" to="startreview">
        <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
          <script>
            for(var i=0; i &lt; bpm_assignees.length; i++ )
            {
               var mail = actions.create("mail");
               mail.parameters.to = bpm_assignees[i].properties.email;
               mail.parameters.subject = "Document for approval";
               mail.parameters.from = initiator.properties.email;
               mail.parameters.text = initiator.properties.firstName + " "
                         + initiator.properties.lastName
                         + " has requested a document review: "
                         + "\u000D\u000D"
                         + bpm_workflowDescription
                         + "\u000D\u000D"
                         + "Log on to Alfresco here: http://10.136.1.176:8080/share";
               mail.execute(bpm_package);
            }
          </script>
        </action>
      </transition>
    </start-state>

Hoping for more help…. thanks, Neil

Outcomes