⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 executionservice.java

📁 一个java工作流引擎
💻 JAVA
字号:
package org.jbpm;

import java.util.*;
import org.jbpm.model.log.*;

/**
 * allows clients to manage the execution of business processes.
 */
public interface ExecutionService extends ExecutionReadService {

  /**
   * creates a new process instance for the given process definition.
   * @param actorId is the swimlane that will be recorded as the swimlane that started this process instance.
   * @param definitionId is the id of the process definition that has to be started.
   * @throws java.lang.NullPointerException when processDefinitionId is null.
   * @throws java.lang.IllegalArgumentException when processDefinitionId is not a valid process-definition-id.
   * @throws PersistenceException when jbpm cannot contact its database.
   * @throws AuthorizationException if the swimlane is not authorized to start that process definition.  
   */  
  InvocationLog startProcessInstance( String actorId, Long definitionId ) throws ExecutionException;

  /**
   * creates a new process instance for the given process definition.
   * @param actorId is the swimlane that will be recorded as the swimlane that started this process instance.
   * @param definitionId is the id of the process definition that has to be started.
   * @param variables are the variables to be stored in the process execution context.
   * @throws java.lang.NullPointerException when processDefinitionId is null.
   * @throws java.lang.IllegalArgumentException when processDefinitionId is not a valid process-definition-id.
   * @throws PersistenceException when jbpm cannot contact its database.
   * @throws AuthorizationException if the swimlane is not authorized to start that process definition.  
   */  
  InvocationLog startProcessInstance( String actorId, Long definitionId, Map variables ) throws ExecutionException;

  /**
   * creates a new process instance for the given process definition.
   * @param actorId is the swimlane that will be recorded as the swimlane that started this process instance.
   * @param definitionId is the id of the process definition that has to be started.
   * @param variables are the variables to be stored in the process execution context.
   * @param transitionName is the name of the transition to be taken from the start-state.
   * @throws java.lang.NullPointerException when processDefinitionId is null.
   * @throws java.lang.IllegalArgumentException when processDefinitionId is not a valid process-definition-id.
   * @throws PersistenceException when jbpm cannot contact its database.
   * @throws AuthorizationException if the swimlane is not authorized to start that process definition.  
   * @throws IllegalTransitionException if transitionName is null or does not match with one of the names of the transitions leaving the start-state.
   */  
  InvocationLog startProcessInstance( String actorId, Long definitionId, Map variables, String transitionName ) throws ExecutionException;
  
  /**
   * stores the variables without signalling an end-of-state.
   * @throws NullPointerException when flowId or attributeValues is null.
   * @throws IllegalArgumentException when flowId is not a valid flow-id.
   * @throws PersistenceException when jbpm cannot contact its database.
   */
  InvocationLog setVariables( String actorId, Long tokenId, Map variables ) throws ExecutionException;
  
  /**
   * will cause the engine to calculate the next state.  This method can only be used when
   * exact one transition leaves the current state.  If more then one transition leaves the
   * current state of the given flow, use method {@link #endOfState(String,Long,Map,String)}.
   */
  InvocationLog endOfState( String actorId, Long tokenId ) throws ExecutionException;

  /**
   * will cause the engine to calculate the next state.  This method can only be used when
   * exact one transition leaves the current state.  If more then one transition leaves the
   * current state of the given flow, use method {@link #endOfState(String,Long,Map,String)}.
   */
  InvocationLog endOfState( String actorId, Long tokenId, Map variables ) throws ExecutionException;

  /**
   * will cause the engine to calculate the next state.  This method can only be used when
   * exact one transition leaves the current state.  If more then one transition leaves the
   * current state of the given flow, use method {@link #endOfState(String,Long,Map,String)}.
   * @throws IllegalTransitionException if 
   *   <ul>
   *     <li>transitionName is null and the state has more then one leaving transition</li>
   *     <li>or when the transitionName does not match with one of the names of the transitions leaving the start-state</li>
   *   </ul>
   */
  InvocationLog endOfState( String actorId, Long tokenId, Map variables, String transitionName ) throws ExecutionException;
  
  /**
   * reassigns the current activity of the given flow to the destination swimlane.
   */
  InvocationLog delegate( String actorId, Long tokenId, String destinationActorId, boolean transferResponsability ) throws ExecutionException;

  /**
   * cancels the complete process instance.
   */
  InvocationLog cancelProcessInstance( String actorId, Long processInstanceId ) throws ExecutionException;

  /**
   * cancels one flow in a process instance.
   */
  InvocationLog cancelToken( String actorId, Long flowId ) throws ExecutionException;
  
  /**
   * brings the process instance back in the state it was at the given time.
   * @param processInstanceId is the process instance on which the undo should operate.
   * @param date is a time in the past to which the process instance state
   *   should be reversed. An InvocationLog with a date equal to the given date will also 
   *   be undone. 
   */
  InvocationLog undo( String actorId, Long processInstanceId, Date date ) throws ExecutionException;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -