Shobhit Tyagi [
https://community.jboss.org/people/roxy1987] created the discussion
"Re: Deprecated API getTasksAssignedAsPotentialOwnerByStatusByGroup"
To view the discussion, visit:
https://community.jboss.org/message/802465#802465
--------------------------------------------------------------
*You can use the method getTasksAssignedAsPotentialOwner (*
http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is...
*String* *userId, *
http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is...
*String* *language,*
http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/task/service/TaskClient...
*TaskClientHandler.TaskSummaryResponseHandler* *responseHandler)*
You dont need to mention the name of the groups.
The user group call back takes them by itself. All you need is to register the
UserGroupCallback via UserGroupCallbackManager. You could use a property file to specify
the mapping between the users and roles in the format :
userid1=group1,group2,group3
userid2=group4,group3,group1
userid3=group1,group2
...
...
And specify the path of this file in your CustomUserGroupCallBack.
So wehn you call the method *taskClient.getTasksAssignedAsPotentialOwner (
http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is...
String userId,
http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is...
String language,
http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/task/service/TaskClient...
TaskClientHandler.TaskSummaryResponseHandler responseHandler)*
This will invoke the callback and will take the groups for the userId.
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/802465#802465]
Start a new discussion in jBPM Development at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]