7 Replies Latest reply on Apr 7, 2010 6:32 AM by rebody

    task for multiple users

    koen.hermans

      Hi,

       

      I have a question about tasks in jBPM. After Reading the user and dev guide, I wasn't able to find a solution for assign a task to multiple users AND all those users must be able to complete the task.

       

      I know it's possible to assign a task to multiple users but than one of them has to claim the task to complete it and than the other users can't complete the task.

       

      But what if a task must be done by multiple users....? Is this possible, can it be done sequencely? Do each user have to wait till another user has complete the task (if so, than it can take a while before every single user has done the task)?

       

      I'm using jBPM 4.3....

       

      Can anyone help me with this?

       

      Thank you by advance...

       

      grtz

        • 1. Re: task for multiple users
          rebody

          Hi koen,

            In China, this feature is very normal for most company, and we called it 'Counter Sign'. Unfortunately there is no nature support for this feature, so if you want to assign task to multiple users, you should do it by yourself.

           

            For example, you could use CustomActivity and create a ExternalActivityBehavior to implement this feature, you can create multiple tasks for these users and assign task for each of them, In jBPM 4, task could have sub tasks.

          1 of 1 people found this helpful
          • 2. Re: task for multiple users
            koen.hermans

            thanks a lot Huisheng Xu!! You've helped me very well.

             

            grtz

            • 3. Re: task for multiple users
              jump

              You described Discriminator Pattern. You can read more about it here http://workflowpatterns.com/patterns/control/advanced_branching/wcp9.php

              Actually, this pattern is difficult to implement by means of graph oriented languages (like JPDL). You need Pi-calculus based langauage like BPEL. I guess, you need BPEL plugin for JBPM.

              • 4. Re: task for multiple users
                kukeltje

                This is synonym with the 1-out-of-M join which is supported by jBPM 4 in jPDL (ok, there is a bug) and in jBPM 3 just in java code (no xml construct).

                • 5. Re: task for multiple users
                  rebody

                  Hi Alexei,

                    I think it is some different from Task and Execution in the jPDL. Task is more likely a notification service to Human being. The Execution is the actually a part of Graph Oriented Language. If you use Discriminator Pattern, you may find it is difficult to implement it, but in our country, this scenario is very commonly. People want to have a most flexible human task service, so they want to decision who and could receive the task, you have to decide to create how much task may be created in the runtime. The different time you execute the process, the difference tasks may be created and assigned to different person.

                   

                    It may sounds strange, but it is the real user requirement. I hope jBPM could support more powerful feature like this in future.

                  • 6. Re: task for multiple users
                    koen.aers

                    Hi Huisheng,

                     

                    It seems to me like you are describing the combination of a dynamic fork/join combo with a task for each branch. Is this correct? If not, can you enlighten us a bit more about the behaviour you are looking for?

                    Also, we made it very easy to implement nodes yourself and add them. So if you happen to have the implementation for what you want feel free to attach a patch so we can consider to add it to the codebase.

                     

                    Regards,

                    Koen

                    • 7. Re: task for multiple users
                      rebody

                      Hi Koen,

                        Yes, I think it is most likely put a dynamic fork/join into a task. But there is still some problem when we try to implement this feature.

                       

                        In jBPM4, we could only create a task for one execution. Even if I implement a CustomActivity and create multiply task in one activity, there is no way to observe when and how the sub task was completed.

                       

                        In the simplest scenario, the process designer could only decide the participants of the activity, when the process instance arrived the activity, we could create multiply task by the participants. In the more complex scenario, the participants of the activity is also dynamic, the engine should decide who should be assigned a task in the runtime. Even more, there may be multiple strategy for task completion. For example, if all of participants approved, the process instance could continue. if 60 percent participants approved, or someone may have an absolutely reject vote, etc.

                       

                        Now in order to implement features like this, I must make a lot of change of pvm. if you are interested in these, I could show the sample codes.