This concept tackles problems around scheduled publication:
- The information about scheduled publication is burried deep inside the jBPM engine and using its timer functionality
- There's no way to take a look at future publications
- when approving a scheduled publication it is marked as resolved, and stays there, unless it fails during the actual publication
- No way to cancel future publications
This proposal/concept is about pulling the scheduling of publications out of the jBPM world and move it back into magnolia, by:
- extending the Tasks core functionality
- using the Magnolia's own scheduler
Everything in Pulse is hard coded, starting with the 'Tasks' and 'Messages' tabs down to the column in the list views. Some abstraction work was done when we introduced the tasks in 5.3, but we didn't finish what we started.
PulsePresenter should load the Messages- and Tasks-List views from configuration. Generalize everything at this level. Will need investigation and try and error.
Try to generalize PulsePresenter.
Add Pulse config to Admincentral module.
Add new Status to Task-Pojo.
On TaskModule start we should retrieve all 'scheduled' tasks. TaskService should already have this functionality.
For every task we should create a job in the scheduler.
jBPM and Process changes
update to jbpm 6.2, see what breaks
ResolvetaskAction should not 'resolve' the task in case there is a publication date set. add it to the scheduler using same logic as when Task module starts.
What should the scheduler job do? in case of scheduled publication: just resolve the task and let the info.magnolia.module.workflow.jbpm.humantask.ProcessTaskEventHandler#taskResolved and the jbpm engine take care of the rest (?).
First step would be to have an easy overview of scheduled publications inside the Pulse's task overview.
In the detailed view you should be able to abort a scheduled task (This is crashing with the abort introduced with 5.4, duh).
Further improvements in the Pulse
- Simplify statuses (to get some space back)
- All statuses are duplicated in the list view (e.g. 3 x 'New')
- make the columns not hardcoded
- remove task tab if it's not used (configurable), general cleanup
- make badge actions configurable: keep in mind that the actions are tide to the task type -> what's the lowest common denominator?
Tasks and Scheduler
I'm proposing to introduce 'Scheduling of tasks' (read: not only for publication) as a core functionality of Pulse tasks. Currently we have these statuses defined as Enums:
Archived(removed from the view),
Register a scheduled job using Magnolia Scheduler, which gets all Scheduled tasks which publication date has passed (every 15' ?) and execute them.
- we can reuse the tasks persistency, no need to do changes in the Scheduler module, e.g. add persistency.
- Other tasks can benefit from the future
- One should be able to query the for pending publications based on the node and workspace. Won't be as cheap as adding a flag to node itself.
- No additional app or something like that. It fits neatly into our concepts.
- Easy to implement
- The publication will be "delayed" by the execution period of the job. Does it matter?
We will have to update the processes. Remove the timer and take care of either 'Resolving' the task, when it gets approved or schedule it, which basically means setting the status.
Here's the current process, which should get simplified:
- We move one more critical step out of the jBPM-world.