@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); } }
@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 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 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 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 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); }