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);
}
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 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.

...