本文整理汇总了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;
}
示例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;
}
示例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;
}