Package org.camunda.bpm.engine.history

Examples of org.camunda.bpm.engine.history.HistoricActivityStatistics


    assertEquals(8, query.count());
    assertEquals(8, statistics.size());

    // end1
    HistoricActivityStatistics end1 = statistics.get(0);

    assertEquals("end1", end1.getId());
    assertEquals(0, end1.getInstances());
    assertEquals(5, end1.getFinished());

    // gtw
    HistoricActivityStatistics gtw = statistics.get(1);

    assertEquals("gtw", gtw.getId());
    assertEquals(0, gtw.getInstances());
    assertEquals(5, gtw.getFinished());

    // innerEnd
    HistoricActivityStatistics innerEnd = statistics.get(2);

    assertEquals("innerEnd", innerEnd.getId());
    assertEquals(0, innerEnd.getInstances());
    assertEquals(25, innerEnd.getFinished());

    // innerStart
    HistoricActivityStatistics innerStart = statistics.get(3);

    assertEquals("innerStart", innerStart.getId());
    assertEquals(0, innerStart.getInstances());
    assertEquals(25, innerStart.getFinished());

    // innerTask
    HistoricActivityStatistics innerTask = statistics.get(4);

    assertEquals("innerTask", innerTask.getId());
    assertEquals(0, innerTask.getInstances());
    assertEquals(25, innerTask.getFinished());

    // innerStart
    HistoricActivityStatistics start = statistics.get(5);

    assertEquals("start", start.getId());
    assertEquals(0, start.getInstances());
    assertEquals(5, start.getFinished());

    // subprocess
    HistoricActivityStatistics subProcess = statistics.get(6);

    assertEquals("subprocess", subProcess.getId());
    assertEquals(0, subProcess.getInstances());
    assertEquals(25, subProcess.getFinished());

    // task
    HistoricActivityStatistics task = statistics.get(7);

    assertEquals("task", task.getId());
    assertEquals(5, task.getInstances());
    assertEquals(0, task.getFinished());

    completeProcessInstances();
  }
View Full Code Here


    assertEquals(1, query.count());
    assertEquals(1, statistics.size());

    // end
    HistoricActivityStatistics end = statistics.get(0);

    assertEquals("end", end.getId());
    assertEquals(0, end.getInstances());
    assertEquals(5, end.getCompleteScope());
  }
View Full Code Here

    assertEquals(2, query.count());
    assertEquals(2, statistics.size());

    // end
    HistoricActivityStatistics end = statistics.get(0);

    assertEquals("end", end.getId());
    assertEquals(0, end.getInstances());
    assertEquals(2, end.getCompleteScope());

    // task
    HistoricActivityStatistics task = statistics.get(1);

    assertEquals("task", task.getId());
    assertEquals(3, task.getInstances());
    assertEquals(0, task.getCompleteScope());

    completeProcessInstances();
  }
View Full Code Here

    assertEquals(3, query.count());
    assertEquals(3, statistics.size());

    // end1
    HistoricActivityStatistics end1 = statistics.get(0);

    assertEquals("end1", end1.getId());
    assertEquals(0, end1.getInstances());
    assertEquals(5, end1.getCompleteScope());

    // innerEnd
    HistoricActivityStatistics innerEnd = statistics.get(1);

    assertEquals("innerEnd", innerEnd.getId());
    assertEquals(0, innerEnd.getInstances());
    assertEquals(25, innerEnd.getCompleteScope());

    // task
    HistoricActivityStatistics task = statistics.get(2);

    assertEquals("task", task.getId());
    assertEquals(5, task.getInstances());
    assertEquals(0, task.getCompleteScope());

    completeProcessInstances();
  }
View Full Code Here

    assertEquals(1, query.count());
    assertEquals(1, statistics.size());

    // task
    HistoricActivityStatistics task = statistics.get(0);

    assertEquals("task", task.getId());
    assertEquals(0, task.getInstances());
    assertEquals(5, task.getCanceled());
  }
View Full Code Here

    assertEquals(1, query.count());
    assertEquals(1, statistics.size());

    // task
    HistoricActivityStatistics task = statistics.get(0);

    assertEquals("task", task.getId());
    assertEquals(2, task.getInstances());
    assertEquals(3, task.getCanceled());

    completeProcessInstances();
  }
View Full Code Here

    return mock;
  }

  public static List<HistoricActivityStatistics> createMockHistoricActivityStatistics() {
    HistoricActivityStatistics statistics = mock(HistoricActivityStatistics.class);

    when(statistics.getId()).thenReturn(EXAMPLE_ACTIVITY_ID);
    when(statistics.getInstances()).thenReturn(EXAMPLE_INSTANCES_LONG);
    when(statistics.getCanceled()).thenReturn(EXAMPLE_CANCELED_LONG);
    when(statistics.getFinished()).thenReturn(EXAMPLE_FINISHED_LONG);
    when(statistics.getCompleteScope()).thenReturn(EXAMPLE_COMPLETE_SCOPE_LONG);

    HistoricActivityStatistics anotherStatistics = mock(HistoricActivityStatistics.class);

    when(anotherStatistics.getId()).thenReturn(ANOTHER_EXAMPLE_ACTIVITY_ID);
    when(anotherStatistics.getInstances()).thenReturn(ANOTHER_EXAMPLE_INSTANCES_LONG);
    when(anotherStatistics.getCanceled()).thenReturn(ANOTHER_EXAMPLE_CANCELED_LONG);
    when(anotherStatistics.getFinished()).thenReturn(ANOTHER_EXAMPLE_FINISHED_LONG);
    when(anotherStatistics.getCompleteScope()).thenReturn(ANOTHER_EXAMPLE_COMPLETE_SCOPE_LONG);

    List<HistoricActivityStatistics> activityResults = new ArrayList<HistoricActivityStatistics>();
    activityResults.add(statistics);
    activityResults.add(anotherStatistics);
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.history.HistoricActivityStatistics

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.