jobExecutor.setQueueSize(2);
jobExecutor.setMaxJobsPerAcquisition(5);
jobExecutor.setWaitTimeInMillis(50);
jobExecutor.setLockTimeInMillis(180000);
ProcessEngine processEngine = new StandaloneInMemProcessEngineConfiguration()
.setJobExecutorActivate(true)
.setJobExecutor(jobExecutor)
.setFailedJobCommandFactory(new ConfigurableFailedJobCommandFactory(2, 1))
.buildProcessEngine();