AnsweredAssumed Answered

send email to each assegnee on serial workflow

Question asked by mirkomane on Mar 8, 2011
Latest reply on Mar 9, 2011 by mirkomane
Hi all,
I'm trying to modify the serial review and approve workflow, to send email to each assegnee on reviewers list, when it is his turn to approve the submitted content.
Below my serialreview_processdefinition.xml:

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

<!–  Filename: serialreview_processdefinition.xml
     Description: This altered file describes additional entries for the serial review workflow
     Usage: Upload file to : Company Home > Data Dictionary > Workflow Definitions
     Version: Alfresco Community 3.3
     Author: Karel Jordaan
–>

<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:serialreview">

   <swimlane name="initiator"/>

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

   <decision name="startreview" >
      <event type="node-enter">
          <script>
            <variable name="wf_reviewCycle" access="write"/>
            <variable name="wf_reviewerCount" access="write"/>
            <variable name="wf_approveCount" access="write"/>
            <expression>
               wf_reviewerCount = bpm_assignees.size();
               wf_approveCount = 0;
               wf_reviewCycle = 1;
            </expression>
          </script>
          <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <runas>admin</runas>
              <script>
                <variable name="docNodeRef" access="read, write" />
                <variable name="bpm_package" access="read" />
                <expression>
                    var date = new Date();
                    var originalDocName = bpm_package.children[0].properties["cm:name"];
                    docNodeRef = bpm_package.children[0];
                    var existingDoc = docNodeRef.parent.childByNamePath(originalDocName +"_wfhistory.txt");
                    if(existingDoc == null)
                    {
                        var wf_doc = docNodeRef.parent.createFile(originalDocName +"_wfhistory.txt");
                        wf_doc.addAspect("cm:versionable");
                        wf_doc.content = date + " Start Serial &amp; Review Workflow on "+ originalDocName;
                        var workingCopy = wf_doc.checkout();
                        workingCopy.content = workingCopy.content + " by " + person.properties["firstName"]+" "+person.properties["lastName"]+"\n";
                        wf_doc = workingCopy.checkin();
                    }
                    if(existingDoc != null)
                    {
                        var logFile = docNodeRef.parent.childByNamePath(originalDocName +"_wfhistory.txt");
                        var workingCopy = logFile.checkout();
                        workingCopy.content = workingCopy.content + date +  " Restart Serial &amp; Review Workflow on "+ originalDocName + " by "+ person.properties["firstName"]+" "+person.properties["lastName"]+"\n";
                        logFile = workingCopy.checkin();
                    }
                </expression>
              </script>
          </action>
      </event>
      <transition name="serial" to="submitserialreview" />
   </decision>


   <!–               –>
   <!– Serial Review –>
   <!–               –>

   <decision name="submitserialreview">
      <transition name="endreview" to="endreview" />
      <transition name="review" to="serialreview">
        <condition>#{wf_approveCount &lt; wf_reviewerCount}</condition>
      </transition>
   </decision>
  
   <task-node name="serialreview">
      <task name="wf:approvedSerialTask">
         <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
            <actor>#{bpm_assignees.get(wf_approveCount)}</actor>
         </assignment>
         <event type="task-assign">
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
            <runas>admin</runas>
              <script>
              <variable name="wf_approveCount" access="read"/>
              <variable name="bpm_assignees" access="read"/>
              <variable name="bpm_package" access="read"/>
              <expression>
                  if(bpm_assignees.get(wf_approveCount).properties != undefined)
                  {
                      var originalDocName = bpm_package.children[0].properties["cm:name"];
                      var mail = actions.create("mail");
                      mail.parameters.to = bpm_assignees.get(wf_approveCount).properties["cm:email"];
                      mail.parameters.subject = "Alfresco New Task";
                      mail.parameters.from = "alfresco@alfresco.org";
                      mail.parameters.text = "Alfresco richiede la tua attenzione! \nL'utente "+person.properties["firstName"]+" "+person.properties["lastName"]+" richiede la tua partecipazione al workflow sul documento "+originalDocName;
                      mail.execute(bpm_package);    
                  }
              </expression>
              </script>
            </action>
            <script>    
                  if (wf_reviewCycle > 1)taskInstance.description = taskInstance.description + " (" + wf_reviewCycle + ")";
                  if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
                  if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
            </script>
         </event>
      </task>
      <transition name="approve" to="submitserialreview">
         <script>
            <variable name="wf_approveCount" access="read, write"/>
            <expression>
                wf_approveCount = wf_approveCount + 1;       
            </expression>
         </script>
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
              <runas>admin</runas>
              <script>
                <variable name="bpm_package" access="read" />
                <variable name="docNodeRef" access="read, write" />
                <expression>
                    var date = new Date();
                    var originalDocName = bpm_package.children[0].properties["cm:name"];
                    var logFile = docNodeRef.parent.childByNamePath(originalDocName +"_wfhistory.txt");
                    var workingCopy = logFile.checkout();
                    workingCopy.content = workingCopy.content + date + " Approved by "+ person.properties["firstName"]+" "+person.properties["lastName"]+"\n";
                    logFile = workingCopy.checkin();
                </expression>
              </script>
         </action>
      </transition>
      <transition name="reject" to="endreview" />
   </task-node>


   <!–                –>
   <!– End the Review –>
   <!–                –>

  
   <decision name="endreview">
      <transition name="rejected" to="rejected">
      <!–
          <action name="action" class="com.infogroup.action.MessageActionHandler">
              <message>Task rejected!</message>
          </action>
      –>
      </transition>
      <transition to="end" name="to end">
         <condition>#{wf_approveCount == wf_reviewerCount}</condition>
         <!–
         <action name="action" class="com.infogroup.action.WorkflowHandler" />
         –>
      </transition>
   </decision>
     
   <task-node name="rejected">
      <task name="wf:rejectedSerialTask" swimlane="initiator" >
      <event type="task-assign">
            <script>
               if (wf_reviewCycle > 1)
               taskInstance.description = taskInstance.description + " (" + wf_reviewCycle + ")";
            </script>
            <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
              <runas>admin</runas>
              <script>
              <variable name="bpm_package" access="read" />
                <variable name="docNodeRef" access="read, write" />
                <expression>
                  var date = new Date();
                  var originalDocName = bpm_package.children[0].properties["cm:name"];
                  var logFile = docNodeRef.parent.childByNamePath(originalDocName +"_wfhistory.txt");
                  var workingCopy = logFile.checkout();
                  workingCopy.content = workingCopy.content + date + " Rejected by "+ person.properties["firstName"]+" "+person.properties["lastName"]+"\n";
                  logFile = workingCopy.checkin();
                </expression>
              </script>
            </action>
      </event>
      </task>
      <transition name="abort" to="end">
          <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
              <runas>admin</runas>
              <script>
                <variable name="bpm_package" access="read" />
                <variable name="docNodeRef" access="read, write" />
                <expression>
                  var date = new Date();
                  var originalDocName = bpm_package.children[0].properties["cm:name"];
                  var logFile = docNodeRef.parent.childByNamePath(originalDocName +"_wfhistory.txt");
                  var workingCopy = logFile.checkout();
                  workingCopy.content = workingCopy.content + date + " Task Aborted"+"\n";
                  logFile = workingCopy.checkin();
                </expression>
              </script>
          </action>
      </transition>
      <transition name="resubmit" to="startreview" >
         <!– restart review process (next cycle) –>
         <script>
            <variable name="wf_reviewCycle" access="read,write" />
            <expression>
               wf_reviewCycle = wf_reviewCycle +1;
            </expression>
         </script>
      </transition>
   </task-node>

   <!–                 –>
   <!– End the Process –>
   <!–                 –>

   <end-state name="end"/>

   <event type="process-end">
      <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
              <runas>admin</runas>
              <script>
                <variable name="bpm_package" access="read" />
                <variable name="docNodeRef" access="read, write" />
                <expression>
                  var date = new Date();
                  var originalDocName = bpm_package.children[0].properties["cm:name"];
                  var logFile = docNodeRef.parent.childByNamePath(originalDocName +"_wfhistory.txt");
                  var workingCopy = logFile.checkout();
                  workingCopy.content = workingCopy.content + date + " End Workflow Cycle"+"\n"+"\n";
                  logFile = workingCopy.checkin();
                </expression>
              </script>
          </action>
   </event>

