new PurgeCommand(1, 10000).call();
Thread.sleep(1000);
final WorkflowStore store = Services.get().get(
WorkflowStoreService.class).create();
store.beginTrx();
WorkflowJobBean wfBean = store.getWorkflow(jobId, true);
Date endDate = new Date(System.currentTimeMillis() - 2 * 24 * 60 * 60
* 1000);
wfBean.setEndTime(endDate);
store.updateWorkflow(wfBean);