use of org.camunda.bpm.engine.task.TaskQuery in project camunda-bpm-platform by camunda.
the class MultiTenancyMessageCorrelationTest method correlateMessageToIntermediateCatchEventNoTenantIdSetForTenant.
@Test
public void correlateMessageToIntermediateCatchEventNoTenantIdSetForTenant() {
testRule.deployForTenant(TENANT_ONE, MESSAGE_CATCH_PROCESS);
engineRule.getRuntimeService().startProcessInstanceByKey("messageCatch");
engineRule.getRuntimeService().createMessageCorrelation("message").correlate();
TaskQuery query = engineRule.getTaskService().createTaskQuery();
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
}
use of org.camunda.bpm.engine.task.TaskQuery in project camunda-bpm-platform by camunda.
the class MultiTenancySignalReceiveTest method sendSignalToIntermediateCatchEventForTenant.
@Test
public void sendSignalToIntermediateCatchEventForTenant() {
testRule.deployForTenant(TENANT_ONE, SIGNAL_CATCH_PROCESS);
testRule.deployForTenant(TENANT_TWO, SIGNAL_CATCH_PROCESS);
engineRule.getRuntimeService().createProcessInstanceByKey("signalCatch").processDefinitionTenantId(TENANT_ONE).execute();
engineRule.getRuntimeService().createProcessInstanceByKey("signalCatch").processDefinitionTenantId(TENANT_TWO).execute();
engineRule.getRuntimeService().createSignalEvent("signal").tenantId(TENANT_ONE).send();
engineRule.getRuntimeService().createSignalEvent("signal").tenantId(TENANT_TWO).send();
TaskQuery query = engineRule.getTaskService().createTaskQuery();
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(1L));
assertThat(query.tenantIdIn(TENANT_TWO).count(), is(1L));
}
use of org.camunda.bpm.engine.task.TaskQuery in project camunda-bpm-platform by camunda.
the class MultiTenancySignalReceiveTest method sendSignalToIntermediateCatchEventWithoutTenantIdForNonTenant.
@Test
public void sendSignalToIntermediateCatchEventWithoutTenantIdForNonTenant() {
testRule.deploy(SIGNAL_CATCH_PROCESS);
engineRule.getRuntimeService().createProcessInstanceByKey("signalCatch").execute();
engineRule.getRuntimeService().createSignalEvent("signal").send();
TaskQuery query = engineRule.getTaskService().createTaskQuery();
assertThat(query.count(), is(1L));
}
use of org.camunda.bpm.engine.task.TaskQuery in project camunda-bpm-platform by camunda.
the class MultiTenancySignalReceiveTest method throwIntermediateSignalForTenant.
@Test
public void throwIntermediateSignalForTenant() {
testRule.deployForTenant(TENANT_ONE, SIGNAL_START_PROCESS, SIGNAL_CATCH_PROCESS, SIGNAL_INTERMEDIATE_THROW_PROCESS);
testRule.deployForTenant(TENANT_TWO, SIGNAL_START_PROCESS, SIGNAL_CATCH_PROCESS);
testRule.deploy(SIGNAL_START_PROCESS, SIGNAL_CATCH_PROCESS);
engineRule.getRuntimeService().createProcessInstanceByKey("signalCatch").processDefinitionWithoutTenantId().execute();
engineRule.getRuntimeService().createProcessInstanceByKey("signalCatch").processDefinitionTenantId(TENANT_ONE).execute();
engineRule.getRuntimeService().createProcessInstanceByKey("signalCatch").processDefinitionTenantId(TENANT_TWO).execute();
engineRule.getRuntimeService().startProcessInstanceByKey("signalThrow");
TaskQuery query = engineRule.getTaskService().createTaskQuery();
assertThat(query.withoutTenantId().count(), is(2L));
assertThat(query.tenantIdIn(TENANT_ONE).count(), is(2L));
assertThat(query.tenantIdIn(TENANT_TWO).count(), is(0L));
}
use of org.camunda.bpm.engine.task.TaskQuery in project camunda-bpm-platform by camunda.
the class MultiTenancySignalReceiveTest method sendSignalToIntermediateCatchEventForNonTenant.
@Test
public void sendSignalToIntermediateCatchEventForNonTenant() {
testRule.deploy(SIGNAL_CATCH_PROCESS);
testRule.deployForTenant(TENANT_ONE, SIGNAL_CATCH_PROCESS);
engineRule.getRuntimeService().createProcessInstanceByKey("signalCatch").processDefinitionWithoutTenantId().execute();
engineRule.getRuntimeService().createProcessInstanceByKey("signalCatch").processDefinitionTenantId(TENANT_ONE).execute();
engineRule.getRuntimeService().createSignalEvent("signal").withoutTenantId().send();
TaskQuery query = engineRule.getTaskService().createTaskQuery();
assertThat(query.count(), is(1L));
assertThat(query.singleResult().getTenantId(), is(nullValue()));
}
Aggregations