Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fixed old macros

...

Info
iconfalse
titleBest practice
Multiexcerpt
MultiExcerptNameDon't use tasks if you don't have any human activity in your workflow

Don't Do not use tasks if you don't have any human activity in your workflow. Tasks and Pulse notifications are great for humans but unnecessary for operations that only involve the system itself.

...

A task is an object that you create using the 

Javadoc
0info.magnolia.task.TasksManager
classNameinfo.magnolia.task.TasksManager
renderTypeasynchronous
. You can send the task to a list of users or to a list of groups. The recipient can assign the task to himself. Other recipients can see who owns the task and its status when they go to the Pulse.

...

Start by giving the

Javadoc
0info.magnolia.task.Task
classNameinfo.magnolia.task.Task
renderTypeasynchronous
 a name. The name is unique for the type of task you are creating and acts as a reference to the task definition in the registry.

...

Changes to task status can be tracked by registering a 

Javadoc
0info.magnolia.task.event.TaskEventHandler
classNameinfo.magnolia.task.event.TaskEventHandler
renderTypeasynchronous
 to the system event bus.

...


The simplest

Javadoc
0info.magnolia.task.definition.TaskDefinition
classNameinfo.magnolia.task.definition.TaskDefinition
renderTypeasynchronous
 needs the following properties:

...

A task presenter is started when a user opens a task to see its details. The presenter builds the form and action bar which are displayed to the user in the browser. Magnolia provides a 

Javadoc
0info.magnolia.ui.admincentral.shellapp.pulse.task.DefaultTaskDetailPresenter
classNameinfo.magnolia.
See T above for
ui.admincentral.shellapp.pulse.task.DefaultTaskDetailPresenter
renderTypeasynchronous
. See Task view for its functionality.

Most likely the task data you want to display in the Pulse can be rendered with the DefaultTaskDetailPresenter. But in case the default presenter is not sufficient you can implement your own presenter and have it render whatever view is needed.

To implement a custom presenter, extend or use 

Javadoc
0info.magnolia.ui.admincentral.shellapp.pulse.task.definition.TaskUiDefinition
classNameinfo.magnolia.ui.admincentral.shellapp.pulse.task.definition.TaskUiDefinition
renderTypeasynchronous
 instead of 
Javadoc
0info.magnolia.task.definition.TaskDefinition
classNameinfo.magnolia.task.definition.TaskDefinition
renderTypeasynchronous
 and add a presenterClass property with a custom implementation of the 
Javadoc
0info.magnolia.ui.admincentral.shellapp.pulse.task.TaskDetailPresenter
classNameinfo.magnolia.ui.admincentral.shellapp.pulse.task.TaskDetailPresenter
renderTypeasynchronous
interface to the configuration.

...