2 Replies Latest reply on Oct 28, 2005 4:34 AM by matafy

    taskSession.findTaskInstances( ... ) error

    matafy Newbie

      My processdefinition.xml is below:
      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition name="test">
      <start-state name="start">

      </start-state>
      <task-node name="pre state">




      </task-node>
      ........



      ProcessInstance processInstance = new ProcessInstance( definition );
      Token token = processInstance.getRootToken();
      token.signal();
      System.out.println( "now, it's at " + token.getNode().getName() );
      System.out.println( "now, it's waiting for " + taskInstance.getActorId() + " to handle" );
      ...savePrcessInstance( processInstance );
      ...

      TaskMgmtSession taskSession = jbpmSession.getTaskMgmtSession();
      List list = taskSession.findTaskInstances( "tester" );
      System.out.println( "tester now has " + list.size() + " tasks" );

      when executes, it prints out as follows:
      now, it's at pre state
      now, it's waiting for tester to handle
      ...
      tester now has 0 tasks.

      Why tester only has 0 task?