//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void correlateMessageByProcessDefinitionIdWithAuthenticatedTenant() public virtual void correlateMessageByProcessDefinitionIdWithAuthenticatedTenant() { testRule.deployForTenant(TENANT_ONE, MESSAGE_START_PROCESS); ProcessDefinition processDefinition = engineRule.RepositoryService.createProcessDefinitionQuery().processDefinitionKey("messageStart").singleResult(); engineRule.IdentityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE)); engineRule.RuntimeService.createMessageCorrelation("message").processDefinitionId(processDefinition.Id).correlateStartMessage(); engineRule.IdentityService.clearAuthentication(); TaskQuery query = engineRule.TaskService.createTaskQuery(); assertThat(query.count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(1L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void correlateMessageByProcessInstanceIdWithAuthenticatedTenant() public virtual void correlateMessageByProcessInstanceIdWithAuthenticatedTenant() { testRule.deployForTenant(TENANT_ONE, MESSAGE_CATCH_PROCESS); ProcessInstance processInstance = engineRule.RuntimeService.createProcessInstanceByKey("messageCatch").execute(); engineRule.IdentityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE)); engineRule.RuntimeService.createMessageCorrelation("message").processInstanceId(processInstance.Id).correlate(); engineRule.IdentityService.clearAuthentication(); TaskQuery query = engineRule.TaskService.createTaskQuery(); assertThat(query.count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(1L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void signalIntermediateCatchEventWithAuthenticatedTenant() public virtual void signalIntermediateCatchEventWithAuthenticatedTenant() { testRule.deployForTenant(TENANT_ONE, SIGNAL_CATCH_PROCESS); engineRule.RuntimeService.createProcessInstanceByKey("signalCatch").processDefinitionTenantId(TENANT_ONE).execute(); Execution execution = engineRule.RuntimeService.createExecutionQuery().processDefinitionKey("signalCatch").signalEventSubscriptionName("signal").singleResult(); engineRule.IdentityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE)); engineRule.RuntimeService.signal(execution.Id, "signal", null, null); engineRule.IdentityService.clearAuthentication(); TaskQuery query = engineRule.TaskService.createTaskQuery(); assertThat(query.count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(1L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void sendSignalToStartAndIntermediateCatchEventDisabledTenantCheck() public virtual void sendSignalToStartAndIntermediateCatchEventDisabledTenantCheck() { testRule.deployForTenant(TENANT_ONE, SIGNAL_START_PROCESS, SIGNAL_CATCH_PROCESS); testRule.deployForTenant(TENANT_TWO, SIGNAL_START_PROCESS, SIGNAL_CATCH_PROCESS); engineRule.RuntimeService.createProcessInstanceByKey("signalCatch").processDefinitionTenantId(TENANT_ONE).execute(); engineRule.RuntimeService.createProcessInstanceByKey("signalCatch").processDefinitionTenantId(TENANT_TWO).execute(); engineRule.ProcessEngineConfiguration.TenantCheckEnabled = false; engineRule.IdentityService.setAuthentication("user", null, null); engineRule.RuntimeService.createSignalEvent("signal").send(); TaskQuery query = engineRule.TaskService.createTaskQuery(); assertThat(query.count(), @is(4L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(2L)); assertThat(query.tenantIdIn(TENANT_TWO).count(), @is(2L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void correlateReceivedMessageToIntermediateCatchEventWithAuthenticatedTenant() public virtual void correlateReceivedMessageToIntermediateCatchEventWithAuthenticatedTenant() { testRule.deployForTenant(TENANT_ONE, MESSAGE_CATCH_PROCESS); engineRule.RuntimeService.createProcessInstanceByKey("messageCatch").execute(); Execution execution = engineRule.RuntimeService.createExecutionQuery().processDefinitionKey("messageCatch").messageEventSubscriptionName("message").singleResult(); engineRule.IdentityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE)); engineRule.RuntimeService.messageEventReceived("message", execution.Id); engineRule.IdentityService.clearAuthentication(); TaskQuery query = engineRule.TaskService.createTaskQuery(); assertThat(query.count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(1L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void sendSignalToStartAndIntermediateCatchEventWithAuthenticatedTenant() public virtual void sendSignalToStartAndIntermediateCatchEventWithAuthenticatedTenant() { testRule.deployForTenant(TENANT_ONE, SIGNAL_START_PROCESS, SIGNAL_CATCH_PROCESS); testRule.deployForTenant(TENANT_TWO, SIGNAL_START_PROCESS, SIGNAL_CATCH_PROCESS); engineRule.RuntimeService.createProcessInstanceByKey("signalCatch").processDefinitionTenantId(TENANT_ONE).execute(); engineRule.RuntimeService.createProcessInstanceByKey("signalCatch").processDefinitionTenantId(TENANT_TWO).execute(); engineRule.IdentityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE)); engineRule.RuntimeService.createSignalEvent("signal").send(); engineRule.IdentityService.clearAuthentication(); TaskQuery query = engineRule.TaskService.createTaskQuery(); assertThat(query.count(), @is(2L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(2L)); assertThat(query.tenantIdIn(TENANT_TWO).count(), @is(0L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void correlateMessageToStartAndIntermediateCatchEventWithNoAuthenticatedTenants() public virtual void correlateMessageToStartAndIntermediateCatchEventWithNoAuthenticatedTenants() { testRule.deploy(MESSAGE_START_PROCESS, MESSAGE_CATCH_PROCESS); testRule.deployForTenant(TENANT_ONE, MESSAGE_START_PROCESS, MESSAGE_CATCH_PROCESS); engineRule.RuntimeService.createProcessInstanceByKey("messageCatch").processDefinitionWithoutTenantId().execute(); engineRule.RuntimeService.createProcessInstanceByKey("messageCatch").processDefinitionTenantId(TENANT_ONE).execute(); engineRule.IdentityService.setAuthentication("user", null, null); engineRule.RuntimeService.createMessageCorrelation("message").correlateAll(); engineRule.IdentityService.clearAuthentication(); TaskQuery query = engineRule.TaskService.createTaskQuery(); assertThat(query.count(), @is(2L)); assertThat(query.withoutTenantId().count(), @is(2L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(0L)); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void correlateReceivedMessageToIntermediateCatchEventDisabledTenantCheck() public virtual void correlateReceivedMessageToIntermediateCatchEventDisabledTenantCheck() { testRule.deployForTenant(TENANT_ONE, MESSAGE_CATCH_PROCESS); testRule.deployForTenant(TENANT_TWO, MESSAGE_CATCH_PROCESS); engineRule.ProcessEngineConfiguration.TenantCheckEnabled = false; engineRule.IdentityService.setAuthentication("user", null, null); engineRule.RuntimeService.createProcessInstanceByKey("messageCatch").processDefinitionTenantId(TENANT_ONE).execute(); engineRule.RuntimeService.createProcessInstanceByKey("messageCatch").processDefinitionTenantId(TENANT_TWO).execute(); Execution execution = engineRule.RuntimeService.createExecutionQuery().processDefinitionKey("messageCatch").messageEventSubscriptionName("message").tenantIdIn(TENANT_ONE).singleResult(); engineRule.RuntimeService.messageEventReceived("message", execution.Id); TaskQuery query = engineRule.TaskService.createTaskQuery(); assertThat(query.count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(1L)); assertThat(query.tenantIdIn(TENANT_TWO).count(), @is(0L)); }