Search in sources :

Example 6 with AuditTaskDeleteBuilder

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

the class AuditTaskDeleteTest method testDeleteAuditTaskInfoLogByDateRangeEnd.

@Test
public void testDeleteAuditTaskInfoLogByDateRangeEnd() {
    Date endDate = taskTestData[4].getTaskData().getCreatedOn();
    AuditTaskDeleteBuilder updateBuilder = this.auditTaskDelete().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 7 with AuditTaskDeleteBuilder

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

the class AuditTaskDeleteTest method testDeleteAuditTaskInfoLogByDate.

@Test
public void testDeleteAuditTaskInfoLogByDate() {
    int p = 0;
    Date endDate = taskTestData[p++].getTaskData().getCreatedOn();
    AuditTaskDeleteBuilder updateBuilder = this.auditTaskDelete().date(endDate);
    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 8 with AuditTaskDeleteBuilder

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

the class AuditTaskDeleteTest method testDeleteAuditTaskInfoLogByTimestamp.

@Test
public void testDeleteAuditTaskInfoLogByTimestamp() {
    List<AuditTask> tasks = this.auditTaskQuery().taskId(taskTestData[4].getId()).build().getResultList();
    assertEquals(1, tasks.size());
    AuditTaskDeleteBuilder updateBuilder = this.auditTaskDelete().date(tasks.get(0).getCreatedOn());
    int result = updateBuilder.build().execute();
    assertEquals(1, result);
}
Also used : AuditTaskDeleteBuilder(org.kie.internal.task.query.AuditTaskDeleteBuilder) AuditTask(org.kie.internal.task.api.AuditTask) 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