AnsweredAssumed Answered

move a document using activiti

Question asked by ghmus on Sep 24, 2013
Latest reply on Sep 25, 2013 by tonyrivet
hi!
how can i move a doc after finishing my workflow using activiti ?!

i used this script but it doesn't work

<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
      <activiti:field name="script">
        <activiti:string>
          if(task.getVariableLocal('scwf_approveRejectOutcome') == 'Approve') {

          var dest = bpm_context.childByNamePath("nv");
          for (var i = 0; i &lt; bpm_package.children.length; i++)
          {
            bpm_package.children.move(dest);
          }
        </activiti:string>
      </activiti:field>
</activiti:taskListener>

i get this error :

Exception while invoking TaskListener: Incompatible type set on field declaration 'script' for class org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript. Declared value has type org.activiti.engine.impl.el.FixedValue, while expecting org.dom4j.Element


Outcomes