[TASKMGMT-18] Allow scheduling tasks Created: 20/Mar/15  Updated: 01/Jul/15  Resolved: 22/May/15

Status: Closed
Project: Task Management
Component/s: None
Affects Version/s: None
Fix Version/s: 1.1

Type: New Feature Priority: Neutral
Reporter: Espen Jervidalo Assignee: Espen Jervidalo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to TASKMGMT-20 Scheduled tasks are not executed on s... Closed
causality
is causing TASKMGMT-21 Task management cannot depend on sche... Closed
dependency
is depended upon by MGNLWORKFLOW-290 Use scheduled task instead of jBPM timer Closed
relation
Template:
Acceptance criteria:
Empty
Date of First Response:

 Comments   
Comment by Espen Jervidalo [ 24/Mar/15 ]

This was implemented by Sang Ngo. Missing permissions in Jira.

Comment by Espen Jervidalo [ 24/Mar/15 ]

The coverage dropped by 10%. Make sure to run mvn install with 'Penable-clover' to check, before pushing. Some things that miss test-cases:
info.magnolia.task.persistence.TasksStoreImpl#findTasksByStatus
info.magnolia.task.schedule.DefaultTaskSchedulerService
info.magnolia.task.TaskManagementModule#start e.g. verify() that all tasks returned by mocked taskManager are scheduled.

info.magnolia.task.TasksManager#registerClassMappings
remove from interface and implementation. It is used by OCM as is very JCR specific. The manager should not be specific to the underlying storage.

info.magnolia.task.TaskManagementModule#start scheduledService.schedule(tasksStore.findTasksByStatus(Arrays.asList(Status.Scheduled)));
use the taskmanager to retrieve the scheduled tasks. But use taskStore to register the class mappings.
info.magnolia.task.TaskManagementModule#scheduledService rename field to 'schedulerService'

info.magnolia.task.DefaultTasksManager#scheduleService rename field to 'schedulerService'

Comment by Espen Jervidalo [ 27/Mar/15 ]

scheduled-publication branch

Comment by Philip Mundt [ 15/Apr/15 ]

Some remarks/feedback:

  • info.magnolia.task.schedule.DefaultTaskSchedulerService
    • info.magnolia.task.schedule.DefaultTaskSchedulerService#schedule(info.magnolia.task.Task)
      • Null check in call? (Maybe in info.magnolia.task.DefaultTasksManager)
      • Use placeholders {} in log statements
      • One line if statement should still be wrapped in { }
    • Use final variables where applicable?
  • info.magnolia.task.schedule.ScheduledTask
    • Rename? Is it a factory?
    • Same for the implementation in WF module?
  • info.magnolia.task.TaskManagementModule deprecate old constructor in stead of removing it (use component provider to aquire instance of info.magnolia.task.schedule.TaskSchedulerService)
Comment by Michael Mühlebach [ 05/May/15 ]

I noticed the following things in the QA:

  • If the instance is stopped/killed between the approve and the execution of the task and started after the scheduled time, it is not executed although the state of the task says so
Comment by Espen Jervidalo [ 22/May/15 ]

The task is actually executed correctly, but the listener inside of the workflow module is not yet registered, as the task-mgmt module starts before workflow.

A fix would be to delay the execution by some minutes pbly. I'll create a follow up ticket for this.

Comment by Espen Jervidalo [ 22/May/15 ]

See linked ticket. Will resolve this one.

Generated at Mon Feb 12 11:02:17 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.