AnsweredAssumed Answered

Mail reminder before workflow ends

Question asked by vincent_roye on Jan 31, 2014
Hi,

I would like to create a reminder before my custom workflow ends. I'm going in this direction but I don't know how to configure the boundaryEvent to trigger the serviceTask 3 days before the workflow ends. BTW, I don't understand how the boundaryEvent and the serviceTask are linked together.


               <boundaryEvent id="boundarytimer1" name="Timer" attachedToRef="reviewTask" cancelActivity="false">
           <timerEventDefinition>
            <timeCycle>R1/P3D</timeCycle>
           </timerEventDefinition>
      </boundaryEvent>

      <serviceTask id="alfrescoScripttask1" name="Notify" activiti:class="org.alfresco.repo.workflow.activiti.script.AlfrescoScriptDelegate">
           <extensionElements>
            <activiti:field name="script">
              <activiti:string>
               var mail = actions.create("mail");
               mail.parameters.to = "ffff@ffff.com";
               mail.parameters.subject = "Adhoc Task ";
               mail.parameters.from = "ffff@ffff.com";
               mail.parameters.text = "alo";
               mail.execute(bpm_package);
             </activiti:string>
            </activiti:field>
           </extensionElements>
      </serviceTask>


Thanks a lot for your help,

Best Regards,

Vincent

Outcomes