protected void ensureActivityIdInitialized() { if (activityId == null) { JobDefinition jobDefinition = getJobDefinition(); if (jobDefinition != null) { activityId = jobDefinition.getActivityId(); } else { ExecutionEntity execution = getExecution(); if (execution != null) { activityId = execution.getActivityId(); } } } }
evt.setTenantId(jobEntity.getTenantId()); ExecutionEntity execution = jobEntity.getExecution(); if (execution != null) { evt.setRootProcessInstanceId(execution.getRootProcessInstanceId());
protected void ensureActivityIdInitialized() { if (activityId == null) { JobDefinition jobDefinition = getJobDefinition(); if (jobDefinition != null) { activityId = jobDefinition.getActivityId(); } else { ExecutionEntity execution = getExecution(); if (execution != null) { activityId = execution.getActivityId(); } } } }
evt.setTenantId(jobEntity.getTenantId()); ExecutionEntity execution = jobEntity.getExecution(); if (execution != null) { evt.setRootProcessInstanceId(execution.getRootProcessInstanceId());
public void insert() { CommandContext commandContext = Context.getCommandContext(); // add link to execution and deployment ExecutionEntity execution = getExecution(); if (execution != null) { execution.addJob(this); ProcessDefinitionImpl processDefinition = execution.getProcessDefinition(); this.deploymentId = processDefinition.getDeploymentId(); } commandContext .getJobManager() .insertJob(this); }
evt.setTenantId(jobEntity.getTenantId()); ExecutionEntity execution = jobEntity.getExecution(); if (execution != null) { evt.setRootProcessInstanceId(execution.getRootProcessInstanceId());
public void insert() { CommandContext commandContext = Context.getCommandContext(); // add link to execution and deployment ExecutionEntity execution = getExecution(); if (execution != null) { execution.addJob(this); ProcessDefinitionImpl processDefinition = execution.getProcessDefinition(); this.deploymentId = processDefinition.getDeploymentId(); } commandContext .getJobManager() .insertJob(this); }
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); }
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); }
public UserOperationLogContextEntryBuilder inContextOf(JobEntity job) { entry.setJobDefinitionId(job.getJobDefinitionId()); entry.setProcessInstanceId(job.getProcessInstanceId()); entry.setProcessDefinitionId(job.getProcessDefinitionId()); entry.setProcessDefinitionKey(job.getProcessDefinitionKey()); entry.setDeploymentId(job.getDeploymentId()); ExecutionEntity execution = job.getExecution(); if (execution != null) { entry.setRootProcessInstanceId(execution.getRootProcessInstanceId()); } return this; }
public UserOperationLogContextEntryBuilder inContextOf(JobEntity job) { entry.setJobDefinitionId(job.getJobDefinitionId()); entry.setProcessInstanceId(job.getProcessInstanceId()); entry.setProcessDefinitionId(job.getProcessDefinitionId()); entry.setProcessDefinitionKey(job.getProcessDefinitionKey()); entry.setDeploymentId(job.getDeploymentId()); ExecutionEntity execution = job.getExecution(); if (execution != null) { entry.setRootProcessInstanceId(execution.getRootProcessInstanceId()); } return this; }
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); }
protected void ensureActivityIdInitialized() { if (activityId == null) { JobDefinition jobDefinition = getJobDefinition(); if (jobDefinition != null) { activityId = jobDefinition.getActivityId(); } else { ExecutionEntity execution = getExecution(); if (execution != null) { activityId = execution.getActivityId(); } } } }
public void insert() { CommandContext commandContext = Context.getCommandContext(); // add link to execution and deployment ExecutionEntity execution = getExecution(); if (execution != null) { execution.addJob(this); ProcessDefinitionImpl processDefinition = execution.getProcessDefinition(); this.deploymentId = processDefinition.getDeploymentId(); } commandContext .getJobManager() .insertJob(this); }
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); }
public UserOperationLogContextEntryBuilder inContextOf(JobEntity job) { entry.setJobDefinitionId(job.getJobDefinitionId()); entry.setProcessInstanceId(job.getProcessInstanceId()); entry.setProcessDefinitionId(job.getProcessDefinitionId()); entry.setProcessDefinitionKey(job.getProcessDefinitionKey()); entry.setDeploymentId(job.getDeploymentId()); ExecutionEntity execution = job.getExecution(); if (execution != null) { entry.setRootProcessInstanceId(execution.getRootProcessInstanceId()); } return this; }
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); }