Package com.starflow.wf.engine

Examples of com.starflow.wf.engine.ProcessEngineException


        BeanUtils.copyProperties(event.getProcessInstance(), cloneProcessInstance);
        ActivityInst cloneActivityInst = new ActivityInst();
        BeanUtils.copyProperties(activityInst, cloneActivityInst);
        isStart = executeActivateRule(beanName, cloneProcessInstance, cloneActivityInst);
      } catch (Exception e) {
        throw new ProcessEngineException("环节激活规则逻辑失败", e);
      }
    }
     
    return isStart;
  }
View Full Code Here


        isStart = action.execute(cloneProcessInstance, cloneActivityInst);
      } else {
        //反射调用bean指定的方法。
        String methodName = beanName.substring(index + 1);
        if("".equals(beanName))
          throw new ProcessEngineException("IActivateRuleAction 实现类Bean:"+beanName+",没有指定方法名称");
       
        beanName = beanName.substring(0, index);
        try {
          Method method = action.getClass().getMethod(methodName, long.class, long.class);
          isStart = (Boolean)method.invoke(action, cloneProcessInstance, cloneActivityInst);
        } catch (Exception e) {
          throw new ProcessEngineException("IActivateRuleAction 实现类Bean:"+beanName+",没有此方法", e);
        }
      }
    } catch (Exception e) {
      throw new ProcessEngineException("环节激活规则逻辑执行失败", e);
    }
    return isStart;
  }
View Full Code Here

    final URL url = ConfigHelper.locateConfig(path);

    if (url == null) {
      String msg = "Unable to locate config file: " + path;
      log.error( msg );
      throw new ProcessEngineException(msg);
    }

    try {
      return url.openStream();
        }
    catch(IOException e) {
          throw new ProcessEngineException("Unable to open config file: " + path, e);
        }
  }
View Full Code Here

      Properties properties = new Properties();
      properties.load( getConfigStream(path) );
      return properties;
    }
    catch(IOException e) {
      throw new ProcessEngineException("Unable to load properties from specified config file: " + path, e);
    }
  }
View Full Code Here

    }
    if ( stream == null ) {
      stream = Environment.class.getClassLoader().getResourceAsStream( stripped );
    }
    if ( stream == null ) {
      throw new ProcessEngineException( resource + " not found" );
    }
    return stream;
  }
View Full Code Here

    if ( stream == null && hasLeadingSlash ) {
      stream = Environment.class.getClassLoader().getResourceAsStream( stripped );
    }

    if ( stream == null ) {
      throw new ProcessEngineException( resource + " not found" );
    }

    return stream;
  }
View Full Code Here

  @Override
  public void activityEnd(ActivityFinishEvent event) {
    ActivityInst activityInst = event.getActivityInst();
    //判断环节是否处于运行状态,才可结束该工作项
    if(StarFlowState.ACT_INST_RUNING != activityInst.getCurrentState())
      throw new ProcessEngineException("当前环节(activityInstId="+activityInst.getActivityInstId()+")不处于状态,"+
          "无法完成环节的运行!");
   
    Date nowDate = new Date();
    ProcessEngine processEngine = event.getProcessEngine();
    activityInst.setCurrentState(StarFlowState.ACT_INST_COMPLETED);
View Full Code Here

    ParticipantMode particiMode = ParticipantModeFactory.buildParticipantMode(mode);
    participants = particiMode.creatParticipants(event, activityXml);
   
    if(participants ==null || participants.size() == 0) {
      String actName = activityXml.getName();
      throw new ProcessEngineException("【" + actName + "】环节指定的参与为空,不能启动环节");
    }
   
    return participants;
  }
View Full Code Here

      participants.addAll(service.getParticipants(p.getParticType(), p.getParticipant()));
    }
   
    if(participants ==null || participants.size() == 0) {
      String actName = activityXml.getName();
      throw new ProcessEngineException("【" + actName + "】环节指定的参与为空,不能启动流程");
    }
   
    return participants;
  }
View Full Code Here

          return action.execute(cloneProcessInstance, cloneActivityInst);
        } else {
          //反射调用bean指定的方法。
          String methodName = beanName.substring(index + 1);
          if("".equals(beanName))
            throw new ProcessEngineException("IToolAppAction 实现类Bean:"+beanName+",没有指定方法名称");
         
          beanName = beanName.substring(0, index);
          try {
            Method method = action.getClass().getMethod(methodName, long.class, long.class);
            return method.invoke(action, cloneProcessInstance, cloneActivityInst);
          } catch (Exception e) {
            throw new ProcessEngineException("IToolAppAction 实现类Bean:"+beanName+",没有此方法", e);
          }
        }
      } catch (Exception e) {
        throw new ProcessEngineException("自动环节业务逻辑执行失败", e);
      }
    }
View Full Code Here

TOP

Related Classes of com.starflow.wf.engine.ProcessEngineException

Copyright © 2018 www.massapicom. 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.