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

            EmbeddedProcessApplication processApplication = new EmbeddedProcessApplicationAnonymousInnerClass7(this, eventCountForMultiInstanceBody);

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


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

            // complete task
            IList <Task> miTasks = taskService.createTaskQuery().list();

            foreach (Task task in miTasks)
            {
                taskService.complete(task.Id);
            }

            // 2 events are expected: one for mi body start; one for mi body end
            assertEquals(2, eventCountForMultiInstanceBody.get());
        }
示例#2
0
 public ExecutionListenerAnonymousInnerClass7(EmbeddedProcessApplicationAnonymousInnerClass7 outerInstance)
 {
     this.outerInstance = outerInstance;
 }