protected void verifyBooleanParameterQueryInvocations() { verify(mockedQuery).creationLog(); verify(mockedQuery).failureLog(); verify(mockedQuery).successLog(); verify(mockedQuery).deletionLog(); verify(mockedQuery).list(); }
@Deployment(resources = {"org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml"}) public void testQueryByDeletionLog() { String processInstanceId = runtimeService.startProcessInstanceByKey("process").getId(); runtimeService.deleteProcessInstance(processInstanceId, null); HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().deletionLog(); verifyQueryResults(query, 1); }
@Deployment(resources = {"org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml"}) public void testDeletedJob() { // given runtimeService.startProcessInstanceByKey("process"); String jobId = managementService.createJobQuery().singleResult().getId(); HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().jobId(jobId); HistoricJobLogQuery createdQuery = historyService.createHistoricJobLogQuery().jobId(jobId).creationLog(); HistoricJobLogQuery deletedQuery = historyService.createHistoricJobLogQuery().jobId(jobId).deletionLog(); // there exists one historic job log entry assertEquals(1, query.count()); assertEquals(1, createdQuery.count()); assertEquals(0, deletedQuery.count()); // when managementService.deleteJob(jobId); // then assertEquals(2, query.count()); assertEquals(1, createdQuery.count()); assertEquals(1, deletedQuery.count()); HistoricJobLog createdJobLogEntry = createdQuery.singleResult(); assertEquals(3, createdJobLogEntry.getJobRetries()); HistoricJobLog deletedJobLogEntry = deletedQuery.singleResult(); assertEquals(3, deletedJobLogEntry.getJobRetries()); }
@Deployment(resources = {"org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml"}) public void testDeletedProcessInstance() { // given String processInstanceId = runtimeService.startProcessInstanceByKey("process").getId(); String jobId = managementService.createJobQuery().singleResult().getId(); HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().jobId(jobId); HistoricJobLogQuery createdQuery = historyService.createHistoricJobLogQuery().jobId(jobId).creationLog(); HistoricJobLogQuery deletedQuery = historyService.createHistoricJobLogQuery().jobId(jobId).deletionLog(); // there exists one historic job log entry assertEquals(1, query.count()); assertEquals(1, createdQuery.count()); assertEquals(0, deletedQuery.count()); // when runtimeService.deleteProcessInstance(processInstanceId, null); // then assertEquals(2, query.count()); assertEquals(1, createdQuery.count()); assertEquals(1, deletedQuery.count()); HistoricJobLog createdJobLogEntry = createdQuery.singleResult(); assertEquals(3, createdJobLogEntry.getJobRetries()); HistoricJobLog deletedJobLogEntry = deletedQuery.singleResult(); assertEquals(3, deletedJobLogEntry.getJobRetries()); }
HistoricJobLogQuery serviceTask1DeletedQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask1JobId).deletionLog(); HistoricJobLogQuery serviceTask1SuccessfulQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask1JobId).successLog(); HistoricJobLogQuery serviceTask2DeletedQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask2JobId).deletionLog(); HistoricJobLogQuery serviceTask2SuccessfulQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask2JobId).successLog();
@Deployment(resources = {"org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml"}) public void testQueryByDeletionLog() { String processInstanceId = runtimeService.startProcessInstanceByKey("process").getId(); runtimeService.deleteProcessInstance(processInstanceId, null); HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().deletionLog(); verifyQueryResults(query, 1); }
HistoricJobLogQuery serviceTask1DeletedQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask1JobId).deletionLog(); HistoricJobLogQuery serviceTask1SuccessfulQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask1JobId).successLog(); HistoricJobLogQuery serviceTask2DeletedQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask2JobId).deletionLog(); HistoricJobLogQuery serviceTask2SuccessfulQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask2JobId).successLog();
.deletionLog() .singleResult(); assertNotNull(historicJob);
@Deployment(resources = {"org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml"}) public void testDeletedJob() { // given runtimeService.startProcessInstanceByKey("process"); String jobId = managementService.createJobQuery().singleResult().getId(); HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().jobId(jobId); HistoricJobLogQuery createdQuery = historyService.createHistoricJobLogQuery().jobId(jobId).creationLog(); HistoricJobLogQuery deletedQuery = historyService.createHistoricJobLogQuery().jobId(jobId).deletionLog(); // there exists one historic job log entry assertEquals(1, query.count()); assertEquals(1, createdQuery.count()); assertEquals(0, deletedQuery.count()); // when managementService.deleteJob(jobId); // then assertEquals(2, query.count()); assertEquals(1, createdQuery.count()); assertEquals(1, deletedQuery.count()); HistoricJobLog createdJobLogEntry = createdQuery.singleResult(); assertEquals(3, createdJobLogEntry.getJobRetries()); HistoricJobLog deletedJobLogEntry = deletedQuery.singleResult(); assertEquals(3, deletedJobLogEntry.getJobRetries()); }
@Deployment(resources = {"org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml"}) public void testDeletedProcessInstance() { // given String processInstanceId = runtimeService.startProcessInstanceByKey("process").getId(); String jobId = managementService.createJobQuery().singleResult().getId(); HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().jobId(jobId); HistoricJobLogQuery createdQuery = historyService.createHistoricJobLogQuery().jobId(jobId).creationLog(); HistoricJobLogQuery deletedQuery = historyService.createHistoricJobLogQuery().jobId(jobId).deletionLog(); // there exists one historic job log entry assertEquals(1, query.count()); assertEquals(1, createdQuery.count()); assertEquals(0, deletedQuery.count()); // when runtimeService.deleteProcessInstance(processInstanceId, null); // then assertEquals(2, query.count()); assertEquals(1, createdQuery.count()); assertEquals(1, deletedQuery.count()); HistoricJobLog createdJobLogEntry = createdQuery.singleResult(); assertEquals(3, createdJobLogEntry.getJobRetries()); HistoricJobLog deletedJobLogEntry = deletedQuery.singleResult(); assertEquals(3, deletedJobLogEntry.getJobRetries()); }
HistoricJobLogQuery serviceTask1DeletedQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask1JobId).deletionLog(); HistoricJobLogQuery serviceTask1SuccessfulQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask1JobId).successLog(); HistoricJobLogQuery serviceTask2DeletedQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask2JobId).deletionLog(); HistoricJobLogQuery serviceTask2SuccessfulQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask2JobId).successLog();
HistoricJobLogQuery serviceTask1DeletedQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask1JobId).deletionLog(); HistoricJobLogQuery serviceTask1SuccessfulQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask1JobId).successLog(); HistoricJobLogQuery serviceTask2DeletedQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask2JobId).deletionLog(); HistoricJobLogQuery serviceTask2SuccessfulQuery = historyService.createHistoricJobLogQuery().jobId(serviceTask2JobId).successLog();
.deletionLog() .singleResult(); assertNotNull(historicJob);