Esempio n. 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void signalIntermediateCatchEventNoAuthenticatedTenants()
        public virtual void signalIntermediateCatchEventNoAuthenticatedTenants()
        {
            testRule.deploy(SIGNAL_CATCH_PROCESS);

            engineRule.RuntimeService.createProcessInstanceByKey("signalCatch").execute();

            Execution execution = engineRule.RuntimeService.createExecutionQuery().processDefinitionKey("signalCatch").signalEventSubscriptionName("signal").singleResult();

            engineRule.IdentityService.setAuthentication("user", null, null);

            engineRule.RuntimeService.signal(execution.Id, "signal", null, null);

            engineRule.IdentityService.clearAuthentication();

            TaskQuery query = engineRule.TaskService.createTaskQuery();

            assertThat(query.count(), @is(1L));
            assertThat(query.withoutTenantId().count(), @is(1L));
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void correlateReceivedMessageToIntermediateCatchEventNoAuthenticatedTenants()
        public virtual void correlateReceivedMessageToIntermediateCatchEventNoAuthenticatedTenants()
        {
            testRule.deploy(MESSAGE_CATCH_PROCESS);

            engineRule.RuntimeService.createProcessInstanceByKey("messageCatch").execute();

            Execution execution = engineRule.RuntimeService.createExecutionQuery().processDefinitionKey("messageCatch").messageEventSubscriptionName("message").singleResult();

            engineRule.IdentityService.setAuthentication("user", null, null);

            engineRule.RuntimeService.messageEventReceived("message", execution.Id);

            engineRule.IdentityService.clearAuthentication();

            TaskQuery query = engineRule.TaskService.createTaskQuery();

            assertThat(query.count(), @is(1L));
            assertThat(query.withoutTenantId().count(), @is(1L));
            assertThat(query.tenantIdIn(TENANT_ONE).count(), @is(0L));
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void sendSignalToStartAndIntermediateCatchEventNoAuthenticatedTenants()
        public virtual void sendSignalToStartAndIntermediateCatchEventNoAuthenticatedTenants()
        {
            testRule.deploy(SIGNAL_START_PROCESS, SIGNAL_CATCH_PROCESS);
            testRule.deployForTenant(TENANT_ONE, SIGNAL_START_PROCESS, SIGNAL_CATCH_PROCESS);

            engineRule.RuntimeService.createProcessInstanceByKey("signalCatch").processDefinitionWithoutTenantId().execute();
            engineRule.RuntimeService.createProcessInstanceByKey("signalCatch").processDefinitionTenantId(TENANT_ONE).execute();

            engineRule.IdentityService.setAuthentication("user", null, null);

            engineRule.RuntimeService.createSignalEvent("signal").send();

            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));
        }
Esempio n. 4
0
//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));
        }