Learn how to create custom workflows for managing your editorial processes.This presentation covers Magnolia CMS process modelling and custom tasks, as well as how to implement a work item handler for executing custom tasks and configuring and putting the pieces together.
15. Create a Task
!
!
Task task = new Task();
!
// this maps to your task definition
task.setName(“yourTask”);
!
// relevant data for e.g. displaying in the Pulse.
task.setContent(new HashMap() {{
.put(“some”, “data”)
}});
!
// set actors
task.setActorIds(“susan”, “peter”)
!
tasksManager.addTask(task);
16. Use TaskManger
!
/**
* Inject the TaskManager into your classes.
*/
@Inject
public MyClass(TasksManager tasksManager) {
this.taskManager = taskManager
}
!
27. RESOURCES
Magnolia’s Worflow documentation
Including tutorial in the Academy
http://documentation.magnolia-cms.com/display/DOCS/Workflow
!
Official jBPM documentation
!
Samples used in webinar available on Git:
http://git.magnolia-cms.com/git/forge/jbpm-email-sample.git
branch: webinar