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


Java Transition类代码示例

本文整理汇总了Java中org.kuali.rice.kew.engine.transition.Transition的典型用法代码示例。如果您正苦于以下问题:Java Transition类的具体用法?Java Transition怎么用?Java Transition使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Transition类属于org.kuali.rice.kew.engine.transition包,在下文中一共展示了Transition类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: invokeTransition

import org.kuali.rice.kew.engine.transition.Transition; //导入依赖的package包/类
/**
 * Invokes the transition and returns the next node instances to transition
 * to from the current node instance on the route context.
 *
 * This is a 3-step process:
 *
 * <pre>
 *  1) If the node instance already has next nodes, return those,
 *  2) otherwise, invoke the transition engine for the node, if the resulting node instances are not empty, return those,
 *  3) lastly, if our node is in a process and no next nodes were returned from it's transition engine, invoke the
 *     transition engine of the process node and return the resulting node instances.
 * </pre>
 */
private List<RouteNodeInstance> invokeTransition(RouteContext context, RouteNodeInstance nodeInstance, ProcessResult processResult, TransitionEngine transitionEngine) throws Exception {
	List<RouteNodeInstance> nextNodeInstances = nodeInstance.getNextNodeInstances();
	if (nextNodeInstances.isEmpty()) {
		Transition result = transitionEngine.transitionFrom(context, processResult);
		nextNodeInstances = result.getNextNodeInstances();
		if (nextNodeInstances.isEmpty() && nodeInstance.isInProcess()) {
			transitionEngine = TransitionEngineFactory.createTransitionEngine(nodeInstance.getProcess());
			context.setNodeInstance(nodeInstance);
			nextNodeInstances = invokeTransition(context, nodeInstance.getProcess(), processResult, transitionEngine);
		}
	}
       // if this nodeInstance already has next node instance we can just return them
       return nextNodeInstances;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:28,代码来源:StandardWorkflowEngine.java

示例2: invokeTransition

import org.kuali.rice.kew.engine.transition.Transition; //导入依赖的package包/类
/**
 * Invokes the transition and returns the next node instances to transition
 * to from the current node instance on the route context.
 *
 * This is a 3-step process:
 *
 * <pre>
 *  1) If the node instance already has next nodes, return those,
 *  2) otherwise, invoke the transition engine for the node, if the resulting node instances are not empty, return those,
 *  3) lastly, if our node is in a process and no next nodes were returned from it's transition engine, invoke the
 *     transition engine of the process node and return the resulting node instances.
 * </pre>
 */
/*
 * private List invokeTransition(RouteContext context, RouteNodeInstance
 * nodeInstance, ProcessResult processResult, TransitionEngine
 * transitionEngine) throws Exception { List nextNodeInstances =
 * nodeInstance.getNextNodeInstances(); if (nextNodeInstances.isEmpty()) {
 * Transition result = transitionEngine.transitionFrom(context,
 * processResult); nextNodeInstances = result.getNextNodeInstances(); if
 * (nextNodeInstances.isEmpty() && nodeInstance.isInProcess()) {
 * transitionEngine =
 * TransitionEngineFactory.createTransitionEngine(nodeInstance.getProcess());
 * nextNodeInstances = invokeTransition(context, nodeInstance.getProcess(),
 * processResult, transitionEngine); } } return nextNodeInstances; }
 */

private List invokeTransition(RouteContext context, RouteNodeInstance nodeInstance, ProcessResult processResult, TransitionEngine transitionEngine) throws Exception {
	List nextNodeInstances = nodeInstance.getNextNodeInstances();
	if (nextNodeInstances.isEmpty()) {
		Transition result = transitionEngine.transitionFrom(context, processResult);
		nextNodeInstances = result.getNextNodeInstances();
		if (nextNodeInstances.isEmpty() && nodeInstance.isInProcess()) {
			transitionEngine = TransitionEngineFactory.createTransitionEngine(nodeInstance.getProcess());
			context.setNodeInstance(nodeInstance);
			nextNodeInstances = invokeTransition(context, nodeInstance.getProcess(), processResult, transitionEngine);
		}
	}
	return nextNodeInstances;
}
 
开发者ID:aapotts,项目名称:kuali_rice,代码行数:41,代码来源:StandardWorkflowEngine.java


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