public JobHandlerConfiguration getJobHandlerConfiguration() { return getJobHandler().newConfiguration(jobHandlerConfiguration); }
@Override public void init(CommandContext commandContext) { // clean additional data related to this job JobHandler jobHandler = getJobHandler(); if (jobHandler != null) { jobHandler.onDelete(getJobHandlerConfiguration(), this); } //cancel the retries -> will resolve job incident if present setRetries(commandContext.getProcessEngineConfiguration().getDefaultNumberOfRetries()); //delete the job's exception byte array and exception message String exceptionByteArrayIdToDelete =null; if (exceptionByteArrayId != null) { exceptionByteArrayIdToDelete = exceptionByteArrayId; this.exceptionByteArrayId = null; this.exceptionMessage = null; } //clean the lock information setLockOwner(null); setLockExpirationTime(null); if (exceptionByteArrayIdToDelete != null) { ByteArrayEntity byteArray = commandContext.getDbEntityManager().selectById(ByteArrayEntity.class, exceptionByteArrayIdToDelete); commandContext.getDbEntityManager().delete(byteArray); } }
public void execute(CommandContext commandContext) { if (executionId != null) { ExecutionEntity execution = getExecution(); ensureNotNull("Cannot find execution with id '" + executionId + "' referenced from job '" + this + "'", "execution", execution); } // initialize activity id getActivityId(); // increment sequence counter before job execution incrementSequenceCounter(); preExecute(commandContext); JobHandler jobHandler = getJobHandler(); JobHandlerConfiguration configuration = getJobHandlerConfiguration(); ensureNotNull("Cannot find job handler '" + jobHandlerType + "' from job '" + this + "'", "jobHandler", jobHandler); jobHandler.execute(configuration, execution, commandContext, tenantId); postExecute(commandContext); }
@Override public void init(CommandContext commandContext) { // clean additional data related to this job JobHandler jobHandler = getJobHandler(); if (jobHandler != null) { jobHandler.onDelete(getJobHandlerConfiguration(), this); } //cancel the retries -> will resolve job incident if present setRetries(commandContext.getProcessEngineConfiguration().getDefaultNumberOfRetries()); //delete the job's exception byte array and exception message String exceptionByteArrayIdToDelete =null; if (exceptionByteArrayId != null) { exceptionByteArrayIdToDelete = exceptionByteArrayId; this.exceptionByteArrayId = null; this.exceptionMessage = null; } //clean the lock information setLockOwner(null); setLockExpirationTime(null); if (exceptionByteArrayIdToDelete != null) { ByteArrayEntity byteArray = commandContext.getDbEntityManager().selectById(ByteArrayEntity.class, exceptionByteArrayIdToDelete); commandContext.getDbEntityManager().delete(byteArray); } }
public void execute(CommandContext commandContext) { if (executionId != null) { ExecutionEntity execution = getExecution(); ensureNotNull("Cannot find execution with id '" + executionId + "' referenced from job '" + this + "'", "execution", execution); } // initialize activity id getActivityId(); // increment sequence counter before job execution incrementSequenceCounter(); preExecute(commandContext); JobHandler jobHandler = getJobHandler(); JobHandlerConfiguration configuration = getJobHandlerConfiguration(); ensureNotNull("Cannot find job handler '" + jobHandlerType + "' from job '" + this + "'", "jobHandler", jobHandler); jobHandler.execute(configuration, execution, commandContext, tenantId); postExecute(commandContext); }
protected void registerCustomJobHandlers(SpringProcessEngineConfiguration configuration) { configuration.setCustomJobHandlers(join(configuration.getCustomJobHandlers(), customJobHandlers)); for (JobHandler<?> jobHandler : configuration.getCustomJobHandlers()) { logger.info("Register Custom JobHandler: '{}'", jobHandler.getType()); } }
public JobHandlerConfiguration getJobHandlerConfiguration() { return getJobHandler().newConfiguration(jobHandlerConfiguration); }
public void delete(boolean incidentResolved) { CommandContext commandContext = Context.getCommandContext(); incrementSequenceCounter(); // clean additional data related to this job JobHandler jobHandler = getJobHandler(); if (jobHandler != null) { jobHandler.onDelete(getJobHandlerConfiguration(), this); } // fire delete event if this job is not being executed boolean executingJob = this.equals(commandContext.getCurrentJob()); commandContext.getJobManager().deleteJob(this, !executingJob); // Also delete the job's exception byte array if (exceptionByteArrayId != null) { commandContext.getByteArrayManager().deleteByteArrayById(exceptionByteArrayId); } // remove link to execution ExecutionEntity execution = getExecution(); if (execution != null) { execution.removeJob(this); } removeFailedJobIncident(incidentResolved); }
public void execute(CommandContext commandContext) { if (executionId != null) { ExecutionEntity execution = getExecution(); ensureNotNull("Cannot find execution with id '" + executionId + "' referenced from job '" + this + "'", "execution", execution); } // initialize activity id getActivityId(); // increment sequence counter before job execution incrementSequenceCounter(); preExecute(commandContext); JobHandler jobHandler = getJobHandler(); JobHandlerConfiguration configuration = getJobHandlerConfiguration(); ensureNotNull("Cannot find job handler '" + jobHandlerType + "' from job '" + this + "'", "jobHandler", jobHandler); jobHandler.execute(configuration, execution, commandContext, tenantId); postExecute(commandContext); }
protected void registerCustomJobHandlers(SpringProcessEngineConfiguration configuration) { configuration.setCustomJobHandlers(join(configuration.getCustomJobHandlers(), customJobHandlers)); for (JobHandler<?> jobHandler : configuration.getCustomJobHandlers()) { logger.info("Register Custom JobHandler: '{}'", jobHandler.getType()); } }
@Override protected JobHandlerConfiguration resolveJobHandlerConfiguration(ExecutionEntity context) { return resolveJobHandler().newConfiguration(rawJobHandlerConfiguration); }
public void delete(boolean incidentResolved) { CommandContext commandContext = Context.getCommandContext(); incrementSequenceCounter(); // clean additional data related to this job JobHandler jobHandler = getJobHandler(); if (jobHandler != null) { jobHandler.onDelete(getJobHandlerConfiguration(), this); } // fire delete event if this job is not being executed boolean executingJob = this.equals(commandContext.getCurrentJob()); commandContext.getJobManager().deleteJob(this, !executingJob); // Also delete the job's exception byte array if (exceptionByteArrayId != null) { commandContext.getByteArrayManager().deleteByteArrayById(exceptionByteArrayId); } // remove link to execution ExecutionEntity execution = getExecution(); if (execution != null) { execution.removeJob(this); } removeFailedJobIncident(incidentResolved); }
@Override protected JobHandlerConfiguration resolveJobHandlerConfiguration(ExecutionEntity context) { return resolveJobHandler().newConfiguration(rawJobHandlerConfiguration); }
@Override public void init(CommandContext commandContext) { // clean additional data related to this job JobHandler jobHandler = getJobHandler(); if (jobHandler != null) { jobHandler.onDelete(getJobHandlerConfiguration(), this); } //cancel the retries -> will resolve job incident if present setRetries(commandContext.getProcessEngineConfiguration().getDefaultNumberOfRetries()); //delete the job's exception byte array and exception message String exceptionByteArrayIdToDelete =null; if (exceptionByteArrayId != null) { exceptionByteArrayIdToDelete = exceptionByteArrayId; this.exceptionByteArrayId = null; this.exceptionMessage = null; } //clean the lock information setLockOwner(null); setLockExpirationTime(null); if (exceptionByteArrayIdToDelete != null) { ByteArrayEntity byteArray = commandContext.getDbEntityManager().selectById(ByteArrayEntity.class, exceptionByteArrayIdToDelete); commandContext.getDbEntityManager().delete(byteArray); } }
public JobHandlerConfiguration getJobHandlerConfiguration() { return getJobHandler().newConfiguration(jobHandlerConfiguration); }
public void delete(boolean incidentResolved) { CommandContext commandContext = Context.getCommandContext(); incrementSequenceCounter(); // clean additional data related to this job JobHandler jobHandler = getJobHandler(); if (jobHandler != null) { jobHandler.onDelete(getJobHandlerConfiguration(), this); } // fire delete event if this job is not being executed boolean executingJob = this.equals(commandContext.getCurrentJob()); commandContext.getJobManager().deleteJob(this, !executingJob); // Also delete the job's exception byte array if (exceptionByteArrayId != null) { commandContext.getByteArrayManager().deleteByteArrayById(exceptionByteArrayId); } // remove link to execution ExecutionEntity execution = getExecution(); if (execution != null) { execution.removeJob(this); } removeFailedJobIncident(incidentResolved); }
@Override protected JobHandlerConfiguration resolveJobHandlerConfiguration(ExecutionEntity context) { return resolveJobHandler().newConfiguration(rawJobHandlerConfiguration); }