Package org.camunda.bpm.engine.history

Examples of org.camunda.bpm.engine.history.UserOperationLogContext


    }
  }

  public void logTaskOperations(String operation, TaskEntity task, List<PropertyChange> propertyChanges) {
    if (isHistoryLevelFullEnabled()) {
      UserOperationLogContext context = createContextForTask(ENTITY_TYPE_TASK, operation, task, propertyChanges);
      logUserOperations(context);
    }
  }
View Full Code Here


    }
  }

  public void logLinkOperation(String operation, TaskEntity task, PropertyChange propertyChange) {
    if (isHistoryLevelFullEnabled()) {
      UserOperationLogContext context = createContextForTask(ENTITY_TYPE_IDENTITY_LINK, operation, task, Arrays.asList(propertyChange));
      logUserOperations(context);
    }
  }
View Full Code Here

   * that are affected by the operation.
   */
  public void logProcessInstanceOperation(String operation, String processInstanceId,
      String processDefinitionId, String processDefinitionKey, PropertyChange propertyChange) {
    if (isHistoryLevelFullEnabled()) {
      UserOperationLogContext context = createContextForProcessInstance(
          operation, processInstanceId,
          processDefinitionId, processDefinitionKey, Arrays.asList(propertyChange));
      logUserOperations(context);
    }
  }
View Full Code Here

    }
  }

  public void logAttachmentOperation(String operation, TaskEntity task, PropertyChange propertyChange) {
    if (isHistoryLevelFullEnabled()) {
      UserOperationLogContext context = createContextForTask(ENTITY_TYPE_ATTACHMENT, operation, task, Arrays.asList(propertyChange));
      logUserOperations(context);
    }
  }
View Full Code Here

      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;
  }
View Full Code Here

  }

  protected UserOperationLogContext createContextForProcessInstance(String operation,
      String processInstanceId, String processDefinitionId,
      String processDefinitionKey, List<PropertyChange> propertyChanges) {
    UserOperationLogContext context = new UserOperationLogContext();

    context.setEntityType(EntityTypes.PROCESS_INSTANCE);
    context.setOperationType(operation);

    context.setProcessInstanceId(processInstanceId);
    context.setProcessDefinitionId(processDefinitionId);
    context.setProcessDefinitionKey(processDefinitionKey);
    context.setPropertyChanges(propertyChanges);

    return context;
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.history.UserOperationLogContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.