protected ActivityImpl getCurrentActivity(CommandContext commandContext, JobEntity job) { String type = job.getJobHandlerType(); ActivityImpl activity = null; if (SUPPORTED_TYPES.contains(type)) { DeploymentCache deploymentCache = Context.getProcessEngineConfiguration().getDeploymentCache(); ProcessDefinitionEntity processDefinitionEntity = deploymentCache.findDeployedProcessDefinitionById(job.getProcessDefinitionId()); activity = processDefinitionEntity.findActivity(job.getActivityId()); } else { // noop, because activity type is not supported } return activity; }
protected ActivityImpl getCurrentActivity(CommandContext commandContext, JobEntity job) { String type = job.getJobHandlerType(); ActivityImpl activity = null; if (SUPPORTED_TYPES.contains(type)) { DeploymentCache deploymentCache = Context.getProcessEngineConfiguration().getDeploymentCache(); ProcessDefinitionEntity processDefinitionEntity = deploymentCache.findDeployedProcessDefinitionById(job.getProcessDefinitionId()); activity = processDefinitionEntity.findActivity(job.getActivityId()); } else { // noop, because activity type is not supported } return activity; }
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 ActivityImpl getCurrentActivity(CommandContext commandContext, JobEntity job) { String type = job.getJobHandlerType(); ActivityImpl activity = null; if (SUPPORTED_TYPES.contains(type)) { DeploymentCache deploymentCache = Context.getProcessEngineConfiguration().getDeploymentCache(); ProcessDefinitionEntity processDefinitionEntity = deploymentCache.findDeployedProcessDefinitionById(job.getProcessDefinitionId()); activity = processDefinitionEntity.findActivity(job.getActivityId()); } else { // noop, because activity type is not supported } return activity; }
evt.setExecutionId(jobEntity.getExecutionId()); evt.setProcessInstanceId(jobEntity.getProcessInstanceId()); evt.setProcessDefinitionId(jobEntity.getProcessDefinitionId()); evt.setProcessDefinitionKey(jobEntity.getProcessDefinitionKey()); evt.setDeploymentId(jobEntity.getDeploymentId());
evt.setExecutionId(jobEntity.getExecutionId()); evt.setProcessInstanceId(jobEntity.getProcessInstanceId()); evt.setProcessDefinitionId(jobEntity.getProcessDefinitionId()); evt.setProcessDefinitionKey(jobEntity.getProcessDefinitionKey()); evt.setDeploymentId(jobEntity.getDeploymentId());
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 + "'."); } }
evt.setExecutionId(jobEntity.getExecutionId()); evt.setProcessInstanceId(jobEntity.getProcessInstanceId()); evt.setProcessDefinitionId(jobEntity.getProcessDefinitionId()); evt.setProcessDefinitionKey(jobEntity.getProcessDefinitionKey()); evt.setDeploymentId(jobEntity.getDeploymentId());