Skip to content

Commit

Permalink
added new method to check if isHistoryEnabledForVariables
Browse files Browse the repository at this point in the history
  • Loading branch information
WelschChristopher committed Jan 18, 2024
1 parent 8980e9c commit 49d275f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.flowable.common.engine.impl.history.HistoryLevel;
import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
import org.flowable.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
import org.flowable.engine.impl.util.ProcessDefinitionUtil;
import org.flowable.engine.repository.ProcessDefinition;
import org.flowable.engine.runtime.ActivityInstance;
Expand Down Expand Up @@ -281,6 +282,11 @@ public boolean isHistoryEnabledForVariableInstance(String processDefinitionId, V
return isHistoryLevelAtLeast(HistoryLevel.ACTIVITY, processDefinitionId);
}

@Override
public boolean isHistoryEnabledForVariables(HistoricProcessInstanceEntity historicProcessInstance) {
return isHistoryLevelAtLeast(HistoryLevel.ACTIVITY, historicProcessInstance.getProcessDefinitionId());
}

@Override
public boolean isHistoryEnabledForIdentityLink(IdentityLinkEntity identityLink) {
String processDefinitionId = getProcessDefinitionId(identityLink);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import org.flowable.common.engine.impl.history.HistoryLevel;
import org.flowable.engine.impl.persistence.entity.ExecutionEntity;
import org.flowable.engine.impl.persistence.entity.HistoricProcessInstanceEntity;
import org.flowable.engine.runtime.ActivityInstance;
import org.flowable.entitylink.service.impl.persistence.entity.EntityLinkEntity;
import org.flowable.identitylink.service.impl.persistence.entity.IdentityLinkEntity;
Expand Down Expand Up @@ -81,6 +82,11 @@ public interface HistoryConfigurationSettings {
*/
boolean isHistoryEnabledForVariableInstance(String processDefinitionId, VariableInstanceEntity variableInstanceEntity);

/**
* Returns whether history is enabled for variables for the provided historic process instance.
*/
boolean isHistoryEnabledForVariables(HistoricProcessInstanceEntity historicProcessInstance);

/**
* Returns whether history is enabled for the provided identity link.
*/
Expand Down

0 comments on commit 49d275f

Please sign in to comment.