This content has been marked as final.
Show 5 replies
-
1. Re: JBPM 5 Question On Mulitple Instances Node
ossa Oct 28, 2011 3:03 AM (in response to ossa)Can I put something in the exit action to accomplish this?
-
2. Re: JBPM 5 Question On Mulitple Instances Node
ossa Oct 30, 2011 9:40 PM (in response to ossa)I can really use some help here. anyone?
-
3. Re: JBPM 5 Question On Mulitple Instances Node
swiderski.maciej Nov 1, 2011 3:33 PM (in response to ossa)Hi,
I can see two options:
- as you mentioned, have an additional task after the user task (with multiplicity) that will verify the outcome and in case of rejection it will cancel all other user tasks
- as an alternative I would give it a try with n out of m pattern with parallel & complex gateway, so the converging gateway could decide if the flow shall continue when rejection was encountered.
HTH
-
4. Re: JBPM 5 Question On Mulitple Instances Node
ossa Nov 2, 2011 6:13 AM (in response to swiderski.maciej)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("OtherTaskByProcessInstancdId"); 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); }
And this is my workflow
-
5. Re: JBPM 5 Question On Mulitple Instances Node
swiderski.maciej Nov 2, 2011 8:42 AM (in response to ossa)I believe that is the right way, since Human Task Service is considered an external component to the jBPM engine so you need to utilize Task Client