cancel
Showing results for 
Search instead for 
Did you mean: 

Filtering tasks by task name (Form Key) using WorkflowTaskQuery

Tabu
Champ in-the-making
Champ in-the-making

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!

0 REPLIES 0