Bug 1120213 - Changes in kie-api.
Summary: Changes in kie-api.
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ER5
: 6.1.0
Assignee: Shelly McGowan
QA Contact: Marek Baluch
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-16 12:52 UTC by Marek Baluch
Modified: 2017-12-07 23:38 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1053793 None None None Never

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:
org.kie.api.runtime.help.QuartzHelper

* 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? 
https://github.com/droolsjbpm/droolsjbpm-knowledge/commit/52782d3e0eea40d3ce43003ab24e80aac82f15a8

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

http://git.app.eng.bos.redhat.com/git/droolsjbpm/droolsjbpm-knowledge.git/tree/kie-api/src/main/java/org/kie/api/task/TaskService.java?id=sync-6.0.x-2014.09.05

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.