use of org.jbpm.services.task.audit.variable.TaskIndexerManager in project jbpm by kiegroup.
the class JPATaskLifeCycleEventListener method indexAndPersistVariables.
protected void indexAndPersistVariables(Task task, Map<String, Object> variables, TaskPersistenceContext persistenceContext, VariableType type) {
TaskIndexerManager manager = TaskIndexerManager.get();
for (Map.Entry<String, Object> variable : variables.entrySet()) {
if (SKIPPED_TASK_VARIABLES.contains(variable.getKey()) || variable.getValue() == null) {
continue;
}
List<TaskVariable> taskVars = manager.index(task, variable.getKey(), variable.getValue());
if (taskVars != null) {
for (TaskVariable tVariable : taskVars) {
tVariable.setType(type);
persistenceContext.persist(tVariable);
}
}
}
}
Aggregations