All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.activiti.engine.impl.persistence.entity.ExecutionEntityManager Maven / Gradle / Ivy

/* Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.activiti.engine.impl.persistence.entity;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.activiti.engine.impl.ExecutionQueryImpl;
import org.activiti.engine.impl.Page;
import org.activiti.engine.impl.ProcessInstanceQueryImpl;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.Execution;
import org.activiti.engine.runtime.ProcessInstance;

/**

 */
public interface ExecutionEntityManager extends EntityManager {
  
  ExecutionEntity createProcessInstanceExecution(ProcessDefinition processDefinition, String businessKey, String tenantId, String initiatorVariableName);

  ExecutionEntity createChildExecution(ExecutionEntity parentExecutionEntity);
  
  ExecutionEntity createSubprocessInstance(ProcessDefinition processDefinition, ExecutionEntity superExecutionEntity, String businessKey);
  
  /**
   * Finds the {@link ExecutionEntity} for the given root process instance id.
   * All children will have been fetched and initialized. 
   */
  ExecutionEntity findByRootProcessInstanceId(String rootProcessInstanceId);

  ExecutionEntity findSubProcessInstanceBySuperExecutionId(String superExecutionId);

  List findChildExecutionsByParentExecutionId(String parentExecutionId);

  List findChildExecutionsByProcessInstanceId(String processInstanceId);

  List findExecutionsByParentExecutionAndActivityIds(String parentExecutionId, Collection activityIds);

  long findExecutionCountByQueryCriteria(ExecutionQueryImpl executionQuery);

  List findExecutionsByQueryCriteria(ExecutionQueryImpl executionQuery, Page page);

  long findProcessInstanceCountByQueryCriteria(ProcessInstanceQueryImpl executionQuery);

  List findProcessInstanceByQueryCriteria(ProcessInstanceQueryImpl executionQuery);
  
  List findProcessInstanceAndVariablesByQueryCriteria(ProcessInstanceQueryImpl executionQuery);

  Collection findInactiveExecutionsByProcessInstanceId(String processInstanceId);

  Collection findInactiveExecutionsByActivityIdAndProcessInstanceId(String activityId, String processInstanceId);
  
  List findExecutionsByNativeQuery(Map parameterMap, int firstResult, int maxResults);

  List findProcessInstanceByNativeQuery(Map parameterMap, int firstResult, int maxResults);

  long findExecutionCountByNativeQuery(Map parameterMap);
  

  /**
   * Returns all child executions of a given {@link ExecutionEntity}.
   * In the list, child executions will be behind parent executions. 
   */
  List collectChildren(ExecutionEntity executionEntity);
  
  ExecutionEntity findFirstScope(ExecutionEntity executionEntity);
  
  ExecutionEntity findFirstMultiInstanceRoot(ExecutionEntity executionEntity);
  

  void updateExecutionTenantIdForDeployment(String deploymentId, String newTenantId);
  
  String updateProcessInstanceBusinessKey(ExecutionEntity executionEntity, String businessKey);
  

  void deleteProcessInstancesByProcessDefinition(String processDefinitionId, String deleteReason, boolean cascade);

  void deleteProcessInstance(String processInstanceId, String deleteReason, boolean cascade);
  
  void deleteProcessInstanceExecutionEntity(String processInstanceId, String currentFlowElementId, 
      String deleteReason, boolean cascade, boolean cancel);
  
  void deleteChildExecutions(ExecutionEntity executionEntity, String deleteReason, boolean cancel);
  
  void deleteExecutionAndRelatedData(ExecutionEntity executionEntity, String deleteReason, boolean cancel);


  void updateProcessInstanceLockTime(String processInstanceId);

  void clearProcessInstanceLockTime(String processInstanceId);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy