Search in sources :

Example 1 with AuditTaskDeleteBuilder

use of org.kie.internal.task.query.AuditTaskDeleteBuilder in project jbpm by kiegroup.

the class AuditTaskDeleteTest method testDeleteAuditTaskInfoLogByProcessIdAndNotMatchingDate.

@Test
public void testDeleteAuditTaskInfoLogByProcessIdAndNotMatchingDate() {
    int p = 0;
    String processId = taskTestData[p++].getTaskData().getProcessId();
    Date endDate = taskTestData[p++].getTaskData().getCreatedOn();
    AuditTaskDeleteBuilder updateBuilder = this.auditTaskDelete().date(endDate).processId(processId);
    int result = updateBuilder.build().execute();
    assertEquals(0, result);
}
Also used : AuditTaskDeleteBuilder(org.kie.internal.task.query.AuditTaskDeleteBuilder) Date(java.util.Date) Test(org.junit.Test)

Example 2 with AuditTaskDeleteBuilder

use of org.kie.internal.task.query.AuditTaskDeleteBuilder in project jbpm by kiegroup.

the class AuditTaskDeleteTest method testDeleteAuditTaskInfoLogByDateRange.

@Test
public void testDeleteAuditTaskInfoLogByDateRange() {
    Date startDate = taskTestData[4].getTaskData().getCreatedOn();
    Date endDate = taskTestData[8].getTaskData().getCreatedOn();
    AuditTaskDeleteBuilder updateBuilder = this.auditTaskDelete().dateRangeStart(startDate).dateRangeEnd(endDate);
    int result = updateBuilder.build().execute();
    assertEquals(5, result);
}
Also used : AuditTaskDeleteBuilder(org.kie.internal.task.query.AuditTaskDeleteBuilder) Date(java.util.Date) Test(org.junit.Test)

Example 3 with AuditTaskDeleteBuilder

use of org.kie.internal.task.query.AuditTaskDeleteBuilder in project jbpm by kiegroup.

the class AuditTaskDeleteTest method testDeleteAuditTaskInfoLogByDateRangeStart.

@Test
public void testDeleteAuditTaskInfoLogByDateRangeStart() {
    Date endDate = taskTestData[8].getTaskData().getCreatedOn();
    AuditTaskDeleteBuilder updateBuilder = this.auditTaskDelete().dateRangeStart(endDate);
    int result = updateBuilder.build().execute();
    assertEquals(2, result);
}
Also used : AuditTaskDeleteBuilder(org.kie.internal.task.query.AuditTaskDeleteBuilder) Date(java.util.Date) Test(org.junit.Test)

Example 4 with AuditTaskDeleteBuilder

use of org.kie.internal.task.query.AuditTaskDeleteBuilder in project jbpm by kiegroup.

the class AuditTaskDeleteTest method testDeleteAuditTaskInfoLogByProcessIdAndDate.

@Test
public void testDeleteAuditTaskInfoLogByProcessIdAndDate() {
    int p = 0;
    String processId = taskTestData[p].getTaskData().getProcessId();
    Date endDate = taskTestData[p].getTaskData().getCreatedOn();
    AuditTaskDeleteBuilder updateBuilder = this.auditTaskDelete().date(endDate).processId(processId);
    int result = updateBuilder.build().execute();
    assertEquals(1, result);
}
Also used : AuditTaskDeleteBuilder(org.kie.internal.task.query.AuditTaskDeleteBuilder) Date(java.util.Date) Test(org.junit.Test)

Example 5 with AuditTaskDeleteBuilder

use of org.kie.internal.task.query.AuditTaskDeleteBuilder in project jbpm by kiegroup.

the class AuditTaskDeleteTest method testDeleteAuditTaskInfoLogByProcessId.

@Test
public void testDeleteAuditTaskInfoLogByProcessId() {
    int p = 0;
    String processId = taskTestData[p++].getTaskData().getProcessId();
    String processId2 = taskTestData[p++].getTaskData().getProcessId();
    AuditTaskDeleteBuilder updateBuilder = this.auditTaskDelete().processId(processId, processId2);
    int result = updateBuilder.build().execute();
    assertEquals(2, result);
}
Also used : AuditTaskDeleteBuilder(org.kie.internal.task.query.AuditTaskDeleteBuilder) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)8 AuditTaskDeleteBuilder (org.kie.internal.task.query.AuditTaskDeleteBuilder)8 Date (java.util.Date)6 AuditTask (org.kie.internal.task.api.AuditTask)1