0 Replies Latest reply on Dec 7, 2010 6:41 PM by Buat Apa

    How to revisit an old state in jbpm 3.2.8?

    Buat Apa Newbie

      I tried the followings using jbpm 3.2.8. When I end with "no", which should go back to the previous state (submitForm), but I got the following errors occasionally. Did I do something wrong, or what is the right way?






      Caused by:



      at java.util.HashMap$HashIterator.nextEntry(




      at java.util.HashMap$KeyIterator.next(




      at org.hibernate.collection.AbstractPersistentCollection$IteratorProxy.next(





      java code (I am in open approveForm state)










      Collection taskList = processInstance.getTaskMgmtInstance().getTaskInstances();

      Iterator<?> iter = taskList.iterator();




      while (iter.hasNext()) {

             TaskInstance taskInstance = (TaskInstance) iter.next();



              if (taskInstance.isOpen()) {



                     taskInstance.end(approve ?

      "yes" :"no");






      process definition code



      <start-state name="start">
        <transition to="submitForm"></transition>

      <task-node name="submitForm">
        <task name="submitForm">
         <assignment actor-id="submitter"></assignment>
        <transition to="approveForm"></transition>

      <task-node name="approveForm">
        <task name="approveForm">
         <assignment actor-id="approver"></assignment>
        <transition to="end" name="yes"></transition>
        <transition to="submitForm" name="no"></transition>

      <end-state name="end">