Hi,
I have a user task, say, BackupAssignmentTask.
I’m storing a DTO in my process variables, assignmentDTO, which has id in it.
I have a REST api, which passes assignmentId as a parameter and I want to fetch the task by task definition and process variable which has assignmentId equals to the passed assignmentId.
Is there any way I can achieve this using taskService.
Thanks
I have tried below. in 2nd log, I get empty list, in third log, I get all the task. But i want specific task which matches my assignmentId.
public void closeAssignmentBackupAcknowledgeUserTask(Long assignmentId) {
log.debug("Completing the user task backup acknowledge for the assignment {}", assignmentId);
log.debug("Task is {}", taskService.createTaskQuery().processVariableValueEquals("assignmentProcessDTO.assignmentDTO.id", assignmentId).list());
log.debug("task with def key {}", taskService.createTaskQuery().taskDefinitionKey("ccAcknowledgesBackup").list());
}