Calendar cal = Calendar.getInstance();
cal.setTime(DateUtils.parseDateUTC(CREATE_TIME));
cal.add(Calendar.DATE, -1);
action1.setNominalTime(cal.getTime());
CoordActionInsertJPAExecutor actionInsert = new CoordActionInsertJPAExecutor(action1);
jpaService.execute(actionInsert);
// adding coordinator action #2 to Coord#1
CoordinatorActionBean action2 = new CoordinatorActionBean();
action2.setId("Coord1@2");
action2.setStatus(CoordinatorAction.Status.KILLED);
action2.setCreatedTime(DateUtils.parseDateUTC(CREATE_TIME));
action2.setJobId("Coord1");
cal.setTime(DateUtils.parseDateUTC(CREATE_TIME));
cal.add(Calendar.DATE, -1);
action2.setNominalTime(cal.getTime());
actionInsert = new CoordActionInsertJPAExecutor(action2);
jpaService.execute(actionInsert);
// adding coordinator action #3 to Coord#2
CoordinatorActionBean action3 = new CoordinatorActionBean();
action3.setId("Coord2@1");
action3.setStatus(CoordinatorAction.Status.KILLED);
action3.setCreatedTime(DateUtils.parseDateUTC(CREATE_TIME));
action3.setJobId("Coord2");
cal.setTime(DateUtils.parseDateUTC(CREATE_TIME));
cal.add(Calendar.DATE, -1);
action3.setNominalTime(cal.getTime());
actionInsert = new CoordActionInsertJPAExecutor(action3);
jpaService.execute(actionInsert);
}