0 Replies Latest reply on May 22, 2006 1:02 AM by san.mohapatra

    how to end my workflow at any task

    san.mohapatra

      hi
      i am trying to end my workflow at any task.
      i have written
      ProcessInstance pi = tkn.getProcessInstance();

      pi.end();
      but it is not working.
      i got some information in jbpm 2.0 to close the workflow

      ExecutionService executionService =
      JbpmServiceFactory.getInstance().openExecutionService("CarlGauss");
      Collection tasks = executionService.getTaskList("CarlGauss");
      Token token = (Token) tasks.iterator().next();
      executionService.endOfState( token.getId(), "approve" );
      executionService.close();

      but there is no executionService method in 3.1
      what shall i do..