JBoss Community

Recover async activities after jBPM4 restart

reply from Michael Wohlfart in jBPM - View the full discussion

hmm... what about something like this:

 

ManagementService managementService = processEngine.getManagementService();
List<ProcessInstance> list = processEngine.getExecutionService().createProcessInstanceQuery().list();

for (ProcessInstance processInstance : list) {
  Job job = managementService.createJobQuery().processInstanceId(processInstance.getId()).uniqueResult();

  managementService.executeJob(job.getId());

}

 

but what I don't understand is this:

shouldn't the job executor pick up this anyways in its next cycle, why do we need to do this manually?

Reply to this message by going to Community

Start a new discussion in jBPM at Community