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

📄 servicemethod.java

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

import java.lang.reflect.*;
import java.util.*;
import org.jbpm.*;
import org.jbpm.util.lang.*;

public class ServiceMethod extends Enum {
  
  public static ServiceMethod START_PROCESS_INSTANCE = new ServiceMethod( "startInstance", getMethod( ExecutionService.class, "startProcessInstance", new Class[]{String.class,Long.class,Map.class,String.class} ) );
  public static ServiceMethod END_OF_STATE = new ServiceMethod( "endOfState", getMethod( ExecutionService.class, "endOfState", new Class[]{String.class, Long.class, Map.class, String.class} ) );
  public static ServiceMethod SET_VARIABLES = new ServiceMethod( "setVariables", getMethod( ExecutionService.class, "setVariables", new Class[]{String.class, Long.class, Map.class} ) );
  public static ServiceMethod DELEGATE = new ServiceMethod( "delegate", getMethod( ExecutionService.class, "delegate", new Class[]{String.class, Long.class, String.class, boolean.class} ) );
  public static ServiceMethod CANCEL_PROCESS_INSTANCE = new ServiceMethod( "cancelProcessInstance", getMethod( ExecutionService.class, "cancelProcessInstance", new Class[]{String.class,Long.class} ) );
  public static ServiceMethod CANCEL_TOKEN = new ServiceMethod( "cancelToken", getMethod( ExecutionService.class, "cancelToken", new Class[]{String.class, Long.class} ) );
  public static ServiceMethod UNDO = new ServiceMethod( "undo", getMethod( ExecutionService.class, "undo", new Class[]{String.class, Long.class, Date.class} ) );
  
  private transient Method method = null;
  
  protected ServiceMethod(String id, Method method) {
		super(id);
    this.method = method;
	}
  
  public Method getMethod() {
    return method;
  }

	public static Method getMethod( Class clazz, String methodName, Class[] parameterTypes ) {
    Method method = null;

    try {
      method = clazz.getMethod(methodName, parameterTypes);
    } catch (Exception e) {
      e.printStackTrace();
      throw new RuntimeException( "exception while initializing methods for authorization : " + e.getMessage() );
    }
    
    return method;
  }
}

⌨️ 快捷键说明

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