Filtering tasks by task name (Form Key) using WorkflowTaskQuery

cancel
Showing results for 
Search instead for 
Did you mean: 
Tabu
Member II

Filtering tasks by task name (Form Key) using WorkflowTaskQuery

Hi,
I wanted to filter the tasks using setTaskName which is the method of WorkflowTaskQuery class. I've tried it by using the below code as it requires QName as its parameter, but it didn't provide me with any of the result. I got an empty response.

String c1 = "aclrqSmiley TonguereparePo";
QName fk;
fk = QName.createQName(c1, namespaceService);
WorkflowTaskQuery taskQuery = new WorkflowTaskQuery();
taskQuery.setActive(null);
taskQuery.setWorkflowDefinitionName(workflowName);
taskQuery.setTaskState(state);
taskQuery.setTaskName(fk);
allTasks = workflowService.queryTasks(taskQuery);

Please do provide me a solution. Any help would be appreciated
Thank you!