Examples of IApplicationExecptionAction


Examples of com.starflow.wf.service.spi.IApplicationExecptionAction

   */
  private void executeExceptionAction(String beanName, Exception exception, ProcessInstance cloneProcessInstance, ActivityInst cloneActivityInst) {
    try {
      //beanName 名称后面没有指定调用方法时。直接调用IToolAppAction.execute
      int index = beanName.indexOf("#");
      IApplicationExecptionAction action = ApplicationContextHolder.getBean(beanName, IApplicationExecptionAction.class);
      if(index == -1) {
        action.execute(exception, cloneProcessInstance, cloneActivityInst);
      } else {
        //反射调用bean指定的方法。
        String methodName = beanName.substring(index + 1);
        if("".equals(beanName))
          throw new ProcessEngineException("IApplicationExecptionAction 实现类Bean:"+beanName+",没有指定方法名称");
       
        beanName = beanName.substring(0, index);
        try {
          Method method = action.getClass().getMethod(methodName, long.class, long.class);
          method.invoke(action, exception, cloneProcessInstance, cloneActivityInst);
        } catch (Exception e) {
          throw new ProcessEngineException("IApplicationExecptionAction 实现类Bean:"+beanName+",没有此方法", e);
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.