JBoss Community

userGroupCallback : getGroupTaskList

created by Sandra Renaud in jBPM - View the full discussion

Hello,

 

I encounter problem while retrieving group tasks list. Indeed their is a unique method call for user and group task in LocalTaskService. But when I pass a group id in argument to the function

it call this method in TAskServiceSession :

 

@SuppressWarnings("unchecked")
          public List<TaskSummary> getTasksAssignedAsPotentialOwnerByStatus(String userId, List<Status> status, String language) {
        doCallbackUserOperation(userId);
        List<String> groupIds = doUserGroupCallbackOperation(userId, null);
        
        HashMap<String, Object> params = addParametersToMap(
                "userId", userId,
                "groupIds", groupIds,
                "language", language,
                "status", status);
        return (List<TaskSummary>) tpm.queryWithParametersInTransaction("TasksAssignedAsPotentialOwnerByStatusWithGroups", params);
    }
 

 

Because userId parameter is actually a groupId, the second call return an empty List.

So query failed because it miss an argument:

 

where t.archived = 0 
and ( potentialOwners.id = :userId 
        or potentialOwners.id in () ) 

 

I don't figure out what is wrong in my implementation.

 

Thankyou very much to help me.

 

Regards,

Reply to this message by going to Community

Start a new discussion in jBPM at Community