Package org.camunda.bpm.engine.impl.persistence.entity

Examples of org.camunda.bpm.engine.impl.persistence.entity.SuspensionState


  private void updateSuspensionState(CommandContext commandContext) {
    JobDefinitionManager jobDefinitionManager = commandContext.getJobDefinitionManager();
    JobManager jobManager = commandContext.getJobManager();

    SuspensionState suspensionState = getSuspensionState();

    if (jobDefinitionId != null) {
      jobDefinitionManager.updateJobDefinitionSuspensionStateById(jobDefinitionId, suspensionState);
    } else
View Full Code Here


    if(jobId == null && jobDefinitionId == null && processInstanceId == null && processDefinitionId == null && processDefinitionKey == null) {
      throw new ProcessEngineException("Job id, job definition id, process instance id, process definition id nor process definition key cannot be null");
    }

    JobManager jobManager = commandContext.getJobManager();
    SuspensionState suspensionState = getSuspensionState();

    if (jobId != null) {
      jobManager.updateJobSuspensionStateById(jobId, suspensionState);
    } else
View Full Code Here

  }

  protected void updateSuspensionState(CommandContext commandContext) {
    ProcessDefinitionManager processDefinitionManager = commandContext.getProcessDefinitionManager();

    SuspensionState suspensionState = getProcessDefinitionSuspensionState();

    if (processDefinitionId != null) {
      processDefinitionManager.updateProcessDefinitionSuspensionStateById(processDefinitionId, suspensionState);
    } else
View Full Code Here

    }

    ExecutionManager executionManager = commandContext.getExecutionManager();
    TaskManager taskManager = commandContext.getTaskManager();

    SuspensionState suspensionState = getNewSuspensionState();

    if (processInstanceId != null) {
      executionManager.updateExecutionSuspensionStateByProcessInstanceId(processInstanceId, suspensionState);
      taskManager.updateTaskSuspensionStateByProcessInstanceId(processInstanceId, suspensionState);
    } else

    if (processDefinitionId != null) {
      executionManager.updateExecutionSuspensionStateByProcessDefinitionId(processDefinitionId, suspensionState);
      taskManager.updateTaskSuspensionStateByProcessDefinitionId(processDefinitionId, suspensionState);
    } else

    if (processDefinitionKey != null) {
      executionManager.updateExecutionSuspensionStateByProcessDefinitionKey(processDefinitionKey, suspensionState);
      taskManager.updateTaskSuspensionStateByProcessDefinitionKey(processDefinitionKey, suspensionState);
    }

    getSetJobStateCmd().execute(commandContext);

    PropertyChange propertyChange = new PropertyChange(SUSPENSION_STATE_PROPERTY, null, suspensionState.getName());
    commandContext.getOperationLogManager()
      .logProcessInstanceOperation(getLogEntryOperation(), processInstanceId, processDefinitionId,
          processDefinitionKey, propertyChange);

    return null;
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.impl.persistence.entity.SuspensionState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.