Java Code Examples for org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery#disableCustomObjectDeserialization()

The following examples show how to use org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery#disableCustomObjectDeserialization() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HistoricDecisionInstanceResourceImpl.java    From camunda-bpm-platform with Apache License 2.0 6 votes vote down vote up
public HistoricDecisionInstanceDto getHistoricDecisionInstance(Boolean includeInputs, Boolean includeOutputs, Boolean disableBinaryFetching, Boolean disableCustomObjectDeserialization) {
  HistoryService historyService = engine.getHistoryService();

  HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery().decisionInstanceId(decisionInstanceId);
  if (includeInputs != null && includeInputs) {
    query.includeInputs();
  }
  if (includeOutputs != null && includeOutputs) {
    query.includeOutputs();
  }
  if (disableBinaryFetching != null && disableBinaryFetching) {
    query.disableBinaryFetching();
  }
  if (disableCustomObjectDeserialization != null && disableCustomObjectDeserialization) {
    query.disableCustomObjectDeserialization();
  }

  HistoricDecisionInstance instance = query.singleResult();

  if (instance == null) {
    throw new InvalidRequestException(Status.NOT_FOUND, "Historic decision instance with id '" + decisionInstanceId + "' does not exist");
  }

  return HistoricDecisionInstanceDto.fromHistoricDecisionInstance(instance);
}
 
Example 2
Source File: HistoricDecisionInstanceQueryDto.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
@Override
protected void applyFilters(HistoricDecisionInstanceQuery query) {
  if (decisionInstanceId != null) {
    query.decisionInstanceId(decisionInstanceId);
  }
  if (decisionInstanceIdIn != null) {
    query.decisionInstanceIdIn(decisionInstanceIdIn);
  }
  if (decisionDefinitionId != null) {
    query.decisionDefinitionId(decisionDefinitionId);
  }
  if (decisionDefinitionIdIn != null) {
    query.decisionDefinitionIdIn(decisionDefinitionIdIn);
  }
  if (decisionDefinitionKey != null) {
    query.decisionDefinitionKey(decisionDefinitionKey);
  }
  if (decisionDefinitionKeyIn != null) {
    query.decisionDefinitionKeyIn(decisionDefinitionKeyIn);
  }
  if (decisionDefinitionName != null) {
    query.decisionDefinitionName(decisionDefinitionName);
  }
  if (decisionDefinitionNameLike != null) {
    query.decisionDefinitionNameLike(decisionDefinitionNameLike);
  }
  if (processDefinitionId != null) {
    query.processDefinitionId(processDefinitionId);
  }
  if (processDefinitionKey != null) {
    query.processDefinitionKey(processDefinitionKey);
  }
  if (processInstanceId != null) {
    query.processInstanceId(processInstanceId);
  }
  if (caseDefinitionId != null) {
    query.caseDefinitionId(caseDefinitionId);
  }
  if (caseDefinitionKey != null) {
    query.caseDefinitionKey(caseDefinitionKey);
  }
  if (caseInstanceId != null) {
    query.caseInstanceId(caseInstanceId);
  }
  if (activityIdIn != null) {
    query.activityIdIn(activityIdIn);
  }
  if (activityInstanceIdIn != null) {
    query.activityInstanceIdIn(activityInstanceIdIn);
  }
  if (evaluatedBefore != null) {
    query.evaluatedBefore(evaluatedBefore);
  }
  if (evaluatedAfter != null) {
    query.evaluatedAfter(evaluatedAfter);
  }
  if (userId != null) {
    query.userId(userId);
  }
  if (TRUE.equals(includeInputs)) {
    query.includeInputs();
  }
  if (TRUE.equals(includeOutputs)) {
    query.includeOutputs();
  }
  if (TRUE.equals(disableBinaryFetching)) {
    query.disableBinaryFetching();
  }
  if (TRUE.equals(disableCustomObjectDeserialization)) {
    query.disableCustomObjectDeserialization();
  }
  if (rootDecisionInstanceId != null) {
    query.rootDecisionInstanceId(rootDecisionInstanceId);
  }
  if (TRUE.equals(rootDecisionInstancesOnly)) {
    query.rootDecisionInstancesOnly();
  }
  if (decisionRequirementsDefinitionId != null) {
    query.decisionRequirementsDefinitionId(decisionRequirementsDefinitionId);
  }
  if (decisionRequirementsDefinitionKey != null) {
    query.decisionRequirementsDefinitionKey(decisionRequirementsDefinitionKey);
  }
  if (tenantIds != null && !tenantIds.isEmpty()) {
    query.tenantIdIn(tenantIds.toArray(new String[tenantIds.size()]));
  }
  if (TRUE.equals(withoutTenantId)) {
    query.withoutTenantId();
  }
}