//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Deployment public void testExecutionListenerWithTimerBoundaryEvent() public virtual void testExecutionListenerWithTimerBoundaryEvent() { //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 EmbeddedProcessApplicationAnonymousInnerClass5(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)timerBoundaryEvent(end) -(take)-> (start)endEvent(end) (10 Events) // start process instance runtimeService.startProcessInstanceByKey("executionListener"); // fire timer event Job job = managementService.createJobQuery().singleResult(); managementService.executeJob(job.Id); assertEquals(12, eventCount.get()); }
public ExecutionListenerAnonymousInnerClass5(EmbeddedProcessApplicationAnonymousInnerClass5 outerInstance) { this.outerInstance = outerInstance; }