Discussion:
[jboss-user] [jBPM] - jBPM TaskService.getTasksAssignedAsPotentialOwner pagination method deprecated
gonzalad
2013-02-18 15:23:23 UTC
Permalink
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

"jBPM TaskService.getTasksAssignedAsPotentialOwner pagination method deprecated"

To view the discussion, visit: https://community.jboss.org/message/798183#798183

--------------------------------------------------------------
Hello,

It seems with jBPM 5.4 that the following method is deprecated (as of https://issues.jboss.org/browse/JBPM-3695 https://issues.jboss.org/browse/JBPM-3695)


@Deprecated
List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, String language, int firstResult, int maxResult);


Is there another way now to have a list of tasks with pagination (I could use query but it's also Deprecated)  ?

Thanks
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798183#798183]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-02-19 15:21:26 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM TaskService.getTasksAssignedAsPotentialOwner pagination method deprecated"

To view the discussion, visit: https://community.jboss.org/message/798371#798371

--------------------------------------------------------------
You can register UserGroupCallBack via UserGroupCallbackManager. Or may be you can use the DefaultUserGroupCallBackImpl which can be created based on simple java.util.Properties files that has user and group mappings e.g.

alex=manager,sales,admin

After that you can use the method *taskClient.getTasksAssignedAsPotentialOwner (* http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true *String* *userId, * http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html?is-external=true *String* *language,* http://docs.jboss.org/jbpm/v5.4/javadocs/org/jbpm/task/service/TaskClientHandler.TaskSummaryResponseHandler.html *TaskClientHandler.TaskSummaryResponseHandler* *responseHandler)*

This will invoke the callback and will collect tasks considering all the groups of the userid, for instance for alex it will find tasks for all three groups (manager,sales,admin).

Regards.


--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798371#798371]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
gonzalad
2013-02-19 19:23:17 UTC
Permalink
gonzalad [https://community.jboss.org/people/gonzalad] created the discussion

"Re: jBPM TaskService.getTasksAssignedAsPotentialOwner pagination method deprecated"

To view the discussion, visit: https://community.jboss.org/message/798411#798411

--------------------------------------------------------------
Thanks roxy !

My question was more about where did database-side pagination go (in the previous versions of jBPM this was possible using the 2 parameters *int* firstResult, *int* maxResult).

I have the impression that now, if we have a huge inbox (or tasks assigned for the current user) we need to retrieve all the tasks from the database.

For now, I don't have any problem with that (just evaluating jBPM), but I want to know the best way to handle database pagination for these tasks when the need arise (I could call the deprecated method or the deprecated query method - but they are deprecated, so perhaps not the best solution ;( ).
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798411#798411]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
roxy1987
2013-02-19 21:29:13 UTC
Permalink
roxy1987 [https://community.jboss.org/people/roxy1987] created the discussion

"Re: jBPM TaskService.getTasksAssignedAsPotentialOwner pagination method deprecated"

To view the discussion, visit: https://community.jboss.org/message/798420#798420

--------------------------------------------------------------
Well I dont know about filtering the group tasks, but personal tasks can be filtered with status etc.
And for deprecation, well the method that I told you is not deprecated.

Regards.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/798420#798420]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...