Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1120213 - Changes in kie-api.
Summary: Changes in kie-api.
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ER5
: 6.1.0
Assignee: Shelly McGowan
QA Contact: Marek Baluch
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-16 12:52 UTC by Marek Baluch
Modified: 2020-03-27 19:47 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2020-03-27 19:47:28 UTC
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1053793 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 1053793

Description Marek Baluch 2014-07-16 12:52:48 UTC
*** Description of problem:
There are changes in the kie-api which break backward functionality with 6.0.x version (and 5.3.x).

* Missing classes:

* Missing methods
org.kie.api.task.TaskService.getTasksAssignedAsPotentialOwner(java.lang.String,java.util.List,java.lang.String,int,int) on class org.kie.api.task.TaskService

org.kie.api.task.TaskService.getTasksByVariousFields(java.util.List,java.util.List,java.util.List,java.util.List,java.util.List,java.util.List,java.util.List,java.util.List,boolean) on class org.kie.api.task.TaskService

org.kie.api.task.TaskService.getTasksByVariousFields(java.util.Map,boolean) on class org.kie.api.task.TaskService

Comment 1 Jiri Svitak 2014-10-15 15:21:51 UTC
Majority of the missing methods belong to BPMS.

Comment 2 Kris Verlaenen 2014-10-30 23:32:10 UTC
Mario, could you comment on the removal of QuartzHelper? 

Comment 3 Kris Verlaenen 2014-10-30 23:52:56 UTC
The getTaskByVariousFields(..) operations were incorrectly available in kie-api for 6.0.x, they were used by the REST service and should have been added to kie-internal.

The getTasksAssignedAsPotentialOwner with paging parameters was added based on a specific customer request for 6.0.1.GA, it was not applied to master at that point.  For 6.1, new operations using QueryFilters are available in kie-internal TaskService.

I assume we could look at (re)adding the same operations in master for backwards compatibility if that is deemed critical, Marek, wdyt?

Comment 4 Mario Fusco 2014-10-31 09:09:40 UTC
That QuartzHelper class has been incorrectly made available on kie-api and then removed, mainly because we want to keep the dependencies of our api to a minimal level and in particular we don't think it is necessary (or correct) that they depend on quartz.

Comment 5 Marek Baluch 2014-10-31 22:33:49 UTC
I unable to assess how widely those methods are used (which would determine severity), but I would prefer to see them in the API for backward compatibility.

Comment 6 Marco Rietveld 2014-11-25 15:36:59 UTC
Marek, one thing to note about the methods is that the original API contained a mistake: 

It's not possible to identify the user doing the operation with the the following methods:
- org.kie.api.task.TaskService.getTasksByVariousFields( java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, boolean )
- org.kie.api.task.TaskService.getTasksByVariousFields( java.util.Map, boolean )

For that reason, both methods now have a String (userId) as the first argument and have the following signatures: 

- org.kie.api.task.TaskService.getTasksByVariousFields( java.lang.String, java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, java.util.List, boolean )
- org.kie.api.task.TaskService.getTasksByVariousFields( java.lang.String, java.util.Map, boolean )

Comment 8 Marek Baluch 2014-12-18 11:29:50 UTC
Marco, the signatures are not correct. Please see


which contains the old API to which the comparison was made.

Comment 9 Kris Verlaenen 2015-01-07 14:18:39 UTC
Seems the userId parameter was not yet there for the two getTasksByVariousFields operations in 6.0.x.  Is this required, or could we simply add another operation that would delegate to the second one where userId would be null?

Also the new getTasksAssignedAsPotentialOwner(..) should include a language parameter and the first getTasksByVariousFields operation is missing a language parameter as well.

Comment 10 Marco Rietveld 2015-01-19 16:28:00 UTC
The userId is required for the two getTasksByVariousFields operations in 6.0.x: not having them breaks the Task API because it allows ALL users to access tasks regardless of permissions. This then becomes a security bug. 

I'll push a fix to do the following: 
- add the String language parameter back to the following operation: 

List<TaskSummary> getTasksAssignedAsPotentialOwner(String userId, List<String> groupIds, int firstResult, int maxResults);

- add the List<String> language parameter back to the following operation: 

List<TaskSummary> getTasksByVariousFields( String userId, List<Long> workItemIds, List<Long> taskIds, List<Long> procInstids, List<String> busAdmins, List<String> potOwners, List<String> taskOwners, List<Status> status,  boolean union);

Comment 13 Kris Verlaenen 2015-01-20 14:36:30 UTC
Yes, I think it's best if master doesn't diverge from 6.2.x (yet).

Comment 15 Marek Baluch 2015-02-25 09:52:00 UTC
Verified on 6.1.0.ER5.

Note You need to log in before you can comment on or make changes to this bug.