@Test public void testDeleteProcessDefinitionsByKeyForAllTenants() { // given for (int i = 0; i < 3; i++) { deployProcessDefinitionWithTenant(); deployProcessDefinitionWithoutTenant(); } // when repositoryService.deleteProcessDefinitions() .byKey("process") .delete(); // then assertThat(repositoryService.createProcessDefinitionQuery().count(), is(1L)); assertThat(repositoryService.createProcessDefinitionQuery().tenantIdIn(TENANT_ONE).count(), is(1L)); }
@Test public void testSubscriptionsWhenDeletingProcessDefinitionsInOneTransactionByKeys() { // given three versions of the process testRule.deploy(SINGLE_MESSAGE_START_EVENT_XML); testRule.deploy(SINGLE_MESSAGE_START_EVENT_XML); testRule.deploy(SINGLE_MESSAGE_START_EVENT_XML); // when repositoryService.deleteProcessDefinitions() .byKey(MESSAGE_EVENT_PROCESS) .delete(); // then assertEquals(0, runtimeService.createEventSubscriptionQuery().count()); }
@Test public void testSubscriptionsWhenDeletingProcessDefinitionsInOneTransactionByKeys() { // given three versions of the process testRule.deploy(SINGLE_CONDITIONAL_XML); testRule.deploy(SINGLE_CONDITIONAL_XML); testRule.deploy(SINGLE_CONDITIONAL_XML); // when repositoryService.deleteProcessDefinitions() .byKey(CONDITIONAL_EVENT_PROCESS) .delete(); // then assertEquals(0, runtimeService.createEventSubscriptionQuery().count()); }
@Test public void testDeleteProcessDefinitionsByKeyForAllTenants() { // given for (int i = 0; i < 3; i++) { deployProcessDefinitionWithTenant(); deployProcessDefinitionWithoutTenant(); } // when repositoryService.deleteProcessDefinitions() .byKey("process") .delete(); // then assertThat(repositoryService.createProcessDefinitionQuery().count(), is(1L)); assertThat(repositoryService.createProcessDefinitionQuery().tenantIdIn(TENANT_ONE).count(), is(1L)); }
@Test public void testSubscriptionsWhenDeletingProcessDefinitionsInOneTransactionByKeys() { // given three versions of the process testRule.deploy(SINGLE_CONDITIONAL_XML); testRule.deploy(SINGLE_CONDITIONAL_XML); testRule.deploy(SINGLE_CONDITIONAL_XML); // when repositoryService.deleteProcessDefinitions() .byKey(CONDITIONAL_EVENT_PROCESS) .delete(); // then assertEquals(0, runtimeService.createEventSubscriptionQuery().count()); }
@Test public void testSubscriptionsWhenDeletingProcessDefinitionsInOneTransactionByKeys() { // given three versions of the process testRule.deploy(SINGLE_MESSAGE_START_EVENT_XML); testRule.deploy(SINGLE_MESSAGE_START_EVENT_XML); testRule.deploy(SINGLE_MESSAGE_START_EVENT_XML); // when repositoryService.deleteProcessDefinitions() .byKey(MESSAGE_EVENT_PROCESS) .delete(); // then assertEquals(0, runtimeService.createEventSubscriptionQuery().count()); }