本文整理汇总了Java中org.camunda.bpm.engine.impl.interceptor.CommandContext.disableUserOperationLog方法的典型用法代码示例。如果您正苦于以下问题:Java CommandContext.disableUserOperationLog方法的具体用法?Java CommandContext.disableUserOperationLog怎么用?Java CommandContext.disableUserOperationLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.impl.interceptor.CommandContext
的用法示例。
在下文中一共展示了CommandContext.disableUserOperationLog方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: execute
import org.camunda.bpm.engine.impl.interceptor.CommandContext; //导入方法依赖的package包/类
@Override
public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) {
ByteArrayEntity configurationEntity = commandContext
.getDbEntityManager()
.selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId());
SetRetriesBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes());
boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers();
commandContext.disableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true);
try {
commandContext.getProcessEngineConfiguration()
.getManagementService()
.setJobRetries(batchConfiguration.getIds(), batchConfiguration.getRetries());
} finally {
commandContext.enableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions);
}
commandContext.getByteArrayManager().delete(configurationEntity);
}
示例2: execute
import org.camunda.bpm.engine.impl.interceptor.CommandContext; //导入方法依赖的package包/类
@Override
public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) {
ByteArrayEntity configurationEntity = commandContext
.getDbEntityManager()
.selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId());
UpdateProcessInstancesSuspendStateBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes());
boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers();
commandContext.disableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true);
try {
if(batchConfiguration.getSuspended()) {
commandContext.getProcessEngineConfiguration()
.getRuntimeService()
.updateProcessInstanceSuspensionState().byProcessInstanceIds(batchConfiguration.getIds()).suspend();
} else {
commandContext.getProcessEngineConfiguration()
.getRuntimeService()
.updateProcessInstanceSuspensionState().byProcessInstanceIds(batchConfiguration.getIds()).activate();
}
} finally {
commandContext.enableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions);
}
}
开发者ID:camunda,项目名称:camunda-bpm-platform,代码行数:27,代码来源:UpdateProcessInstancesSuspendStateJobHandler.java
示例3: execute
import org.camunda.bpm.engine.impl.interceptor.CommandContext; //导入方法依赖的package包/类
@Override
public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) {
ByteArrayEntity configurationEntity = commandContext
.getDbEntityManager()
.selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId());
SetRetriesBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes());
boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers();
commandContext.disableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true);
try {
commandContext.getProcessEngineConfiguration()
.getExternalTaskService()
.setRetries(batchConfiguration.getIds(), batchConfiguration.getRetries());
} finally {
commandContext.enableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions);
}
commandContext.getByteArrayManager().delete(configurationEntity);
}
示例4: execute
import org.camunda.bpm.engine.impl.interceptor.CommandContext; //导入方法依赖的package包/类
@Override
public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) {
ByteArrayEntity configurationEntity = commandContext
.getDbEntityManager()
.selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId());
DeleteProcessInstanceBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes());
boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers();
commandContext.disableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true);
try {
commandContext.getProcessEngineConfiguration()
.getRuntimeService()
.deleteProcessInstances(batchConfiguration.getIds(), batchConfiguration.deleteReason, batchConfiguration.isSkipCustomListeners(), true, batchConfiguration.isSkipSubprocesses());
} finally {
commandContext.enableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions);
}
commandContext.getByteArrayManager().delete(configurationEntity);
}
示例5: execute
import org.camunda.bpm.engine.impl.interceptor.CommandContext; //导入方法依赖的package包/类
@Override
public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) {
ByteArrayEntity configurationEntity = commandContext
.getDbEntityManager()
.selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId());
BatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes());
boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers();
commandContext.disableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true);
try {
commandContext.getProcessEngineConfiguration()
.getHistoryService()
.deleteHistoricProcessInstances(batchConfiguration.getIds());
} finally {
commandContext.enableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions);
}
commandContext.getByteArrayManager().delete(configurationEntity);
}
示例6: execute
import org.camunda.bpm.engine.impl.interceptor.CommandContext; //导入方法依赖的package包/类
@Override
public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) {
ByteArrayEntity configurationEntity = commandContext
.getDbEntityManager()
.selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId());
BatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes());
boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers();
commandContext.disableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true);
try {
commandContext.getProcessEngineConfiguration()
.getHistoryService()
.deleteHistoricDecisionInstancesBulk(batchConfiguration.getIds());
} finally {
commandContext.enableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions);
}
commandContext.getByteArrayManager().delete(configurationEntity);
}
示例7: execute
import org.camunda.bpm.engine.impl.interceptor.CommandContext; //导入方法依赖的package包/类
@Override
public void execute(BatchJobConfiguration configuration, ExecutionEntity execution, CommandContext commandContext, String tenantId) {
ByteArrayEntity configurationEntity = commandContext
.getDbEntityManager()
.selectById(ByteArrayEntity.class, configuration.getConfigurationByteArrayId());
RestartProcessInstancesBatchConfiguration batchConfiguration = readConfiguration(configurationEntity.getBytes());
boolean initialLegacyRestrictions = commandContext.isRestrictUserOperationLogToAuthenticatedUsers();
commandContext.disableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(true);
try {
RestartProcessInstanceBuilderImpl builder = (RestartProcessInstanceBuilderImpl) commandContext.getProcessEngineConfiguration()
.getRuntimeService()
.restartProcessInstances(batchConfiguration.getProcessDefinitionId())
.processInstanceIds(batchConfiguration.getIds());
builder.setInstructions(batchConfiguration.getInstructions());
if (batchConfiguration.isInitialVariables()) {
builder.initialSetOfVariables();
}
if (batchConfiguration.isSkipCustomListeners()) {
builder.skipCustomListeners();
}
if (batchConfiguration.isWithoutBusinessKey()) {
builder.withoutBusinessKey();
}
if (batchConfiguration.isSkipIoMappings()) {
builder.skipIoMappings();
}
builder.execute(false);
} finally {
commandContext.enableUserOperationLog();
commandContext.setRestrictUserOperationLogToAuthenticatedUsers(initialLegacyRestrictions);
}
commandContext.getByteArrayManager().delete(configurationEntity);
}
示例8: handleInvocationInContext
import org.camunda.bpm.engine.impl.interceptor.CommandContext; //导入方法依赖的package包/类
protected void handleInvocationInContext(final DelegateInvocation invocation) throws Exception {
CommandContext commandContext = Context.getCommandContext();
boolean oldValue = commandContext.isAuthorizationCheckEnabled();
BaseDelegateExecution contextExecution = invocation.getContextExecution();
ProcessEngineConfigurationImpl configuration = Context.getProcessEngineConfiguration();
boolean popExecutionContext = false;
try {
if (!configuration.isAuthorizationEnabledForCustomCode()) {
// the custom code should be executed without authorization
commandContext.disableAuthorizationCheck();
}
try {
commandContext.disableUserOperationLog();
try {
if (contextExecution != null && !isCurrentContextExecution(contextExecution)) {
popExecutionContext = setExecutionContext(contextExecution);
}
invocation.proceed();
}
finally {
if (popExecutionContext) {
Context.removeExecutionContext();
}
}
}
finally {
commandContext.enableUserOperationLog();
}
}
finally {
if (oldValue) {
commandContext.enableAuthorizationCheck();
}
}
}