Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
TASKS AND 
WORKFLOW 
AUGUST 28, 2014 
Photo Credit:
ESPEN JERVIDALO 
SENIOR SOFTWARE ENGINEER
AGENDA 
! 
Introduction 
publication workflow 
Tasks 
Workflow 
process modelling
MAGNOLIA 4.5 
OpenWFE as workflow engine 
Work Item Inbox 
MAGNOLIA 4.5 
OpenWFE as workflow engine 
Work Item Inbox 
Open...
WORKFLOW 5.0 - 5.2 
jBPM 5 
rudimentary integration 
incremental fixes
WORKFLOW 5.3 
bundled w/ Magnolia 5.2.x 
jBPM 6 
rewritten persistence, configuration simplified
NOTIFICATIONS 
Similar to emails 
What’s the status? 
“Ooops I just deleted the message”
WORKFLOW 5.4 
bundled w/ Magnolia 5.3 
Introducing Tasks
DEMO
process jBPM engine 
publication workflow 
GOT IT? 
Call Activity 
processes 
Work Item Handler 
Human Task
.
TASKS 
AWESOME
TASKS MODULE 
completely self contained 
CE Bundle
DEMO
Create a Task 
! 
! 
Task task = new Task(); 
! 
// this maps to your task definition 
task.setName(“yourTask”); 
! 
// re...
Use TaskManger 
! 
/** 
* Inject the TaskManager into your classes. 
*/ 
@Inject 
public MyClass(TasksManager tasksManager...
Email Notifications 
! 
TaskEmailService implements TaskEventHandler { 
! 
@Inject 
public(@Named(SystemEventBus.NAME) Eve...
THINK TASKS 
Can I do XY with workflow? 
We want to do XY with Workflow!
Photo Credit: flying time by Luke Ma 
WORKFLOW
PROCESS BASICS
YOUR MODULE 
Your starting point 
Don’t use Magnolia’s modules
PROCESS 
Start with a simple process 
Learning by doing
public class LogWorkItemHandler implements WorkItemHandler { 
! 
private static final Logger log = LoggerFactory.getLogger...
THANK 
YOU!
QUESTIONS?
RESOURCES 
Magnolia’s Worflow documentation 
Including tutorial in the Academy 
http://documentation.magnolia-cms.com/disp...
Magnolia CMS Tasks & Workflows
Upcoming SlideShare
Loading in …5
×

Magnolia CMS Tasks & Workflows

1,462 views

Published on

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.

Published in: Technology
  • Be the first to comment

Magnolia CMS Tasks & Workflows

  1. 1. TASKS AND WORKFLOW AUGUST 28, 2014 Photo Credit:
  2. 2. ESPEN JERVIDALO SENIOR SOFTWARE ENGINEER
  3. 3. AGENDA ! Introduction publication workflow Tasks Workflow process modelling
  4. 4. MAGNOLIA 4.5 OpenWFE as workflow engine Work Item Inbox MAGNOLIA 4.5 OpenWFE as workflow engine Work Item Inbox OpenWFE discontinued ! OpenWFE discontinued
  5. 5. WORKFLOW 5.0 - 5.2 jBPM 5 rudimentary integration incremental fixes
  6. 6. WORKFLOW 5.3 bundled w/ Magnolia 5.2.x jBPM 6 rewritten persistence, configuration simplified
  7. 7. NOTIFICATIONS Similar to emails What’s the status? “Ooops I just deleted the message”
  8. 8. WORKFLOW 5.4 bundled w/ Magnolia 5.3 Introducing Tasks
  9. 9. DEMO
  10. 10. process jBPM engine publication workflow GOT IT? Call Activity processes Work Item Handler Human Task
  11. 11. .
  12. 12. TASKS AWESOME
  13. 13. TASKS MODULE completely self contained CE Bundle
  14. 14. DEMO
  15. 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. 16. Use TaskManger ! /** * Inject the TaskManager into your classes. */ @Inject public MyClass(TasksManager tasksManager) { this.taskManager = taskManager } !
  17. 17. Email Notifications ! TaskEmailService implements TaskEventHandler { ! @Inject public(@Named(SystemEventBus.NAME) EventBus eventBus) { eventBus.addHandler(TaskEvent.class, this); } ! @Override public void taskResolved(TaskEvent taskEvent) { // send email code goes here } ! … }
  18. 18. THINK TASKS Can I do XY with workflow? We want to do XY with Workflow!
  19. 19. Photo Credit: flying time by Luke Ma WORKFLOW
  20. 20. PROCESS BASICS
  21. 21. YOUR MODULE Your starting point Don’t use Magnolia’s modules
  22. 22. PROCESS Start with a simple process Learning by doing
  23. 23. public class LogWorkItemHandler implements WorkItemHandler { ! private static final Logger log = LoggerFactory.getLogger(LogWorkItemHandler.class); ! @Override public void executeWorkItem(WorkItem workItem, WorkItemManager manager) { String parameter = (String) workItem.getParameter("whatever"); ! log.error(parameter); manager.completeWorkItem(workItem.getId(), new HashMap<String, Object>()); } Work ! @Override Item Handler public void abortWorkItem(WorkItem workItem, WorkItemManager manager) { ! } }
  24. 24. THANK YOU!
  25. 25. QUESTIONS?
  26. 26. 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

×