5 Replies Latest reply on Jun 4, 2009 6:01 AM by Ronald van Kuijk

    How to get TaskInstance in a ActionHandler

    Eman Nollase Newbie


      How can i get TaskInstance in a executioncontext..here is the scenario:

      <task-node name="approver A">
       <timer duedate="1 minute" name="timertest" transition="to approver B">
       <action class="com.ccti.workflow.WorkflowTimer"></action>
       <transition to="approver B" name="to approver B"></transition>

      and here the WorkflowTimer code:

      public class WorkflowTimer implements ActionHandler {
       private static final Log log = LogFactory.getLog(WorkflowTimer.class);
       /* (non-Javadoc)
       * @see org.jbpm.graph.def.ActionHandler#execute(org.jbpm.graph.exe.ExecutionContext)
       public void execute(ExecutionContext context) throws Exception {
       TaskIntance instance = context. ?

      I already tried context.getTaskInstance() but it give me NPE.

      Thanks a lot.