Zeliang Huang [
http://community.jboss.org/people/ossa] created the discussion
"Re: JBPM 5 Question On Mulitple Instances Node"
To view the discussion, visit:
http://community.jboss.org/message/634571#634571
--------------------------------------------------------------
Hi Maciej,
thanks for the insight. I think option 1 is exactly what I was looking for.
I only know of one way to find and cancel other user tasks. below is my code. Is there
other better to achieve this? Any help is appreciated. thanks !
| | | EntityManagerFactory emf = Persistence |
| | | | | .createEntityManagerFactory("org.jbpm.task"); |
| | | Query q = emf.createEntityManager().createNamedQuery( |
| | | | | "PreviousTaskByProcessInstancdId"); |
| | | q.setParameter("processInstanceId", new Long("2080")); |
| | | |
| | | |
| | | List<Task> i = q.getResultList(); |
| | | TaskClient client = new TaskClient(new MinaTaskClientConnector( |
| | | | | "YetAnotherClient", new MinaTaskClientHandler( |
| | | | | | | SystemEventListenerFactory.getSystemEventListener()))); |
| | | client.connect("127.0.0.1", 9123); |
| | | BlockingTaskOperationResponseHandler responseHandler = new
BlockingTaskOperationResponseHandler(); |
| | | for (Task t : i) { |
| | | | client.skip(t.getId(), "Administrator", responseHandler); |
| | | } |
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/634571#634571]
Start a new discussion in jBPM at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]