use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.
the class HistoricJobLogQueryTest method testQuerySortingPartiallyByOccurrence.
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml" })
public void testQuerySortingPartiallyByOccurrence() {
String processInstanceId = runtimeService.startProcessInstanceByKey("process").getId();
String jobId = managementService.createJobQuery().singleResult().getId();
executeAvailableJobs();
runtimeService.setVariable(processInstanceId, "fail", false);
managementService.executeJob(jobId);
// asc
HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().jobId(jobId).orderPartiallyByOccurrence().asc();
verifyQueryWithOrdering(query, 5, historicJobLogPartiallyByOccurence());
// desc
query = historyService.createHistoricJobLogQuery().jobId(jobId).orderPartiallyByOccurrence().desc();
verifyQueryWithOrdering(query, 5, inverted(historicJobLogPartiallyByOccurence()));
runtimeService.deleteProcessInstance(processInstanceId, null);
// delete job /////////////////////////////////////////////////////////
processInstanceId = runtimeService.startProcessInstanceByKey("process").getId();
jobId = managementService.createJobQuery().singleResult().getId();
executeAvailableJobs();
managementService.deleteJob(jobId);
// asc
query = historyService.createHistoricJobLogQuery().jobId(jobId).orderPartiallyByOccurrence().asc();
verifyQueryWithOrdering(query, 5, historicJobLogPartiallyByOccurence());
// desc
query = historyService.createHistoricJobLogQuery().jobId(jobId).orderPartiallyByOccurrence().desc();
verifyQueryWithOrdering(query, 5, inverted(historicJobLogPartiallyByOccurence()));
}
use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.
the class HistoricJobLogQueryTest method testQueryByLogId.
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml" })
public void testQueryByLogId() {
runtimeService.startProcessInstanceByKey("process");
String logId = historyService.createHistoricJobLogQuery().singleResult().getId();
HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().logId(logId);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.
the class HistoricJobLogQueryTest method testQueryByJobId.
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml" })
public void testQueryByJobId() {
runtimeService.startProcessInstanceByKey("process");
String jobId = managementService.createJobQuery().singleResult().getId();
HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().jobId(jobId);
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.
the class HistoricJobLogQueryTest method testQueryByCreationLog.
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml" })
public void testQueryByCreationLog() {
runtimeService.startProcessInstanceByKey("process");
HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().creationLog();
verifyQueryResults(query, 1);
}
use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.
the class HistoricJobLogQueryTest method testQueryByJobDefinitionType.
@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml" })
public void testQueryByJobDefinitionType() {
runtimeService.startProcessInstanceByKey("process");
HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().jobDefinitionType(AsyncContinuationJobHandler.TYPE);
verifyQueryResults(query, 1);
}
Aggregations