executioncontext.java

来自「一个java工作流引擎」· Java 代码 · 共 70 行

JAVA
70
字号
package org.jbpm.delegation;

import org.jbpm.*;
import org.jbpm.util.log.*;
import org.jbpm.model.definition.*;
import org.jbpm.model.execution.*;

/**
 * is the interface that provides access to the process execution
 * context information for the delegation implementations.  
 */
public interface ExecutionContext {
  
  /**
   * gets the {@link Definition}.
   */
  Definition getDefinition();

  /**
   * gets the {@link ProcessInstance}.
   */
  ProcessInstance getProcessInstance();
  
  /**
   * gets the {@link Flow} in which this delegation is executed. 
   */
  Token getToken();
  
  /**
   * gets the {@link Node} in which this delegation is executed.
   */
  Node getNode();
  
  /**
   * gets the value of a variable.  The variable is searched recursively from the
   * current token to the root token of the process instance.
   */
  Object getVariable( String name );
  
  /**
   * sets the variable with the specified name to the specified value.   
   */
  void setVariable( String name, Object value );
  
  /**
   * allows the delegate-implementations to log events to the database.
   */
  void log( String msg );

  /**
   * allows the delegate-implementations to log events to the database.
   */
  void log( Level level, String msg );

  /**
   * cancels all scheduled events with the given reference.
   */  
  void cancelEvent( String reference );

  /**
   * retrieves the execution service.
   */
  ExecutionService getExecutionService();
  
  /**
   * provides access to the jbpm job scheduler service.
   */
  SchedulerService getSchedulerService();
}

⌨️ 快捷键说明

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