AnsweredAssumed Answered

Complete task from Script task Listener

Question asked by sarkar92 on Jan 7, 2014
Latest reply on Jan 15, 2014 by sarkar92
is it possible in activiti something like this to complete task

<userTask id="usertask1" name="All your base are belong to us">
         <extensionElements>
            <activiti:taskListener event="assignment" class="org.activiti.engine.impl.bpmn.listener.ScriptTaskListener">
               <activiti:field name="script">
                  <activiti:string>
                        delegateTask.getExecution().getEngineServices().getTaskService().complete(delegateTask.getId());
                     </activiti:string>
               </activiti:field>
               <activiti:field name="language" stringValue="groovy" />
               <activiti:field name="resultVariable" stringValue="myVar" />
            </activiti:taskListener>
         </extensionElements>
      </userTask>

Outcomes