use of org.kie.server.services.taskassigning.core.model.ModelConstants.PLANNING_USER in project droolsjbpm-integration by kiegroup.
the class AddTaskProblemFactChangeTest method addTaskProblemFactChange.
private void addTaskProblemFactChange(TaskAssigningSolution solution, List<Long> taskIds) throws Exception {
solution.getUserList().add(PLANNING_USER);
List<ProgrammedProblemFactChange<AddTaskProblemFactChange>> programmedChanges = taskIds.stream().map(id -> new ProgrammedProblemFactChange<>(new AddTaskProblemFactChange(new Task(id, "NewTask_" + id, 1)))).collect(Collectors.toList());
// each partial solution must have the change that was applied on it.
executeSequentialChanges(solution, programmedChanges);
programmedChanges.forEach(change -> assertAddTaskProblemFactChangeWasProduced(change.getChange(), change.getSolutionAfterChange()));
// finally the last solution must have the result of all the changes.
TaskAssigningSolution lastSolution = programmedChanges.get(programmedChanges.size() - 1).getSolutionAfterChange();
programmedChanges.forEach(change -> assertAddTaskProblemFactChangeWasProduced(change.getChange(), lastSolution));
}
Aggregations