use of org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery in project camunda-bpm-platform by camunda.
the class BatchHistoricDecisionInstanceDeletionUserOperationTest method testNoCreationOnJobExecutorBatchJobExecutionByIdsAndQuery.
@Test
public void testNoCreationOnJobExecutorBatchJobExecutionByIdsAndQuery() {
// given
// given
HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery().decisionDefinitionKey(DECISION);
historyService.deleteHistoricDecisionInstancesAsync(decisionInstanceIds, query, null);
// when
testRule.waitForJobExecutorToProcessAllJobs(5000L);
// then
assertEquals(0, engineRule.getHistoryService().createUserOperationLogQuery().count());
}
use of org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery in project camunda-bpm-platform by camunda.
the class BatchHistoricDecisionInstanceDeletionUserOperationTest method testNoCreationOnJobExecutorBatchJobExecutionByQuery.
@Test
public void testNoCreationOnJobExecutorBatchJobExecutionByQuery() {
// given
// given
HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery().decisionDefinitionKey(DECISION);
historyService.deleteHistoricDecisionInstancesAsync(query, null);
// when
testRule.waitForJobExecutorToProcessAllJobs(5000L);
// then
assertEquals(0, engineRule.getHistoryService().createUserOperationLogQuery().count());
}
use of org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery in project camunda-bpm-platform by camunda.
the class BatchHistoricDecisionInstanceDeletionUserOperationTest method testNoCreationOnSyncBatchJobExecutionByIdsAndQuery.
@Test
public void testNoCreationOnSyncBatchJobExecutionByIdsAndQuery() {
// given
HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery().decisionDefinitionKey(DECISION);
Batch batch = historyService.deleteHistoricDecisionInstancesAsync(decisionInstanceIds, query, null);
// when
engineRule.getIdentityService().setAuthenticatedUserId(USER_ID);
executeJobs(batch);
engineRule.getIdentityService().clearAuthentication();
// then
assertEquals(0, engineRule.getHistoryService().createUserOperationLogQuery().count());
}
use of org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery in project camunda-bpm-platform by camunda.
the class BatchHistoricDecisionInstanceDeletionTest method createMonitorJobByQuery.
@Test
public void createMonitorJobByQuery() {
// given
HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery().decisionDefinitionKey(DECISION);
Batch batch = historyService.deleteHistoricDecisionInstancesAsync(query, null);
// when
helper.executeSeedJob(batch);
// then the seed job definition still exists but the seed job is removed
JobDefinition seedJobDefinition = helper.getSeedJobDefinition(batch);
assertNotNull(seedJobDefinition);
Job seedJob = helper.getSeedJob(batch);
assertNull(seedJob);
// and a monitor job definition and job exists
JobDefinition monitorJobDefinition = helper.getMonitorJobDefinition(batch);
assertNotNull(monitorJobDefinition);
Job monitorJob = helper.getMonitorJob(batch);
assertNotNull(monitorJob);
}
use of org.camunda.bpm.engine.history.HistoricDecisionInstanceQuery in project camunda-bpm-platform by camunda.
the class BatchHistoricDecisionInstanceDeletionTest method createBatchDeletionByQuery.
@Test
public void createBatchDeletionByQuery() {
// given
HistoricDecisionInstanceQuery query = historyService.createHistoricDecisionInstanceQuery().decisionDefinitionKey(DECISION);
// when
Batch batch = historyService.deleteHistoricDecisionInstancesAsync(query, null);
// then
assertBatchCreated(batch, 10);
}
Aggregations