use of org.camunda.bpm.engine.history.HistoricCaseActivityInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricCaseActivityInstanceQueryTest method testQueryAuthenticatedTenants.
public void testQueryAuthenticatedTenants() {
identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE, TENANT_TWO));
HistoricCaseActivityInstanceQuery query = historyService.createHistoricCaseActivityInstanceQuery();
assertThat(query.count(), is(2L));
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
assertThat(query.tenantIdIn(TENANT_TWO).count(), is(1L));
}
use of org.camunda.bpm.engine.history.HistoricCaseActivityInstanceQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyHistoricCaseActivityInstanceQueryTest method testQueryWithoutTenantId.
public void testQueryWithoutTenantId() {
HistoricCaseActivityInstanceQuery query = historyService.createHistoricCaseActivityInstanceQuery();
assertThat(query.count(), is(2L));
}
use of org.camunda.bpm.engine.history.HistoricCaseActivityInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricCaseActivityInstanceTest method testRepeatMilestone.
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/repetition/RepetitionRuleTest.testRepeatMilestone.cmmn" })
public void testRepeatMilestone() {
// given
createCaseInstance();
String firstHumanTaskId = queryCaseExecutionByActivityId("PI_HumanTask_1").getId();
// when
complete(firstHumanTaskId);
// then
HistoricCaseActivityInstanceQuery query = historicQuery().caseActivityId("PI_Milestone_1");
assertEquals(2, query.count());
}
use of org.camunda.bpm.engine.history.HistoricCaseActivityInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricCaseActivityInstanceTest method testRepeatTask.
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/repetition/RepetitionRuleTest.testRepeatTask.cmmn" })
public void testRepeatTask() {
// given
createCaseInstance();
String firstHumanTaskId = queryCaseExecutionByActivityId("PI_HumanTask_1").getId();
// when
complete(firstHumanTaskId);
// then
HistoricCaseActivityInstanceQuery query = historicQuery().caseActivityId("PI_HumanTask_2");
assertEquals(2, query.count());
}
use of org.camunda.bpm.engine.history.HistoricCaseActivityInstanceQuery in project camunda-bpm-platform by camunda.
the class HistoricCaseActivityInstanceTest method testRepeatStage.
@Deployment(resources = { "org/camunda/bpm/engine/test/cmmn/repetition/RepetitionRuleTest.testRepeatStage.cmmn" })
public void testRepeatStage() {
// given
createCaseInstance();
String firstHumanTaskId = queryCaseExecutionByActivityId("PI_HumanTask_1").getId();
// when
complete(firstHumanTaskId);
// then
HistoricCaseActivityInstanceQuery query = historicQuery().caseActivityId("PI_Stage_1");
assertEquals(2, query.count());
}
Aggregations