Exemple #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Deployment public void testExecutionListenerWithSignalBoundaryEvent()
        public virtual void testExecutionListenerWithSignalBoundaryEvent()
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final java.util.concurrent.atomic.AtomicInteger eventCount = new java.util.concurrent.atomic.AtomicInteger();
            AtomicInteger eventCount = new AtomicInteger();

            EmbeddedProcessApplication processApplication = new EmbeddedProcessApplicationAnonymousInnerClass6(this, eventCount);

            // register app so that it is notified about events
            managementService.registerProcessApplication(deploymentId, processApplication.Reference);

            // 1. (start)startEvent(end) -(take)-> (start)userTask(end) -(take)-> (start)endEvent(end) (8 Events)

            // start process instance
            runtimeService.startProcessInstanceByKey("executionListener");

            // complete task
            Task task = taskService.createTaskQuery().singleResult();

            taskService.complete(task.Id);

            assertEquals(10, eventCount.get());

            // reset counter
            eventCount.set(0);

            // 2. (start)startEvent(end) -(take)-> (start)userTask(end)/(start)signalBoundaryEvent(end) -(take)-> (start)endEvent(end) (10 Events)

            // start process instance
            runtimeService.startProcessInstanceByKey("executionListener");

            // signal event
            runtimeService.signalEventReceived("signal");

            assertEquals(12, eventCount.get());
        }
Exemple #2
0
 public ExecutionListenerAnonymousInnerClass6(EmbeddedProcessApplicationAnonymousInnerClass6 outerInstance)
 {
     this.outerInstance = outerInstance;
 }