Description of problem: When I try to get list of active tasks which were activated since some specific date by calling method getActiveTasks(Date since) in SynchronizedTaskService, I get list of tasks which were created since that specific date and are now active. It is caused by setting activation time to same time as is creation time. [1] Version-Release number of selected component (if applicable): 6.1.0.ER6 How reproducible: Start process with human task and start task. Call getActiveTasks(date) with date which is between time when task is created and when it is started. Steps to Reproduce: 1. 2. 3. Actual results: getActiveTasks returns empty list Expected results: getActiveTasks should return list with task which was started after specified date Additional info: [1] https://github.com/droolsjbpm/jbpm/blob/master/jbpm-human-task/jbpm-human-task-jpa/src/main/java/org/jbpm/services/task/impl/model/TaskDataImpl.java#L388
Same issue with method getCompletedTasks(Date since).
this is actually as expected - as WS-HT splits creation and activation into two steps in jBPM we have that as part of task creation and thus it is set to the same data. Activation means task has been assigned to either single actor (ends in status Reserved) or to multiple actors/groups (ends in status Ready) Task can only be activated (WS-HT operation) when is in state created meaning there are no actors assigned at all on given task. So I believe this works as designed, though not sure about complete comment....
Ok, it is more clear to me now. I am still partly unsure about functionality of getActiveTasks and getCompletedTasks from InternalTaskService - implemented in TaskAdminServiceImpl. When there is put date as parameter then this date is compared to activationTime, is it how it should be done? See: getActiveTasks() - should return tasks which are in progress - ok getActiveTasks(Date since) - should return tasks which are in progress and which were created/activated after specified date? getCompletedTasks() - should return tasks which are completed - ok getCompletedTasks(Date since) - should return tasks which are completed and which were created/activated after specified date? For me it would be more logical if that date parameter will be related to time when task status was changed. So getActiveTasks(Date since) would return tasks which were started after that date and getCompletedTasks(Date since) would return tasks which were finished after that date.
(In reply to ksuta from comment #5) > Ok, it is more clear to me now. > > I am still partly unsure about functionality of getActiveTasks and > getCompletedTasks from InternalTaskService - implemented in > TaskAdminServiceImpl. > When there is put date as parameter then this date is compared to > activationTime, is it how it should be done? > See: > > getActiveTasks() - should return tasks which are in progress - ok > getActiveTasks(Date since) - should return tasks which are in progress and > which were created/activated after specified date? > getCompletedTasks() - should return tasks which are completed - ok > getCompletedTasks(Date since) - should return tasks which are completed and > which were created/activated after specified date? these are exact description on how it does work at the moment. > > For me it would be more logical if that date parameter will be related to > time when task status was changed. So getActiveTasks(Date since) would > return tasks which were started after that date and getCompletedTasks(Date > since) would return tasks which were finished after that date. agree that this would be ultimate goal for these methods though we need to extend the schema to include time information about when task has been started and completed so they can be used for queries. These are not defined in WS-HT and that's most likely main reason they are not yet in there.
Currently works as it should. Closed as part of BZ cleanup, if somebody would miss functionality described in ultimate goal then there can be opened new Jira.