Java Code Examples for org.activiti.engine.impl.persistence.entity.SuspensionState#SUSPENDED

The following examples show how to use org.activiti.engine.impl.persistence.entity.SuspensionState#SUSPENDED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TaskQueryImpl.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
public TaskQuery suspended() {
  if(orActive) {
    currentOrQueryObject.suspensionState = SuspensionState.SUSPENDED;
  } else {
    this.suspensionState = SuspensionState.SUSPENDED;
  }
  return this;
}
 
Example 2
Source File: ProcessInstanceQueryImpl.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
public ProcessInstanceQuery suspended() {
  if (inOrStatement) {
    this.currentOrQueryObject.suspensionState = SuspensionState.SUSPENDED;
  } else {
    this.suspensionState = SuspensionState.SUSPENDED;
  }
  return this;
}
 
Example 3
Source File: AbstractSetProcessDefinitionStateCmd.java    From activiti6-boot2 with Apache License 2.0 5 votes vote down vote up
public Void execute(CommandContext commandContext) {

    List<ProcessDefinitionEntity> processDefinitions = findProcessDefinition(commandContext);
    boolean hasActiviti5ProcessDefinitions = false;
    for (ProcessDefinitionEntity processDefinitionEntity : processDefinitions) {
      if (Activiti5Util.isActiviti5ProcessDefinition(commandContext, processDefinitionEntity)) {
        hasActiviti5ProcessDefinitions = true;
        break;
      }
    }
    
    if (hasActiviti5ProcessDefinitions) {
      Activiti5CompatibilityHandler activiti5CompatibilityHandler = Activiti5Util.getActiviti5CompatibilityHandler(); 
      if (getProcessDefinitionSuspensionState() == SuspensionState.ACTIVE) {
        activiti5CompatibilityHandler.activateProcessDefinition(processDefinitionId, processDefinitionKey, includeProcessInstances, executionDate, tenantId);
      } else if (getProcessDefinitionSuspensionState() == SuspensionState.SUSPENDED) {
        activiti5CompatibilityHandler.suspendProcessDefinition(processDefinitionId, processDefinitionKey, includeProcessInstances, executionDate, tenantId);
      }
      return null;
    }

    if (executionDate != null) { // Process definition state change is delayed
      createTimerForDelayedExecution(commandContext, processDefinitions);
    } else { // Process definition state is changed now
      changeProcessDefinitionState(commandContext, processDefinitions);
    }

    return null;
  }
 
Example 4
Source File: TaskQueryImpl.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
@Override
public TaskQuery suspended() {
    if (orActive) {
        currentOrQueryObject.suspensionState = SuspensionState.SUSPENDED;
    } else {
        this.suspensionState = SuspensionState.SUSPENDED;
    }
    return this;
}
 
Example 5
Source File: ProcessInstanceQueryImpl.java    From flowable-engine with Apache License 2.0 5 votes vote down vote up
@Override
public ProcessInstanceQuery suspended() {
    if (inOrStatement) {
        this.currentOrQueryObject.suspensionState = SuspensionState.SUSPENDED;
    } else {
        this.suspensionState = SuspensionState.SUSPENDED;
    }
    return this;
}
 
Example 6
Source File: TaskQueryImpl.java    From lemon with Apache License 2.0 5 votes vote down vote up
public TaskQuery suspended() {
    if (orActive) {
        currentOrQueryObject.suspensionState = SuspensionState.SUSPENDED;
    } else {
        this.suspensionState = SuspensionState.SUSPENDED;
    }

    return this;
}
 
Example 7
Source File: ProcessDefinitionQueryImpl.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
public ProcessDefinitionQuery suspended() {
  this.suspensionState = SuspensionState.SUSPENDED;
  return this;
}
 
Example 8
Source File: SuspendProcessDefinitionCmd.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
protected SuspensionState getProcessDefinitionSuspensionState() {
  return SuspensionState.SUSPENDED;
}
 
Example 9
Source File: SuspendProcessInstanceCmd.java    From activiti6-boot2 with Apache License 2.0 4 votes vote down vote up
@Override
protected SuspensionState getNewState() {
  return SuspensionState.SUSPENDED;
}
 
Example 10
Source File: ProcessDefinitionQueryImpl.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
public ProcessDefinitionQuery suspended() {
    this.suspensionState = SuspensionState.SUSPENDED;
    return this;
}
 
Example 11
Source File: SuspendProcessDefinitionCmd.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
protected SuspensionState getProcessDefinitionSuspensionState() {
    return SuspensionState.SUSPENDED;
}
 
Example 12
Source File: SuspendProcessInstanceCmd.java    From flowable-engine with Apache License 2.0 4 votes vote down vote up
@Override
protected SuspensionState getNewState() {
    return SuspensionState.SUSPENDED;
}