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


Java RouteNode.getNodeType方法代码示例

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


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

示例1: createTransitionEngine

import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
public static TransitionEngine createTransitionEngine(RouteNodeInstance nodeInstance) throws Exception {
	RouteHelper helper = new RouteHelper();
	RouteNode routeNode = nodeInstance.getRouteNode();
	TransitionEngine engine = null;
	if (helper.isSimpleNode(routeNode)) {
		engine = new SimpleTransitionEngine();
	} else if (helper.isSplitNode(routeNode)) {
		engine = new SplitTransitionEngine();
	} else if (helper.isJoinNode(routeNode)) {
		engine = new JoinTransitionEngine();
	} else if (helper.isDynamicNode(routeNode)) {
		engine = new DynamicTransitionEngine();
	} else if (helper.isSubProcessNode(routeNode)) {
		engine = new SubProcessTransitionEngine();
	} else {
		throw new WorkflowException("Could not locate transition engine for node " + routeNode.getNodeType());
	}
	engine.setRouteHelper(helper);
	return engine;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:21,代码来源:TransitionEngineFactory.java

示例2: getNodeTypeForNodeFromFragment

import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
/**
 *
 * This method will find the base node type via the content fragment of the node.
 * Basically, it reads the node type, start, split, join, etc and then assigns
 * the base type to it.  This is necessary because there are cases where the
 * passed in nodeType will no be in the classpath. It should, in theory do
 * the same thing as getNodeTypeForNode.
 *
 * @param node
 * @return
 */
private NodeType getNodeTypeForNodeFromFragment(RouteNode node) {
    NodeType nodeType = null;
    String contentFragment = node.getContentFragment();
    String errorMessage = "Could not determine proper XML element for the given node type: " + node.getNodeType();

    for (Iterator<NodeType> iterator = NodeType.getTypeList().iterator(); iterator.hasNext();) {
    	NodeType nType = iterator.next();
    	// checks for something like <start
    	// or <split
    	// we may want to switch this out for something a little more robust.
    	if(contentFragment.startsWith("<" + nType.getName())){
       		nodeType = nType;
       	}
    }

    if (nodeType == null) {
        throw new WorkflowRuntimeException(errorMessage);
    }
    return nodeType;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:32,代码来源:DocumentTypeXmlExporter.java

示例3: getNodeTypeForNode

import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
private NodeType getNodeTypeForNode(RouteNode node) {
    NodeType nodeType = null;
    String errorMessage = "Could not determine proper XML element for the given node type: " + node.getNodeType();

    try {
        nodeType = NodeType.fromClassName(node.getNodeType());
    } catch (ResourceUnavailableException e) {
        throw new WorkflowRuntimeException(errorMessage, e);
    }
    if (nodeType == null) {
        throw new WorkflowRuntimeException(errorMessage);
    }
    return nodeType;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:DocumentTypeXmlExporter.java


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