当前位置: 首页>>代码示例>>Java>>正文


Java RouteNode.getNextNodes方法代码示例

本文整理汇总了Java中org.kuali.rice.kew.engine.node.RouteNode.getNextNodes方法的典型用法代码示例。如果您正苦于以下问题:Java RouteNode.getNextNodes方法的具体用法?Java RouteNode.getNextNodes怎么用?Java RouteNode.getNextNodes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.kew.engine.node.RouteNode的用法示例。


在下文中一共展示了RouteNode.getNextNodes方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isNodeNameInPath

import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
private boolean isNodeNameInPath(String nodeName, RouteNode node, Set<String> inspected) throws Exception {
    boolean isInPath = !inspected.contains(node.getRouteNodeId()) && node.getRouteNodeName().equals(nodeName);
    inspected.add(node.getRouteNodeId());
    if (helper.isSubProcessNode(node)) {
        ProcessDefinitionBo subProcess = node.getDocumentType().getNamedProcess(node.getRouteNodeName());
        RouteNode subNode = subProcess.getInitialRouteNode();
        if (subNode != null) {
            isInPath = isInPath || isNodeNameInPath(nodeName, subNode, inspected);
        }
    }
    for (RouteNode nextNode : node.getNextNodes())
    {
        isInPath = isInPath || isNodeNameInPath(nodeName, nextNode, inspected);
    }
    return isInPath;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:17,代码来源:BlanketApproveEngine.java

示例2: getLevelForNode

import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
private static Integer getLevelForNode(RouteNode node, String nodeName, Integer currentLevel) {
    if (node == null) {
        throw new WorkflowRuntimeException("Could not locate node with name '"+nodeName+"'");
    }
    // TODO potential for infinite recursion here if their document type has loops in it.  Should this be a concern?
    // If their routing version is really "route level" then there should be no cycles.
    if (node.getRouteNodeName().equals(nodeName)) {
        return currentLevel;
    }
    List<RouteNode> nextNodes = node.getNextNodes();
    if (nextNodes.isEmpty()) {
        throw new WorkflowRuntimeException("Could not locate node with name '"+nodeName+"'");
    }
    if (nextNodes.size() > 1) {
        throw new WorkflowRuntimeException("Can only determine route level for document types with no splitting");
    }
    RouteNode nextNode = (RouteNode)nextNodes.get(0);
    return getLevelForNode(nextNode, nodeName, new Integer(currentLevel.intValue()+1));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:CompatUtils.java

示例3: determineFutureNodeName

import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
private String determineFutureNodeName(RouteNode node, MovePoint movePoint, int currentStep, Set nodesProcessed) throws InvalidActionTakenException {
    if (nodesProcessed.contains(node.getRouteNodeId())) {
        throw new InvalidActionTakenException("Detected a cycle at node " + node.getRouteNodeName() + " when attempting to move document.");
    }
    nodesProcessed.add(node.getRouteNodeId());
    if (currentStep == movePoint.getStepsToMove()) {
        return node.getRouteNodeName();
    }
    List nextNodes = node.getNextNodes();
    if (nextNodes.size() == 0) {
        throw new InvalidActionTakenException("Could not proceed forward, there are no more nodes in the route.  Halted on step " + currentStep);
    }
    if (nextNodes.size() != 1) {
        throw new InvalidActionTakenException("Cannot move forward in a multi-branch path.  Located "+nextNodes.size()+" branches.  Halted on step " + currentStep);
    }
    return determineFutureNodeName((RouteNode)nextNodes.get(0), movePoint, currentStep+1, nodesProcessed);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:MoveDocumentAction.java

示例4: getRouteLevelCompatibleNodeList

import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
/**
 * Returns a list of RouteNodes in a flat list which is equivalent to the route level concept of
 * Workflow <= version 2.0.  If the document type is not route level compatible, then this method will throw an error.
 */
public static List<RouteNode> getRouteLevelCompatibleNodeList(DocumentType documentType) {
    if (!isRouteLevelCompatible(documentType)) {
        throw new WorkflowRuntimeException("Attempting to invoke a 'route level' operation on a document which is not route level compatible.");
    }
    ProcessDefinitionBo primaryProcess = documentType.getPrimaryProcess();
    RouteNode routeNode = primaryProcess.getInitialRouteNode();
    List<RouteNode> nodes = new ArrayList<RouteNode>();
    int count = 0;
    int maxCount = 100;
    if (routeNode != null) {
        while (true) {
            nodes.add(routeNode);
            List<RouteNode> nextNodes = routeNode.getNextNodes();
            if (nextNodes.size() == 0) {
                break;
            }
            if (nextNodes.size() > 1) {
                throw new RuntimeException("Node has more than one next node!  It is not route level compatible!" + routeNode.getRouteNodeName());
            }
            if (count >= maxCount) {
                throw new RuntimeException("A runaway loop was detected when attempting to create route level compatible node graph.  documentType=" + documentType.getDocumentTypeId()+","+documentType.getName());
            }
            routeNode = nextNodes.iterator().next();
        }
    }
    return nodes;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:32,代码来源:CompatUtils.java

示例5: flattenSplitNode

import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
protected RouteNode flattenSplitNode( RouteNode splitNode, Map<String,RouteNode> nodes ) {
	nodes.put( splitNode.getRouteNodeName(), splitNode );
	RouteNode joinNode = null;
	
	for ( RouteNode nextNode : splitNode.getNextNodes() ) {
		joinNode = flattenRouteNodes(nextNode, nodes);
	}
	
	if ( joinNode != null ) {
		nodes.put( joinNode.getRouteNodeName(), joinNode );
	}
	return joinNode;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:14,代码来源:DocumentConfigurationViewAction.java


注:本文中的org.kuali.rice.kew.engine.node.RouteNode.getNextNodes方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。