AnsweredAssumed Answered

Working wf on 4.2c goes wrong on 4.2e

Question asked by 7joeblack8 on Nov 13, 2013
Latest reply on Nov 17, 2013 by 7joeblack8
Hi,



i'm stuck on an error given on a closing task.

After submitting the first task with an activiti script, the repository shots me :

<javascript>Caused by: java.lang.IllegalArgumentException: script is a mandatory parameter
   at org.springframework.extensions.surf.util.ParameterCheck.mandatoryString(ParameterCheck.java:58)
   at org.alfresco.repo.processor.ScriptServiceImpl.executeString(ScriptServiceImpl.java:278)
   at org.alfresco.repo.processor.ScriptServiceImpl.executeScriptString(ScriptServiceImpl.java:193)
   at org.alfresco.repo.processor.ScriptServiceImpl.executeScriptString(ScriptServiceImpl.java:183)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:606)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   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:46)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:161)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at com.sun.proxy.$Proxy312.executeScriptString(Unknown Source)
   at org.alfresco.repo.workflow.activiti.script.ActivitiScriptBase.executeScript(ActivitiScriptBase.java:105)
   at org.alfresco.repo.workflow.activiti.script.ActivitiScriptBase$1.doWork(ActivitiScriptBase.java:89)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:548)
   at org.alfresco.repo.workflow.activiti.script.ActivitiScriptBase.executeScriptAsUser(ActivitiScriptBase.java:85)
   at org.alfresco.repo.workflow.activiti.script.ActivitiScriptBase.executeScript(ActivitiScriptBase.java:77)
   at org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener.notify(ScriptTaskListener.java:78)
   at org.activiti.engine.impl.delegate.TaskListenerInvocation.invoke(TaskListenerInvocation.java:34)
   at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
   at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
   at org.activiti.engine.impl.bpmn.helper.ClassDelegate.notify(ClassDelegate.java:93)
   … 87 more
</javascript>


Parameter check class says it's because of a null object or parameter, but the script exists, and all the mandatory fields are compiled.

I just upgrade to 4.2e and this flow started this behaviour.

Is changed any of the script declaration?

here's my task:

<javascript> <userTask id="alfrescoUsertask1" name="Compiler" activiti:assignee="claude" activiti:formKey="wf:reviewTask2">
      <extensionElements>
       <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
               <activiti:field name="runAs">
                  <activiti:string>admin</activiti:string>
               </activiti:field>
                  <activiti:field name="script">
                     <activiti:string>
          //…here's my example script string
                        var example =  task.getVariable('cmis_name');
                     </activiti:string>
                  </activiti:field>
                </activiti:taskListener>
       </extensionElements>
   </userTask></javascript>

thanks in advance

Outcomes