i can’t seem to figure it out. I am writing a custom query for the REST-API. I want to have ALL Tasks, a given user was involved like the standard REST-API does (REST/history/task?taskInvolvedUser=userId).
This is my code: List<HistoricTaskInstance> historyTasks = historyService.createHistoricTaskInstanceQuery().taskInvolvedUser(userId).list();
yes it does not give back the expected result. Here’s a lil bit more for clarification. Sry the original post was bad…
user1 and user2 had been added in another test.
This is my Test. The username is correct, but myTasksCount and myProcessesCount is wrong. Heres the code inside navbarData function that should retrieve this data:
Am i doing something wrong in starting the processes?
i mean the processInstances are there, otherwise List<Task> tasks = taskService.createTaskQuery().or().taskAssignee(userId).taskCandidateGroupIn(group).endOr() .processVariableValueNotEquals("initiator", userId).list(); navbarDTO.setMyTasksCount(tasks.size());
would also give me a false result, but here i get the expected 3 tasks when running the query. does the historicTaskInstanceQuery look for some variable that i did not set and that will not be set by using the runtimeService.startProcessInstanceByKey("testid", variables);
command?