本文整理汇总了Java中org.kuali.rice.kew.engine.node.RouteNode.getRouteNodeName方法的典型用法代码示例。如果您正苦于以下问题:Java RouteNode.getRouteNodeName方法的具体用法?Java RouteNode.getRouteNodeName怎么用?Java RouteNode.getRouteNodeName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.engine.node.RouteNode
的用法示例。
在下文中一共展示了RouteNode.getRouteNodeName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: returnDocumentToPreviousRouteLevel
import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
public DocumentRouteHeaderValue returnDocumentToPreviousRouteLevel(String principalId, DocumentRouteHeaderValue routeHeader, Integer destRouteLevel, String annotation)
throws InvalidActionTakenException {
DocumentRouteHeaderValue result = null;
if (destRouteLevel != null) {
RouteNode node = CompatUtils.getNodeForLevel(routeHeader.getDocumentType(), destRouteLevel);
if (node == null) {
throw new InvalidActionTakenException("Could not locate node for route level " + destRouteLevel);
}
Principal principal = loadPrincipal(principalId);
ReturnToPreviousNodeAction action = new ReturnToPreviousNodeAction(routeHeader, principal, annotation, node.getRouteNodeName(), true);
action.performAction();
result = finish(routeHeader);
}
return result;
}
示例2: 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);
}
示例3: exportSimpleNode
import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
private void exportSimpleNode(Element parent, RouteNode node, NodeType nodeType, SplitJoinContext splitJoinContext) {
Element simpleElement = renderNodeElement(parent, node, nodeType);
if (node.getNextNodes().size() > 1) {
throw new WorkflowRuntimeException("Simple node cannot have more than one next node: " + node.getRouteNodeName());
}
if (node.getNextNodes().size() == 1) {
RouteNode nextNode = (RouteNode)node.getNextNodes().get(0);
renderer.renderAttribute(simpleElement, NEXT_NODE, nextNode.getRouteNodeName());
if (node.getNextDocumentStatus() != null) {
renderer.renderAttribute(simpleElement, NEXT_APP_DOC_STATUS, node.getNextDocumentStatus());
}
exportNodeGraph(parent, nextNode, splitJoinContext);
}
}
示例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;
}
示例5: determineReturnNodeName
import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
private String determineReturnNodeName(RouteNode node, MovePoint movePoint, int currentStep) throws InvalidActionTakenException {
if (currentStep == movePoint.getStepsToMove()) {
return node.getRouteNodeName();
}
List previousNodes = node.getPreviousNodes();
if (previousNodes.size() == 0) {
throw new InvalidActionTakenException("Could not locate the named target node in the document's past route. Halted on step " + currentStep);
}
if (previousNodes.size() != 1) {
throw new InvalidActionTakenException("Located a multi-branch path, could not proceed backward past this point. Halted on step " + currentStep);
}
return determineReturnNodeName((RouteNode)previousNodes.get(0), movePoint, currentStep-1);
}
示例6: exportRouteMethod
import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
private void exportRouteMethod(Element parent, RouteNode node) {
if (!StringUtils.isBlank(node.getRouteMethodName())) {
String routeMethodCode = node.getRouteMethodCode();
String elementName = null;
if (KewApiConstants.ROUTE_LEVEL_FLEX_RM.equals(routeMethodCode)) {
elementName = RULE_TEMPLATE;
} else if (KewApiConstants.ROUTE_LEVEL_ROUTE_MODULE.equals(routeMethodCode)) {
elementName = ROUTE_MODULE;
} else {
throw new WorkflowRuntimeException("Invalid route method code '"+routeMethodCode+"' for node " + node.getRouteNodeName());
}
renderer.renderTextElement(parent, elementName, node.getRouteMethodName());
}
}
示例7: getRouteNodeForSearch
import org.kuali.rice.kew.engine.node.RouteNode; //导入方法依赖的package包/类
private String getRouteNodeForSearch(String documentTypeName, Set<String> nodeNames) {
assertEquals(1, nodeNames.size());
String expectedNodeName = nodeNames.iterator().next();
List routeNodes = KEWServiceLocator.getRouteNodeService().getFlattenedNodes(KEWServiceLocator.getDocumentTypeService().findByName(documentTypeName), true);
for (Iterator iterator = routeNodes.iterator(); iterator.hasNext();) {
RouteNode node = (RouteNode) iterator.next();
if (expectedNodeName.equals(node.getRouteNodeName())) {
return node.getRouteNodeName();
}
}
return null;
}