Hi guys,
I need to create a multiple types of Tasks that haven’t a parent. I need to set a label/key that contains the type of my task.
Afterwards, I need to execute a Query and retrieve all task of specific type.
not 100% sure but you could try the following code snippet
//Save task with specific type
TaskEntity task=(TaskEntity)taskService.newTask();
task.setTaskDefinitionKey("myTaskType");
taskService.saveTask(task);
//Query for tasks
taskService.createTaskQuery().taskDefinitionKey("myTaskType").list();