Bug 1147757

Summary: UnsupportedOperationException when TaskService.getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, String language, int firstResult, int maxResults)
Product: [Retired] JBoss BPMS Platform 6 Reporter: Toshiya Kobayashi <tkobayas>
Component: Business CentralAssignee: Marco Rietveld <mrietvel>
Status: CLOSED NOTABUG QA Contact: Ivo Bek <ibek>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1.0CC: alazarot, kverlaen, mbaluch, mrietvel, rrajasek, smcgowan, tkobayas
Target Milestone: ER3   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1103970 Environment:
Last Closed: 2015-12-09 12:38:34 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Toshiya Kobayashi 2014-09-30 03:38:21 UTC
This bug was initially created as a clone of Bug #1103970 but the main issue of BZ1103970 is just related to BPMS 6.0.x and not to BPMS 6.1.x.

This BZ is cloned to focus on the Marco's comment below for BPMS 6.1.x.


--- Additional comment from Marco Rietveld on 2014-09-29 23:10:24 EDT ---

Here are the current issues: 

1. The "getTasksAssignedAsPotentialOwnerByStatusByGroup" method is a InternalTaskService method, not a TaskService method. The Remote Java API (kie-remote-client) supplies a TaskService implementation, *not* a InternalTaskService method. 

(In short, at the moment, there's no way to call this method.)

2. On the other hand, the method is paged and, as you mention, it's the only method where the user can submit a list of group ids as a parameter to retrieve tasks. 


I'm currently leaning towards promoting/refactoring the "getTasksAssignedAsPotentialOwnerByStatusByGroup" method from the InternalTaskService interface to the TaskService implementation. 

One other possibility is to provide access to the new query functionality that's been added to the InternalTaskService in the Remote Java API. This functionality supports the new REST query operations.

Comment 1 Toshiya Kobayashi 2014-09-30 03:45:00 UTC
+1 for promoting getTasksAssignedAsPotentialOwnerByStatusByGroup :)

Comment 2 Marco Rietveld 2014-10-23 20:09:16 UTC
Toshiya, this bug is for BPMS 6.1, right?

Comment 3 Toshiya Kobayashi 2014-10-24 01:38:45 UTC
Yes. This BZ is for BPMS 6.1.0. And BZ1103970 is for BPMS 6.0.x. Thank you for changing the version field.

Comment 4 Marco Rietveld 2014-11-26 14:39:36 UTC
This has been fixed in community (the operation has been readded to the TaskService interface) as part of the work for BZ 1120213. Please see that bug for more info.

Comment 5 Ivo Bek 2014-12-17 13:17:25 UTC
Failed in BPMS 6.1.0.ER3

Let's sum it up:

 - getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, int firstResult, int maxResults) - is deprecated
 - paging is now possible through the new query API:

https://github.com/mrietveld/droolsjbpm-integration/wiki/jBPM-Rest-Query-API

However, I do not see there any parameter to set groupIds, so we could have a replacement for the getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, int firstResult, int maxResults) and make other operations with groupIds.

Comment 6 Kris Verlaenen 2015-01-27 20:34:51 UTC
Operations with groupIds are indeed deprecated, as we've been recommending the use of the UserGroupCallback for a long time already (that is responsible for providing the roles for the user).  As a result, we are not planning to reintroduce more operations related to groupIds.

Introducing support for filtering of the results based on provided groupId(s) would be a good enhancement, especially if the amount of results is large so that paging is necessary, which makes client-side filtering based on groupId(s) difficult.  Note that this should only be used to do _additional_ filtering of the results, it would not allow you to avoid the UserGroupCallback and provide roles that otherwise wouldn't already be available by UserGroupCallback.

Will look into this as a future feature request.

Comment 7 Marco Rietveld 2015-12-09 12:38:34 UTC
Created a jira here: https://issues.jboss.org/browse/JBPM-4873