protected void switchVersionOfJob(JobEntity jobEntity, ProcessDefinitionEntity newProcessDefinition, Map<String, String> jobDefinitionMapping) { jobEntity.setProcessDefinitionId(newProcessDefinition.getId()); jobEntity.setDeploymentId(newProcessDefinition.getDeploymentId()); String newJobDefinitionId = jobDefinitionMapping.get(jobEntity.getJobDefinitionId()); jobEntity.setJobDefinitionId(newJobDefinitionId); }
protected void switchVersionOfJob(JobEntity jobEntity, ProcessDefinitionEntity newProcessDefinition, Map<String, String> jobDefinitionMapping) { jobEntity.setProcessDefinitionId(newProcessDefinition.getId()); jobEntity.setDeploymentId(newProcessDefinition.getDeploymentId()); String newJobDefinitionId = jobDefinitionMapping.get(jobEntity.getJobDefinitionId()); jobEntity.setJobDefinitionId(newJobDefinitionId); }
protected void createOpLogEntry(CommandContext commandContext, long previousPriority, JobEntity job) { PropertyChange propertyChange = new PropertyChange(JOB_PRIORITY_PROPERTY, previousPriority, job.getPriority()); commandContext .getOperationLogManager() .logJobOperation( UserOperationLogEntry.OPERATION_TYPE_SET_PRIORITY, job.getId(), job.getJobDefinitionId(), job.getProcessInstanceId(), job.getProcessDefinitionId(), job.getProcessDefinitionKey(), propertyChange); } }
protected void createOpLogEntry(CommandContext commandContext, long previousPriority, JobEntity job) { PropertyChange propertyChange = new PropertyChange(JOB_PRIORITY_PROPERTY, previousPriority, job.getPriority()); commandContext .getOperationLogManager() .logJobOperation( UserOperationLogEntry.OPERATION_TYPE_SET_PRIORITY, job.getId(), job.getJobDefinitionId(), job.getProcessInstanceId(), job.getProcessDefinitionId(), job.getProcessDefinitionKey(), propertyChange); } }
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; }
protected void setJobRetriesByJobId(String jobId, int retries, CommandContext commandContext) { JobEntity job = commandContext .getJobManager() .findJobById(jobId); if (job != null) { for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkUpdateRetriesJob(job); } if (job.isInInconsistentLockState()) { job.resetLock(); } int oldRetries = job.getRetries(); job.setRetries(retries); PropertyChange propertyChange = new PropertyChange(RETRIES, oldRetries, job.getRetries()); commandContext.getOperationLogManager().logJobOperation(getLogEntryOperation(), job.getId(), job.getJobDefinitionId(), job.getProcessInstanceId(), job.getProcessDefinitionId(), job.getProcessDefinitionKey(), propertyChange); } else { throw new ProcessEngineException("No job found with id '" + jobId + "'."); } }
protected void setJobRetriesByJobId(String jobId, int retries, CommandContext commandContext) { JobEntity job = commandContext .getJobManager() .findJobById(jobId); if (job != null) { for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkUpdateRetriesJob(job); } if (job.isInInconsistentLockState()) { job.resetLock(); } int oldRetries = job.getRetries(); job.setRetries(retries); PropertyChange propertyChange = new PropertyChange(RETRIES, oldRetries, job.getRetries()); commandContext.getOperationLogManager().logJobOperation(getLogEntryOperation(), job.getId(), job.getJobDefinitionId(), job.getProcessInstanceId(), job.getProcessDefinitionId(), job.getProcessDefinitionKey(), propertyChange); } else { throw new ProcessEngineException("No job found with id '" + jobId + "'."); } }
protected void switchVersionOfJob(JobEntity jobEntity, ProcessDefinitionEntity newProcessDefinition, Map<String, String> jobDefinitionMapping) { jobEntity.setProcessDefinitionId(newProcessDefinition.getId()); jobEntity.setDeploymentId(newProcessDefinition.getDeploymentId()); String newJobDefinitionId = jobDefinitionMapping.get(jobEntity.getJobDefinitionId()); jobEntity.setJobDefinitionId(newJobDefinitionId); }
protected void createOpLogEntry(CommandContext commandContext, long previousPriority, JobEntity job) { PropertyChange propertyChange = new PropertyChange(JOB_PRIORITY_PROPERTY, previousPriority, job.getPriority()); commandContext .getOperationLogManager() .logJobOperation( UserOperationLogEntry.OPERATION_TYPE_SET_PRIORITY, job.getId(), job.getJobDefinitionId(), job.getProcessInstanceId(), job.getProcessDefinitionId(), job.getProcessDefinitionKey(), propertyChange); } }
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; }
protected void setJobRetriesByJobId(String jobId, int retries, CommandContext commandContext) { JobEntity job = commandContext .getJobManager() .findJobById(jobId); if (job != null) { for (CommandChecker checker : commandContext.getProcessEngineConfiguration().getCommandCheckers()) { checker.checkUpdateJob(job); } if (job.isInInconsistentLockState()) { job.resetLock(); } int oldRetries = job.getRetries(); job.setRetries(retries); PropertyChange propertyChange = new PropertyChange(RETRIES, oldRetries, job.getRetries()); commandContext.getOperationLogManager().logJobOperation(getLogEntryOperation(), job.getId(), job.getJobDefinitionId(), job.getProcessInstanceId(), job.getProcessDefinitionId(), job.getProcessDefinitionKey(), propertyChange); } else { throw new ProcessEngineException("No job found with id '" + jobId + "'."); } }