Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleUsing TasksManager
@Inject
public MyClass(TasksManager tasksManager) {
	this.tasksManager = tasksManager;
}

public void createTask() {
    Task task = new Task();
    ...
	tasksManager.addTask(task);
}

Creating a task

Note

Be aware that by calling

Code Block
task.setId(String);

the task will not be created in the workspace.


Creating a task

Start by giving the task a Start by giving the

Javadoc resource link
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.

...


As with any definition used in Magnolia, you can define your own extensions to the task definition and add configurable nodes and properties. This is especially useful in combination with a custom Taskpresentertask presenter for putting together the detail view.

...

To allow bulk actions for other users, add their role names from the list of default roles as the properties and values of the roles subnode.

...