[jboss-user] [jBPM] - How to revisit an old state in jbpm 3.2.8?
Buat Apa
do-not-reply at jboss.com
Wed Dec 8 05:40:24 EST 2010
Buat Apa [http://community.jboss.org/people/buatapa] created the discussion
"How to revisit an old state in jbpm 3.2.8?"
To view the discussion, visit: http://community.jboss.org/message/574799#574799
--------------------------------------------------------------
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:
java.util.ConcurrentModificationExceptionat java.util.HashMap$HashIterator.nextEntry(
HashMap.java:793
)at java.util.HashMap$KeyIterator.next(
HashMap.java:828
)at org.hibernate.collection.AbstractPersistentCollection$IteratorProxy.next(
AbstractPersistentCollection.java:555
)
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>
</start-state>
<task-node name="*submitForm*">
<task name="submitForm">
<assignment actor-id="submitter"></assignment>
</task>
<transition to="approveForm"></transition>
</task-node>
<task-node name="approveForm">
<task name="approveForm">
<assignment actor-id="approver"></assignment>
</task>
<transition to="end" name="yes"></transition>
<transition to="*submitForm*" name="*no*"></transition>
</task-node>
<end-state name="end">
</end-state>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/574799#574799]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101208/1bf1689b/attachment-0001.html
More information about the jboss-user
mailing list