Search in sources :

Example 31 with HistoricJobLogQuery

use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.

the class HistoricJobLogQueryTest method testQueryByInvalidProcessDefinitionId.

public void testQueryByInvalidProcessDefinitionId() {
    HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().processDefinitionId("invalid");
    verifyQueryResults(query, 0);
    try {
        query.processDefinitionId(null);
        fail();
    } catch (Exception e) {
    }
}
Also used : HistoricJobLogQuery(org.camunda.bpm.engine.history.HistoricJobLogQuery) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Example 32 with HistoricJobLogQuery

use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.

the class HistoricJobLogQueryTest method testQueryByDeploymentId.

@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml" })
public void testQueryByDeploymentId() {
    runtimeService.startProcessInstanceByKey("process");
    String deploymentId = managementService.createJobQuery().singleResult().getDeploymentId();
    HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().deploymentId(deploymentId);
    verifyQueryResults(query, 1);
}
Also used : HistoricJobLogQuery(org.camunda.bpm.engine.history.HistoricJobLogQuery) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 33 with HistoricJobLogQuery

use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.

the class HistoricJobLogQueryTest method testQueryByInvalidProcessInstanceId.

public void testQueryByInvalidProcessInstanceId() {
    HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().processInstanceId("invalid");
    verifyQueryResults(query, 0);
    try {
        query.processInstanceId(null);
        fail();
    } catch (Exception e) {
    }
}
Also used : HistoricJobLogQuery(org.camunda.bpm.engine.history.HistoricJobLogQuery) ProcessEngineException(org.camunda.bpm.engine.ProcessEngineException)

Example 34 with HistoricJobLogQuery

use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.

the class HistoricJobLogQueryTest method testQueryByJobDefinitionConfiguration.

@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml" })
public void testQueryByJobDefinitionConfiguration() {
    runtimeService.startProcessInstanceByKey("process");
    HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().jobDefinitionConfiguration(MessageJobDeclaration.ASYNC_BEFORE);
    verifyQueryResults(query, 1);
}
Also used : HistoricJobLogQuery(org.camunda.bpm.engine.history.HistoricJobLogQuery) Deployment(org.camunda.bpm.engine.test.Deployment)

Example 35 with HistoricJobLogQuery

use of org.camunda.bpm.engine.history.HistoricJobLogQuery in project camunda-bpm-platform by camunda.

the class HistoricJobLogQueryTest method testQueryByProcessInstanceId.

@Deployment(resources = { "org/camunda/bpm/engine/test/history/HistoricJobLogTest.testAsyncContinuation.bpmn20.xml" })
public void testQueryByProcessInstanceId() {
    runtimeService.startProcessInstanceByKey("process");
    String processInstanceId = managementService.createJobQuery().singleResult().getProcessInstanceId();
    HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().processInstanceId(processInstanceId);
    verifyQueryResults(query, 1);
}
Also used : HistoricJobLogQuery(org.camunda.bpm.engine.history.HistoricJobLogQuery) Deployment(org.camunda.bpm.engine.test.Deployment)

Aggregations

HistoricJobLogQuery (org.camunda.bpm.engine.history.HistoricJobLogQuery)65 Deployment (org.camunda.bpm.engine.test.Deployment)28 ProcessEngineException (org.camunda.bpm.engine.ProcessEngineException)17 HistoricJobLog (org.camunda.bpm.engine.history.HistoricJobLog)12 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 HistoricProcessInstance (org.camunda.bpm.engine.history.HistoricProcessInstance)1 AbstractRestServiceTest (org.camunda.bpm.engine.rest.AbstractRestServiceTest)1 CountResultDto (org.camunda.bpm.engine.rest.dto.CountResultDto)1 HistoricJobLogDto (org.camunda.bpm.engine.rest.dto.history.HistoricJobLogDto)1 InvalidRequestException (org.camunda.bpm.engine.rest.exception.InvalidRequestException)1 Task (org.camunda.bpm.engine.task.Task)1 Test (org.junit.Test)1