2 Replies Latest reply on Aug 22, 2007 5:32 PM by kukeltje

    Help to implement an Approval Business Process

    jeanguyer

      Hello,

      I am not speak english well , so i might be unclear.
      I have an issue to make a business process with jbpm , and i need help to build this one . The business process is an approval process , it needs the approval of each users involved , or the reject of just one of them.

      The process is based on an object of real world. Based on the nature of the object , the process may involve multiples users.

      the process run like this :
      Start process
      Object is nature 1 , so we need user1 and user2 (we may use an ActionHandler to do this)
      user1 and user2 receive an assignment on their tasklist at the same time.
      each one must approve the object , if one of them refuse the object , process is terminated and the business state is "DENIED" , if the two of them approve , the process is terminated and the business state is "APPROVED"

      Same with a different object nature :
      Start process
      Object is nature 2 , so we need user3, user2, user6
      user3, user2, user6 receive an assignement on their tasklist at the same time.
      each one must approve the object , if one of them refuse the object , process is terminated and the business state is "DENIED" , if the three of them approve, the process is terminated and the business state is "APPROVED".

      All the instances of those process must be linked to one process instance. I don't want to have as many processes definitions as i have object natures.

      Every tips , jpdl , java code will be appreciated.

      Regards,
      Jean Guyer

        • 1. Re: Help to implement an Approval Business Process

          I don't have any experience in this area, but I see very little useful relevant information outside of the user guide and the source code. Maybe somebody with more experience will respond...

          I think the one tricky thing is that you need to immediately terminate the process when anyone DENIES. This could be done easily with a custom TaskControllerHandler, I think. The rest seems like straight JPDL.

          -Ed Staub

          • 2. Re: Help to implement an Approval Business Process
            kukeltje

            You could also try to:
            - Create a custom decisionnode that creates enough tasks (see the wiki for an example)
            - Use an actionhandler on each 'deny' transition that cancels the parallel active tasks and sets a processvariable.