</process-definition>


It works only the first time when the initiator starts the workflow. After this I obtain the follow error:


08:57:03,453 User:franco ERROR [ui.common.Utils] A system error happened during the operation: 02080168 Failed to signal transition approve from workflow task jbpm$133.
org.alfresco.service.cmr.workflow.WorkflowException: 02080168 Failed to signal transition approve from workflow task jbpm$133.
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.endTask(JBPMEngine.java:1831)
   at org.alfresco.repo.workflow.WorkflowServiceImpl.endTask(WorkflowServiceImpl.java:648)
   at sun.reflect.GeneratedMethodAccessor1422.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:217)
   at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:184)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:137)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy71.endTask(Unknown Source)
   at org.alfresco.web.bean.workflow.ManageTaskDialog.transition(ManageTaskDialog.java:446)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:132)
   at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
   at javax.faces.component.UICommand.broadcast(UICommand.java:109)
   at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
   at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
   at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
   at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:104)
   at sun.reflect.GeneratedMethodAccessor512.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy233.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.repo.web.filter.beans.NullFilter.doFilter(NullFilter.java:68)
   at sun.reflect.GeneratedMethodAccessor512.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.alfresco.repo.management.subsystems.ChainingSubsystemProxyFactory$1.invoke(ChainingSubsystemProxyFactory.java:116)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy233.doFilter(Unknown Source)
   at org.alfresco.repo.web.filter.beans.BeanProxyFilter.doFilter(BeanProxyFilter.java:82)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
   at java.lang.Thread.run(Thread.java:619)
