3 Replies Latest reply on Apr 27, 2009 10:39 PM by bestage

    4 Eye Principal - Implementation

    swatis

      Hi,

      I want to implement 4 Eye Principal.

      Let me clear few things about this
      What is this? :- If we have task A, taskB both are assigned to same group.
      Now lets consider there are 3 users in this group. TaskB is after TaskA in workflow. If userA performs taskA, then other than UserA, all users from group can perform this taskB. Meaning userB, userC can perform taskB not userA.

      I need ur suggestions to implement this principal.

      I'm using jBPM 3.2.3 version.

      Your help will be appreciated.

      Thanks & Regards,
      Swati S







        • 1. Re: 4 Eye Principal - Implementation
          bestage

          I had a similar goal to achieve.

          Example: a simple workflow like this


          user A user A User B System
          edit record => finalize => verify => set record active


          After User A finalizes the record for verification it gets the appropriate status which I set in the ActionHandler. Now when the user B is searching records for verification he gets only those in the FINALIZED status. Now in the "verify" Action Handler you can compare the user. If user A himself is trying to verify his own record, show error message. Otherwise set the status to VERIFIFED. The next workflow stop in my case Ãs a normal Node which sets the record automatically active since it has been successfully verified.

          This is just an example.

          You are right, you cannot work the normal use case, where the user ID of the first user is automatically assigned to all the other tasks.

          • 2. Re: 4 Eye Principal - Implementation
            swatis

            This is how I implemented.
            If Task A is completed by UserA then using action handler setting instance variable :"group" with value of "userA"
            Then When for Task B, used class which implements AssignmentHandler Interface this class will query to see who are the members of group and then elliminated user which is present in "group" instance variable i.e. "userA"
            So now TaskB will be performed by userB or userC by setting only these users in pooled actors list.

            • 3. Re: 4 Eye Principal - Implementation
              bestage

               

              "swatis" wrote:
              This is how I implemented.
              If Task A is completed by UserA then using action handler setting instance variable :"group" with value of "userA"
              Then When for Task B, used class which implements AssignmentHandler Interface this class will query to see who are the members of group and then elliminated user which is present in "group" instance variable i.e. "userA"
              So now TaskB will be performed by userB or userC by setting only these users in pooled actors list.


              This is also a good solution. jBPM task assignment cannot be used off the shelf for the 4-eyes-principle, which is actually widespread i.e. in the financial institutions. But this logic is easy to implement.