use of org.kie.internal.task.api.TaskVariableIndexer in project jbpm by kiegroup.
the class TaskIndexerManager method index.
public List<TaskVariable> index(Task task, String variableName, Object variable) {
for (TaskVariableIndexer indexer : indexers) {
if (indexer.accept(variable)) {
List<TaskVariable> indexed = indexer.index(variableName, variable);
if (indexed != null) {
// populate all indexed variables with task information
for (TaskVariable taskVariable : indexed) {
taskVariable.setTaskId(task.getId());
taskVariable.setTaskId(task.getId());
taskVariable.setProcessInstanceId(task.getTaskData().getProcessInstanceId());
taskVariable.setProcessId(task.getTaskData().getProcessId());
taskVariable.setModificationDate(new Date());
}
return indexed;
}
}
}
return null;
}
Aggregations