Hi Anatoly,
1. Yes
2. based on the work item id it will know how to complete each of them
it's business related in my perspective, if you for example send something to process in an external system, you will end up with workitemid related with that process/external system. In such cases if you want to create a mechanism decoupled from your external system, you need to keep track(build your own mechanism) to handle that information.
add me to skype if you want to discuss about it.. we can discuss about how to create something that works for you.
(skype: salaboy21)

On Mon, May 3, 2010 at 3:22 PM, tolitius <webakaunt@gmail.com> wrote:

Hey Drools Crew,

   Business process can be designed to have more the one workitem ( human
task ) with the same name. So two questions here:

       1. Confirming: "When registering handlers all of the workitems with
the same name will use the same ( registered to the name ) handler?"

       2. What is the way for the client to identify the workitem in this
case? Let's say there is a "truly" parallel definition:

                              /---> workitem1 ( async send to external
system, waiting for completion )
                       split ----> workitem2 ( async send to external
system, waiting for completion )
                              \---> workitem3 ( async send to external
system, waiting for completion )

           If workitem1 and workitem3 have the same name, and the response
came back for workitem3, how do the client know to "complete" workitem3 vs.
workitem1?

           Workitem IDs are completely workflow / drools-flow related, and
when ( let's say ) approval has returned from an external system, a client
should just tell one of the business workflow services to:

                       completeApprovalFor( ExternalSystem.SuchAndSuch )

           workflow service will have a handler to a workflowInstance
{ businessId, sessionId, processInstanceId, List<Work items in progress>,
etc.. }, so if it is a single workitem the process is waiting for, there is
no problem, but if there are more workitems that make the process to wait +
they may have the same name, it creates a problem.

   One solution (for the above specific case) would be to link external
systems with work item ids, so instead of List< Workitems in progress >, it
would be Map< ExternalSystem, Workitem >. But it just looks to complex and
specific...

   Anything the framework can help with?

Thank you,
/Anatoly
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Workitems-with-the-same-name-tp774182p774182.html
Sent from the Drools - User mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -