예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testMigrateEventSubscriptionWithEventSubProcess()
        public virtual void testMigrateEventSubscriptionWithEventSubProcess()
        {
            // given
            ProcessDefinition sourceProcessDefinition = testHelper.deployAndGetDefinition(ProcessModels.ONE_TASK_PROCESS);
            ProcessDefinition targetProcessDefinition = testHelper.deployAndGetDefinition(EventSubProcessModels.MESSAGE_EVENT_SUBPROCESS_PROCESS);

            MigrationPlan migrationPlan = runtimeService.createMigrationPlan(sourceProcessDefinition.Id, targetProcessDefinition.Id).mapEqualActivities().build();

            ProcessInstance processInstance = runtimeService.startProcessInstanceById(sourceProcessDefinition.Id);

            // when
            runtimeService.newMigration(migrationPlan).processInstanceIds(processInstance.Id).execute();

            // then
            EventSubscription eventSubscriptionAfter = runtimeService.createEventSubscriptionQuery().singleResult();

            assertNotNull(eventSubscriptionAfter);
            assertEquals(EventSubProcessModels.MESSAGE_NAME, eventSubscriptionAfter.EventName);

            runtimeService.correlateMessage(EventSubProcessModels.MESSAGE_NAME);
            testHelper.completeTask("eventSubProcessTask");
            testHelper.assertProcessEnded(processInstance.Id);
        }
예제 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void signal(org.camunda.bpm.engine.impl.pvm.delegate.ActivityExecution execution, String signalEvent, Object signalData) throws Exception
            public virtual void signal(ActivityExecution execution, string signalEvent, object signalData)
            {
                RuntimeService runtimeService = execution.ProcessEngineServices.RuntimeService;

                runtimeService.correlateMessage(MESSAGE);
            }
예제 #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void execute(org.camunda.bpm.engine.delegate.DelegateExecution execution) throws Exception
            public virtual void execute(DelegateExecution execution)
            {
                RuntimeService runtimeService = execution.ProcessEngineServices.RuntimeService;

                runtimeService.correlateMessage(MESSAGE);
            }