logUserOperations(context);
}
}
protected UserOperationLogContext createContextForTask(String entityType, String operation, TaskEntity task, List<PropertyChange> propertyChanges) {
UserOperationLogContext context = new UserOperationLogContext();
context.setEntityType(entityType);
context.setOperationType(operation);
if (propertyChanges == null || propertyChanges.isEmpty()) {
if (OPERATION_TYPE_CREATE.equals(operation)) {
propertyChanges = Arrays.asList(PropertyChange.EMPTY_CHANGE);
}
}
context.setPropertyChanges(propertyChanges);
context.setProcessDefinitionId(task.getProcessDefinitionId());
context.setProcessInstanceId(task.getProcessInstanceId());
context.setExecutionId(task.getExecutionId());
context.setCaseDefinitionId(task.getCaseDefinitionId());
context.setCaseInstanceId(task.getCaseInstanceId());
context.setCaseExecutionId(task.getCaseExecutionId());
context.setTaskId(task.getId());
return context;
}