this.id = id;
}
public Void execute(CommandContext commandContext) {
final DbEntityManager dbEntityManger = commandContext.getDbEntityManager();
final DbEntityManagerFactory dbEntityManagerFactory = new DbEntityManagerFactory(Context.getProcessEngineConfiguration().getIdGenerator());
HistoricProcessInstanceEventEntity hpi = new HistoricProcessInstanceEventEntity();
hpi.setId(id);
hpi.setProcessInstanceId(id);
hpi.setProcessDefinitionId("someProcDefId");
hpi.setStartTime(new Date());
dbEntityManger.insert(hpi);
dbEntityManger.flush();
monitor.sync();
DbEntityManager dbEntityManager = dbEntityManagerFactory.openSession();
dbEntityManager.createHistoricProcessInstanceQuery().list();
monitor.sync();
return null;