Package com.starflow.wf.engine.model.elements

Examples of com.starflow.wf.engine.model.elements.TransitionElement


   
    if(Constants.SPLIT_SINGLE.equalsIgnoreCase(mode)) {//单一分支
      // (1) 满足条件的连接线所指的活动被触发;
      // (2) 如果有若干个连接线上的条件都满足,那么比较连接线上的优先级,优先级高的那条连接线所指的活动将被触发;
      // (3) 如果连接线上的条件都不满足,那么取“默认值”的那条连接线所指的活动将被触发。
      TransitionElement defaultTransition = findTransitonsForJexl(event, processXml,
          transitions, nextNodes, true);
     
      if(nextNodes.size() ==0 ) {
        String _to = defaultTransition.getTo();
        ActivityElement _e = processXml.getActivitys().get(_to);
        nextNodes.add(_e);
      }
    } else if(Constants.SPLIT_MULTI.equalsIgnoreCase(mode)) {//多路分支
      // (1) 如果连接线上取“默认值”,那么由此连接线所指的后继活动会被触发;
      // (2) 如果连接线上的条件满足,那么由此连接线所指的后继活动会被触发。
      TransitionElement defaultTransition = findTransitonsForJexl(event, processXml,
          transitions, nextNodes, false);
     
      if(defaultTransition != null) {
        String _to = defaultTransition.getTo();
        ActivityElement _e = processXml.getActivitys().get(_to);
        nextNodes.add(_e);
      }
    } else if(Constants.SPLIT_ALL.equalsIgnoreCase(mode)) {//全部分支
      //表示该活动结束后它的所有后继活动将同时被触发。
View Full Code Here


    String activityDefId = event.getPreActivityXml().getId();
    Map<String , Object> conditions = relaDataManager.getExpressConditions(processInstId, activityDefId);
   
    List<TransitionElement> tranEls = new ArrayList<TransitionElement>();
   
    TransitionElement defaultTransition = null;
    for(TransitionElement transitionXml : transitions) { //循所有的分支,寻找满足条件的分支
      boolean isDefault = transitionXml.getIsDefault();
      if(isDefault) {
        defaultTransition = transitionXml;
        continue;
View Full Code Here

    List<Element> tranEls = null;
    String _xpath = "/ProcessDefine/Transitions/Transition";
    tranEls = document.selectNodes(_xpath);
   
    for(Element tranEl : tranEls) {
      TransitionElement transitionXml = new TransitionElement();
      transitionXml.setId(NodeUtil.getNodeAttrValue(tranEl, StarFlowNames.TRAN_ATTR_ID));
      transitionXml.setName(NodeUtil.getNodeAttrValue(tranEl, StarFlowNames.TRAN_ATTR_NAME));
      transitionXml.setFrom(NodeUtil.getNodeAttrValue(tranEl, StarFlowNames.TRAN_ATTR_FROM));
      transitionXml.setTo(NodeUtil.getNodeAttrValue(tranEl, StarFlowNames.TRAN_ATTR_TO));
      transitionXml.setIsDefault(NodeUtil.getNodeBooleanValue(tranEl, StarFlowNames.TRAN_CHILD_ISDEFAULT));
      transitionXml.setComplexExpressionValue(NodeUtil.getNodeStringValue(tranEl, StarFlowNames.TRAN_CHILD_COMPLEXEXPRESSIONVALUE));
      transitionXml.setIsSimpleExpression(NodeUtil.getNodeBooleanValue(tranEl, StarFlowNames.TRAN_CHILD_ISSIMPLEEXPRESSION));
      transitionXml.setLeftValue(NodeUtil.getNodeStringValue(tranEl, StarFlowNames.TRAN_CHILD_LEFTVALUE));
      transitionXml.setCompType(NodeUtil.getNodeStringValue(tranEl, StarFlowNames.TRAN_CHILD_COMPTYPE));
      transitionXml.setRightValue(NodeUtil.getNodeStringValue(tranEl, StarFlowNames.TRAN_CHILD_RIGHTVALUE));
      transitionXml.setPriority(NodeUtil.getNodeIntValue(tranEl, StarFlowNames.TRAN_CHILD_PRIORITY));
      transitionXml.setPoint(NodeUtil.getElementPoint(tranEl));
      transitions.add(transitionXml);
    }
    return transitions;
  }
View Full Code Here

TOP

Related Classes of com.starflow.wf.engine.model.elements.TransitionElement

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.