Caused by: org.jbpm.graph.def.DelegationException: 02080167 Failed to execute supplied script: 02080166 TypeError: Cannot read property "cm:email" from undefined (AlfrescoJS#1)
   at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:388)
   at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:379)
   at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:301)
   at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:241)
   at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:213)
   at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:196)
   at org.jbpm.graph.def.Transition.take(Transition.java:152)
   at org.jbpm.graph.def.Node.leave(Node.java:479)
   at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:213)
   at sun.reflect.GeneratedMethodAccessor1710.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
   at org.jbpm.graph.node.TaskNode$$EnhancerByCGLIB$$e5dc3af1.leave(<generated>)
   at org.jbpm.graph.exe.Token.signal(Token.java:223)
   at org.jbpm.graph.exe.Token.signal(Token.java:188)
   at sun.reflect.GeneratedMethodAccessor1709.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
   at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$1c59cf2f.signal(<generated>)
   at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:495)
   at org.alfresco.repo.workflow.jbpm.WorkflowTaskInstance.end(WorkflowTaskInstance.java:135)
   at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:436)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine$26.doInJbpm(JBPMEngine.java:1815)
   at org.springmodules.workflow.jbpm31.JbpmTemplate$1.doInHibernate(JbpmTemplate.java:87)
   at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
   at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
   at org.springmodules.workflow.jbpm31.JbpmTemplate.execute(JbpmTemplate.java:80)
   at org.alfresco.repo.workflow.jbpm.JBPMEngine.endTask(JBPMEngine.java:1780)
   … 70 more
Caused by: org.alfresco.scripts.ScriptException: 02080167 Failed to execute supplied script: 02080166 TypeError: Cannot read property "cm:email" from undefined (AlfrescoJS#1)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.executeString(RhinoScriptProcessor.java:270)
   at org.alfresco.repo.processor.ScriptServiceImpl.executeScriptString(ScriptServiceImpl.java:322)
   at org.alfresco.repo.processor.ScriptServiceImpl.executeScriptString(ScriptServiceImpl.java:300)
   at sun.reflect.GeneratedMethodAccessor861.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:160)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:137)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy255.executeScriptString(Unknown Source)
   at org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript.executeScript(AlfrescoJavaScript.java:262)
   at org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript$1.doWork(AlfrescoJavaScript.java:151)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:508)
   at org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript.executeScriptAs(AlfrescoJavaScript.java:147)
   at org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript.executeScript(AlfrescoJavaScript.java:137)
   at org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript.executeExpression(AlfrescoJavaScript.java:110)
   at org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript.execute(AlfrescoJavaScript.java:96)
   at org.jbpm.graph.def.Action.execute(Action.java:129)
   at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:284)
   … 97 more
Caused by: org.alfresco.error.AlfrescoRuntimeException: 02080166 TypeError: Cannot read property "cm:email" from undefined (AlfrescoJS#1)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:488)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.executeString(RhinoScriptProcessor.java:266)
   … 125 more
Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot read property "cm:email" from undefined (AlfrescoJS#1)
   at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
   at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340)
   at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3356)
   at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3375)
   at org.mozilla.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3388)
   at org.mozilla.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1324)
   at org.mozilla.javascript.gen.c242._c0(AlfrescoJS:1)
   at org.mozilla.javascript.gen.c242.call(AlfrescoJS)
   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
   at org.mozilla.javascript.gen.c242.call(AlfrescoJS)
   at org.mozilla.javascript.gen.c242.exec(AlfrescoJS)
   at org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:472)
   … 126 more

I think the bpm_assignees values are been lost. All reviewers have the correct mail address.
I read other posts but I don't found any solved solutions.
Anyone can help me?
Thank you very much.

Mirko

Outcomes