Search in sources :

Example 51 with TaskMonitorService

use of pro.taskana.TaskMonitorService in project taskana by Taskana.

the class ProvideWorkbasketLevelReportAccTest method testEachItemOfWorkbasketLevelReportWithStateFilter.

@Test
public void testEachItemOfWorkbasketLevelReportWithStateFilter() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<TaskState> states = Collections.singletonList(TaskState.READY);
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    WorkbasketLevelReport report = taskMonitorService.getWorkbasketLevelReport(null, states, null, null, null, null, columnHeaders);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report, columnHeaders));
    }
    assertNotNull(report);
    assertEquals(3, report.rowSize());
    int[] row1 = report.getRow("USER_1_1").getCells();
    assertArrayEquals(new int[] { 13, 3, 1, 1, 0 }, row1);
    int[] row2 = report.getRow("USER_1_2").getCells();
    assertArrayEquals(new int[] { 4, 6, 3, 6, 0 }, row2);
    int[] row3 = report.getRow("USER_1_3").getCells();
    assertArrayEquals(new int[] { 2, 2, 0, 0, 0 }, row3);
}
Also used : WorkbasketLevelReport(pro.taskana.impl.report.impl.WorkbasketLevelReport) TaskMonitorService(pro.taskana.TaskMonitorService) TaskState(pro.taskana.TaskState) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Example 52 with TaskMonitorService

use of pro.taskana.TaskMonitorService in project taskana by Taskana.

the class ProvideWorkbasketLevelReportAccTest method testEachItemOfWorkbasketLevelReportWithDomainFilter.

@Test
public void testEachItemOfWorkbasketLevelReportWithDomainFilter() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<String> domains = Collections.singletonList("DOMAIN_A");
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    WorkbasketLevelReport report = taskMonitorService.getWorkbasketLevelReport(null, null, null, domains, null, null, columnHeaders);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report, columnHeaders));
    }
    assertNotNull(report);
    assertEquals(3, report.rowSize());
    int[] row1 = report.getRow("USER_1_1").getCells();
    assertArrayEquals(new int[] { 8, 1, 0, 1, 2 }, row1);
    int[] row2 = report.getRow("USER_1_2").getCells();
    assertArrayEquals(new int[] { 2, 2, 2, 4, 0 }, row2);
    int[] row3 = report.getRow("USER_1_3").getCells();
    assertArrayEquals(new int[] { 1, 1, 0, 0, 2 }, row3);
}
Also used : WorkbasketLevelReport(pro.taskana.impl.report.impl.WorkbasketLevelReport) TaskMonitorService(pro.taskana.TaskMonitorService) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Example 53 with TaskMonitorService

use of pro.taskana.TaskMonitorService in project taskana by Taskana.

the class ProvideWorkbasketLevelReportAccTest method testEachItemOfWorkbasketLevelReportWithCategoryFilter.

@Test
public void testEachItemOfWorkbasketLevelReportWithCategoryFilter() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<String> categories = Arrays.asList("AUTOMATIC", "MANUAL");
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    WorkbasketLevelReport report = taskMonitorService.getWorkbasketLevelReport(null, null, categories, null, null, null, columnHeaders);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report, columnHeaders));
    }
    assertNotNull(report);
    assertEquals(3, report.rowSize());
    int[] row1 = report.getRow("USER_1_1").getCells();
    assertArrayEquals(new int[] { 3, 1, 1, 1, 2 }, row1);
    int[] row2 = report.getRow("USER_1_2").getCells();
    assertArrayEquals(new int[] { 1, 1, 1, 0, 1 }, row2);
    int[] row3 = report.getRow("USER_1_3").getCells();
    assertArrayEquals(new int[] { 0, 1, 0, 0, 4 }, row3);
}
Also used : WorkbasketLevelReport(pro.taskana.impl.report.impl.WorkbasketLevelReport) TaskMonitorService(pro.taskana.TaskMonitorService) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Example 54 with TaskMonitorService

use of pro.taskana.TaskMonitorService in project taskana by Taskana.

the class ProvideWorkbasketLevelReportAccTest method testEachItemOfWorkbasketLevelReportWithCustomFieldValueFilter.

