AnsweredAssumed Answered

Send email in create listener of multi instance email.

Question asked by mstein on Sep 5, 2012
Latest reply on Sep 5, 2012 by mstein
Hi All,

I have a workflow with a multi-instance task and I want to email the assignee on create. I have some code that looks like this:

<userTask id="alfrescoUsertask1" name="Review Task" activiti:assignee="${}" activiti:formKey="wf:activitiReviewTask">
        <activiti:taskListener event="create" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>logger.log("review task for:" +;
var mail = actions.create("mail"); =;
mail.parameters.subject = "Review Task Assignment: " + bpm_package.children[0];
mail.parameters.text = "Review this now!";
      <multiInstanceLoopCharacteristics isSequential="false" activiti:collection="bpm_assignees" activiti:elementVariable="reviewAssignee"></multiInstanceLoopCharacteristics>

For some reason is blank, works fine and is good too.

Any thoughts?