use of org.camunda.bpm.engine.impl.oplog.UserOperationLogContextEntryBuilder in project camunda-bpm-platform by camunda.
the class UserOperationLogManager method logTaskOperations.
public void logTaskOperations(String operation, TaskEntity task, List<PropertyChange> propertyChanges) {
if (isUserOperationLogEnabled()) {
UserOperationLogContext context = new UserOperationLogContext();
UserOperationLogContextEntryBuilder entryBuilder = UserOperationLogContextEntryBuilder.entry(operation, EntityTypes.TASK).inContextOf(task, propertyChanges);
context.addEntry(entryBuilder.create());
fireUserOperationLog(context);
}
}
use of org.camunda.bpm.engine.impl.oplog.UserOperationLogContextEntryBuilder in project camunda-bpm-platform by camunda.
the class UserOperationLogManager method logJobDefinitionOperation.
public void logJobDefinitionOperation(String operation, String jobDefinitionId, String processDefinitionId, String processDefinitionKey, PropertyChange propertyChange) {
if (isUserOperationLogEnabled()) {
UserOperationLogContext context = new UserOperationLogContext();
UserOperationLogContextEntryBuilder entryBuilder = UserOperationLogContextEntryBuilder.entry(operation, EntityTypes.JOB_DEFINITION).jobDefinitionId(jobDefinitionId).processDefinitionId(processDefinitionId).processDefinitionKey(processDefinitionKey).propertyChanges(propertyChange);
if (jobDefinitionId != null) {
JobDefinitionEntity jobDefinition = getJobDefinitionManager().findById(jobDefinitionId);
// Backward compatibility
if (jobDefinition != null) {
entryBuilder.inContextOf(jobDefinition);
}
} else if (processDefinitionId != null) {
ProcessDefinitionEntity definition = getProcessDefinitionManager().findLatestProcessDefinitionById(processDefinitionId);
// Backward compatibility
if (definition != null) {
entryBuilder.inContextOf(definition);
}
}
context.addEntry(entryBuilder.create());
fireUserOperationLog(context);
}
}
use of org.camunda.bpm.engine.impl.oplog.UserOperationLogContextEntryBuilder in project camunda-bpm-platform by camunda.
the class UserOperationLogManager method logProcessInstanceOperation.
public void logProcessInstanceOperation(String operation, String processInstanceId, String processDefinitionId, String processDefinitionKey, List<PropertyChange> propertyChanges) {
if (isUserOperationLogEnabled()) {
UserOperationLogContext context = new UserOperationLogContext();
UserOperationLogContextEntryBuilder entryBuilder = UserOperationLogContextEntryBuilder.entry(operation, EntityTypes.PROCESS_INSTANCE).propertyChanges(propertyChanges).processInstanceId(processInstanceId).processDefinitionId(processDefinitionId).processDefinitionKey(processDefinitionKey);
if (processInstanceId != null) {
ExecutionEntity instance = getProcessInstanceManager().findExecutionById(processInstanceId);
if (instance != null) {
entryBuilder.inContextOf(instance);
}
} else if (processDefinitionId != null) {
ProcessDefinitionEntity definition = getProcessDefinitionManager().findLatestProcessDefinitionById(processDefinitionId);
if (definition != null) {
entryBuilder.inContextOf(definition);
}
}
context.addEntry(entryBuilder.create());
fireUserOperationLog(context);
}
}
use of org.camunda.bpm.engine.impl.oplog.UserOperationLogContextEntryBuilder in project camunda-bpm-platform by camunda.
the class UserOperationLogManager method logProcessDefinitionOperation.
public void logProcessDefinitionOperation(String operation, String processDefinitionId, String processDefinitionKey, PropertyChange propertyChange) {
if (isUserOperationLogEnabled()) {
UserOperationLogContext context = new UserOperationLogContext();
UserOperationLogContextEntryBuilder entryBuilder = UserOperationLogContextEntryBuilder.entry(operation, EntityTypes.PROCESS_DEFINITION).propertyChanges(propertyChange).processDefinitionId(processDefinitionId).processDefinitionKey(processDefinitionKey);
if (processDefinitionId != null) {
ProcessDefinitionEntity definition = getProcessDefinitionManager().findLatestProcessDefinitionById(processDefinitionId);
entryBuilder.inContextOf(definition);
}
context.addEntry(entryBuilder.create());
fireUserOperationLog(context);
}
}
use of org.camunda.bpm.engine.impl.oplog.UserOperationLogContextEntryBuilder in project camunda-bpm-platform by camunda.
the class UserOperationLogManager method logBatchOperation.
public void logBatchOperation(String operation, String batchId, PropertyChange propertyChange) {
if (isUserOperationLogEnabled()) {
UserOperationLogContext context = new UserOperationLogContext();
UserOperationLogContextEntryBuilder entryBuilder = UserOperationLogContextEntryBuilder.entry(operation, EntityTypes.BATCH).batchId(batchId).propertyChanges(propertyChange);
context.addEntry(entryBuilder.create());
fireUserOperationLog(context);
}
}
Aggregations