AnsweredAssumed Answered

endTask problem

Question asked by aleksandar1982 on Jan 24, 2012
Latest reply on Feb 9, 2012 by mitpatoliya
Hello,

I have a problem with endTask metod.
I want to create automatic task, but alway get error :this token is locked by token[].
I am not sure where is my mistake.



<event type="task-create">
      <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
      <runas>admin</runas>
              <script>
                       var task_id="jbpm$"+executionContext.getTaskInstance().getId()
            var task=workflow.getTaskById(task_id);
                task.endTask("Otpremanje");
                   
                   </script>
               </action>
      </event>

Regards

Outcomes