Filtering Process Instances and User Tasks


I have a dashboard that displays all the user tasks for multiple processes. I wanted to implement a functionality to filter these tasks based on multiple filter values.

I am planning to assign some labels to each task/process. A task can have multiple labels. We are not using these variables to make flow decisions in the BPMN diagram.

  1. Can we store these values as process variables? Ideally, we should store variables as process variables that make the decision to take a certain flow in the BPMN diagram.

  2. Can we create a process variable that can store multiple labels and query the task using TaskService?

  3. Can we create a query that will return all the tasks with a certain label like “lang_en”? As mentioned below

execution.setVariable("language_label", ["lang_en", "lang_eu"])

val query = taskService.createTaskQuery().processVariableValueEquals("language_label", "lang_en")