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