use of org.camunda.bpm.engine.history.UserOperationLogQuery in project camunda-bpm-platform by camunda.
the class UserOperationLogAuthorizationTest method testQuerySetStandaloneJobRetriesUserOperationLog.
// standalone job ///////////////////////////////
public void testQuerySetStandaloneJobRetriesUserOperationLog() {
// given
disableAuthorization();
repositoryService.suspendProcessDefinitionByKey(ONE_TASK_PROCESS_KEY, true, new Date());
enableAuthorization();
disableAuthorization();
String jobId = managementService.createJobQuery().singleResult().getId();
managementService.setJobRetries(jobId, 5);
enableAuthorization();
// when
UserOperationLogQuery query = historyService.createUserOperationLogQuery();
// then
verifyQueryResults(query, 1);
disableAuthorization();
managementService.deleteJob(jobId);
enableAuthorization();
clearDatabase();
}
use of org.camunda.bpm.engine.history.UserOperationLogQuery in project camunda-bpm-platform by camunda.
the class UserOperationLogAuthorizationTest method testQuerySetAssigneeTaskUserOperationLogWithoutAuthorization.
// (process) user task /////////////////////////////
public void testQuerySetAssigneeTaskUserOperationLogWithoutAuthorization() {
// given
startProcessInstanceByKey(ONE_TASK_PROCESS_KEY);
String taskId = selectSingleTask().getId();
setAssignee(taskId, "demo");
// when
UserOperationLogQuery query = historyService.createUserOperationLogQuery();
// then
verifyQueryResults(query, 0);
}
use of org.camunda.bpm.engine.history.UserOperationLogQuery in project camunda-bpm-platform by camunda.
the class UserOperationLogAuthorizationTest method testQuerySetAssigneeTaskUserOperationLogWithReadHistoryPermissionOnProcessDefinition.
public void testQuerySetAssigneeTaskUserOperationLogWithReadHistoryPermissionOnProcessDefinition() {
// given
startProcessInstanceByKey(ONE_TASK_PROCESS_KEY);
String taskId = selectSingleTask().getId();
setAssignee(taskId, "demo");
createGrantAuthorization(PROCESS_DEFINITION, ONE_TASK_PROCESS_KEY, userId, READ_HISTORY);
// when
UserOperationLogQuery query = historyService.createUserOperationLogQuery();
// then
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.UserOperationLogQuery in project camunda-bpm-platform by camunda.
the class UserOperationLogAuthorizationTest method testQuerySuspendProcessInstanceUserOperationLogWithReadHistoryPermissionOnAnyProcessDefinition.
public void testQuerySuspendProcessInstanceUserOperationLogWithReadHistoryPermissionOnAnyProcessDefinition() {
// given
String processInstanceId = startProcessInstanceByKey(ONE_TASK_PROCESS_KEY).getId();
suspendProcessInstanceById(processInstanceId);
createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
// when
UserOperationLogQuery query = historyService.createUserOperationLogQuery();
// then
verifyQueryResults(query, 1);
clearDatabase();
}
use of org.camunda.bpm.engine.history.UserOperationLogQuery in project camunda-bpm-platform by camunda.
the class BatchSuspensionTest method testUserOperationLogQueryByBatchEntityType.
@Test
@RequiredHistoryLevel(ProcessEngineConfiguration.HISTORY_FULL)
public void testUserOperationLogQueryByBatchEntityType() {
// given
Batch batch1 = helper.migrateProcessInstancesAsync(1);
Batch batch2 = helper.migrateProcessInstancesAsync(1);
// when
identityService.setAuthenticatedUserId(USER_ID);
managementService.suspendBatchById(batch1.getId());
managementService.suspendBatchById(batch2.getId());
managementService.activateBatchById(batch1.getId());
identityService.clearAuthentication();
// then
UserOperationLogQuery query = historyService.createUserOperationLogQuery().entityType(BATCH);
assertEquals(3, query.count());
assertEquals(3, query.list().size());
}
Aggregations