Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Deployment public void testExecutionListenerWithErrorBoundaryEvent()
        public virtual void testExecutionListenerWithErrorBoundaryEvent()
        {
//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 EmbeddedProcessApplicationAnonymousInnerClass4(this, eventCount);

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

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

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

            assertEquals(10, eventCount.get());

            // reset counter
            eventCount.set(0);

            // 2. (start)startEvent(end) -(take)-> (start)serviceTask(end)/(start)errorBoundaryEvent(end) -(take)-> (start)endEvent(end) (10 Events)

            // start process instance
            runtimeService.startProcessInstanceByKey("executionListener", Collections.singletonMap <string, object>("shouldThrowError", true));

            assertEquals(12, eventCount.get());
        }
Exemplo n.º 2
0
 public ExecutionListenerAnonymousInnerClass4(EmbeddedProcessApplicationAnonymousInnerClass4 outerInstance)
 {
     this.outerInstance = outerInstance;
 }