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);
}
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);
}
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);
}
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);
}
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);
}
Aggregations