@Test
public void testEachItemOfWorkbasketLevelReportWithCustomFieldValueFilter() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    CustomField customField = CustomField.CUSTOM_1;
    List<String> customFieldValues = Collections.singletonList("Geschaeftsstelle A");
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    WorkbasketLevelReport report = taskMonitorService.getWorkbasketLevelReport(null, null, null, null, customField, customFieldValues, columnHeaders);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report, columnHeaders));
    }
    assertNotNull(report);
    assertEquals(3, report.rowSize());
    int[] row1 = report.getRow("USER_1_1").getCells();
    assertArrayEquals(new int[] { 6, 1, 1, 1, 1 }, row1);
    int[] row2 = report.getRow("USER_1_2").getCells();
    assertArrayEquals(new int[] { 3, 2, 2, 3, 1 }, row2);
    int[] row3 = report.getRow("USER_1_3").getCells();
    assertArrayEquals(new int[] { 2, 1, 0, 0, 1 }, row3);
}
Also used : WorkbasketLevelReport(pro.taskana.impl.report.impl.WorkbasketLevelReport) TaskMonitorService(pro.taskana.TaskMonitorService) CustomField(pro.taskana.CustomField) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Example 55 with TaskMonitorService

use of pro.taskana.TaskMonitorService in project taskana by Taskana.

the class ProvideWorkbasketLevelReportAccTest method testEachItemOfWorkbasketLevelReportNotInWorkingDays.

@Test
public void testEachItemOfWorkbasketLevelReportNotInWorkingDays() throws InvalidArgumentException {
    TaskMonitorService taskMonitorService = taskanaEngine.getTaskMonitorService();
    List<TimeIntervalColumnHeader> columnHeaders = getShortListOfColumnHeaders();
    WorkbasketLevelReport report = taskMonitorService.getWorkbasketLevelReport(null, null, null, null, null, null, columnHeaders, false);
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug(reportToString(report, columnHeaders));
    }
    assertNotNull(report);
    assertEquals(3, report.rowSize());
    int[] row1 = report.getRow("USER_1_1").getCells();
    assertArrayEquals(new int[] { 16, 0, 1, 0, 3 }, row1);
    int[] row2 = report.getRow("USER_1_2").getCells();
    assertArrayEquals(new int[] { 10, 0, 3, 0, 7 }, row2);
    int[] row3 = report.getRow("USER_1_3").getCells();
    assertArrayEquals(new int[] { 4, 0, 0, 0, 6 }, row3);
}
Also used : WorkbasketLevelReport(pro.taskana.impl.report.impl.WorkbasketLevelReport) TaskMonitorService(pro.taskana.TaskMonitorService) TimeIntervalColumnHeader(pro.taskana.impl.report.impl.TimeIntervalColumnHeader) TaskanaEngineConfigurationTest(pro.taskana.impl.configuration.TaskanaEngineConfigurationTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)55 TaskMonitorService (pro.taskana.TaskMonitorService)55 TaskanaEngineConfigurationTest (pro.taskana.impl.configuration.TaskanaEngineConfigurationTest)55 TimeIntervalColumnHeader (pro.taskana.impl.report.impl.TimeIntervalColumnHeader)46 CustomField (pro.taskana.CustomField)15 CustomFieldValueReport (pro.taskana.impl.report.impl.CustomFieldValueReport)10 CategoryReport (pro.taskana.impl.report.impl.CategoryReport)9 ClassificationReport (pro.taskana.impl.report.impl.ClassificationReport)9 DetailedClassificationReport (pro.taskana.impl.report.impl.DetailedClassificationReport)9 WorkbasketLevelReport (pro.taskana.impl.report.impl.WorkbasketLevelReport)9 DetailedReportRow (pro.taskana.impl.report.impl.DetailedReportRow)8 DetailedMonitorQueryItem (pro.taskana.impl.report.impl.DetailedMonitorQueryItem)7 ArrayList (java.util.ArrayList)6 TaskState (pro.taskana.TaskState)6 SelectedItem (pro.taskana.impl.SelectedItem)6 TaskQueryItem (pro.taskana.impl.report.impl.TaskQueryItem)3 TaskStatusReport (pro.taskana.impl.report.impl.TaskStatusReport)3