// add the process-engine context
environment.setContext(processEngineWireContext);
}
public void close() {
JobExecutor jobExecutor = get(JobExecutor.class);
if (jobExecutor!=null) {
// stop the job executor and wait till all job executor threads have stopped.
jobExecutor.stop(true);
}
processEngineWireContext.fire(WireContext.EVENT_CLOSE, null);
}