1 Reply Latest reply on Aug 24, 2012 1:52 AM by swiderski.maciej

    UserGroupCallback mistakes user and group ID?

    katis

      Hi all,

       

      I've implemented my own UserGroupCallback that I use with Local Human Service. Everything works just fine - apart from when I have user and group with the same IDs.

       

      The case is as follows: I have a process with step X assigned to group with ID=Y. Then I ask for steps of user whose ID is Y with this methid "taskService.getTasksAssignedAsPotentialOwner( userId.toString(), groups, LANGUAGE);". Value of parameter "groups" are groups user Y belongs to (and group with ID=Y is NOT among them). The problem is I get step X in return. Am I missing something or is it jBPM bug?

       

      I am using jBPM 5.4 Snapshot.

       

      My UserGroupCallback implementation is really dummy - as whole logic is outside of it:

      public class DummyUserGroupCallback implements org.jbpm.task.identity.UserGroupCallback {

       

       

                @Override

                public boolean existsGroup(String arg0) {

                          return true;

                }

       

       

                @Override

                public boolean existsUser(String arg0) {

                          return true;

                }

       

       

                @Override

                public List<String> getGroupsForUser(String arg0, List<String> arg1,

                                    List<String> arg2) {

                          return arg1;

                }

       

       

      }

        • 1. Re: UserGroupCallback mistakes user and group ID?
          swiderski.maciej

          what could be the issue is that task service will load known groups and "enhance" result from your callback. I believe this is a bug as there is a property of usergroupcallback manager that should limit this behavior but unfortunately manager will not return this property, see here.

           

          Could you open a jira for it and would be perfect if you could provide a test case for that too.

           

          Cheers