Fetch tasks using multiple task name

Hi All,

I have a requirement, where if the taskname is “Create letter” or “Prepare”, I need to perform certain actions.
I can see that within the taskService.createTaskQuery().taskName(“”) accepts only 1 task name. how can I achieve this request without having to duplicate the logic for each task.

Hi @syedkp ,

sadly a function like taskNameIn like for taskIdIn does not exist.

As a workaround you could use taskDefinitionKeyIn. This should be viable except you change task names dynamically and try to query for theses.

Kind regards
Adagatiya

Thanks @Adagatiya . I will use the above method.

1 Like