Search in sources :

Example 6 with HistoricJobLogQuery

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

the class MultiTenancyHistoricJobLogQueryTest method testQueryByTenantId.

public void testQueryByTenantId() {
    HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().tenantIdIn(TENANT_ONE);
    assertThat(query.count(), is(2L));
    query = historyService.createHistoricJobLogQuery().tenantIdIn(TENANT_TWO);
    assertThat(query.count(), is(2L));
}
Also used : HistoricJobLogQuery(org.camunda.bpm.engine.history.HistoricJobLogQuery)

Example 7 with HistoricJobLogQuery

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

the class MultiTenancyHistoricJobLogQueryTest method testQueryAuthenticatedTenants.

public void testQueryAuthenticatedTenants() {
    identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO));
    HistoricJobLogQuery query = historyService.createHistoricJobLogQuery();
    assertThat(query.count(), is(4L));
    assertThat(query.tenantIdIn(TENANT_ONE).count(), is(2L));
    assertThat(query.tenantIdIn(TENANT_TWO).count(), is(2L));
}
Also used : HistoricJobLogQuery(org.camunda.bpm.engine.history.HistoricJobLogQuery)

Example 8 with HistoricJobLogQuery

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

the class MultiTenancyHistoricJobLogQueryTest method testQueryWithoutTenantId.

public void testQueryWithoutTenantId() {
    HistoricJobLogQuery query = historyService.createHistoricJobLogQuery();
    assertThat(query.count(), is(4L));
}
Also used : HistoricJobLogQuery(org.camunda.bpm.engine.history.HistoricJobLogQuery)

Example 9 with HistoricJobLogQuery

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

the class MultiTenancyHistoricJobLogQueryTest method testQueryByTenantIds.

public void testQueryByTenantIds() {
    HistoricJobLogQuery query = historyService.createHistoricJobLogQuery().tenantIdIn(TENANT_ONE, TENANT_TWO);
    assertThat(query.count(), is(4L));
}
Also used : HistoricJobLogQuery(org.camunda.bpm.engine.history.HistoricJobLogQuery)

Example 10 with HistoricJobLogQuery

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

the class HistoricJobLogAuthorizationTest method testSimpleQueryWithMultiple.

public void testSimpleQueryWithMultiple() {
    // given
    startProcessAndExecuteJob(ONE_INCIDENT_PROCESS_KEY);
    createGrantAuthorization(PROCESS_DEFINITION, ANY, userId, READ_HISTORY);
    createGrantAuthorization(PROCESS_DEFINITION, ONE_INCIDENT_PROCESS_KEY, userId, READ_HISTORY);
    // when
    HistoricJobLogQuery query = historyService.createHistoricJobLogQuery();
    // then
    verifyQueryResults(query, 5);
}
Also used : HistoricJobLogQuery(org.camunda.bpm.engine.history.HistoricJobLogQuery)

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