本文整理汇总了Java中org.kuali.rice.kew.api.action.MovePoint类的典型用法代码示例。如果您正苦于以下问题:Java MovePoint类的具体用法?Java MovePoint怎么用?Java MovePoint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MovePoint类属于org.kuali.rice.kew.api.action包,在下文中一共展示了MovePoint类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: determineStartNode
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的package包/类
private RouteNodeInstance determineStartNode(Collection<RouteNodeInstance> activeNodes, MovePoint movePoint) throws InvalidActionTakenException {
RouteNodeInstance startNodeInstance = null;
for (RouteNodeInstance nodeInstance : activeNodes)
{
if (nodeInstance.getName().equals(movePoint.getStartNodeName()))
{
if (startNodeInstance != null)
{
throw new InvalidActionTakenException("More than one active node exists with the given name: " + movePoint.getStartNodeName());
}
startNodeInstance = nodeInstance;
}
}
if (startNodeInstance == null) {
throw new InvalidActionTakenException("Could not locate an active node with the given name: " + movePoint.getStartNodeName());
}
return startNodeInstance;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:MoveDocumentAction.java
示例2: determineFutureNodeName
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的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);
}
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:MoveDocumentAction.java
示例3: testMoveDocumentParallel
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的package包/类
@Test public void testMoveDocumentParallel() throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("ewestfal"), ParallelSetup.DOCUMENT_TYPE_NAME);
document.blanketApprove("", new String[] { ParallelSetup.WORKFLOW_DOCUMENT_2_B2_NODE, ParallelSetup.WORKFLOW_DOCUMENT_3_B1_NODE, ParallelSetup.WORKFLOW_DOCUMENT_4_B3_NODE });
Set nodeNames = TestUtilities.createNodeInstanceNameSet(KEWServiceLocator.getRouteNodeService().getActiveNodeInstances(document.getDocumentId()));
assertEquals("There should be 3 active nodes.", 3, nodeNames.size());
assertTrue("Should be at WorkflowDocument3-B1", nodeNames.contains(ParallelSetup.WORKFLOW_DOCUMENT_3_B1_NODE));
assertTrue("Should be at WorkflowDocument2-B2", nodeNames.contains(ParallelSetup.WORKFLOW_DOCUMENT_2_B2_NODE));
assertTrue("Should be at WorkflowDocument4-B3", nodeNames.contains(ParallelSetup.WORKFLOW_DOCUMENT_4_B3_NODE));
// try to move the document from WorkflowDocument3-B1 to WorkflowDocument2-B1
document.move(MovePoint.create(ParallelSetup.WORKFLOW_DOCUMENT_3_B1_NODE, -1), "");
nodeNames = TestUtilities.createNodeInstanceNameSet(KEWServiceLocator.getRouteNodeService().getActiveNodeInstances(document.getDocumentId()));
assertEquals("There should be 3 active nodes.", 3, nodeNames.size());
assertTrue("Should be at WorkflowDocument2-B1", nodeNames.contains(ParallelSetup.WORKFLOW_DOCUMENT_2_B1_NODE));
assertTrue("Should be at WorkflowDocument2-B2", nodeNames.contains(ParallelSetup.WORKFLOW_DOCUMENT_2_B2_NODE));
assertTrue("Should be at WorkflowDocument4-B3", nodeNames.contains(ParallelSetup.WORKFLOW_DOCUMENT_4_B3_NODE));
}
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:MoveDocumentTest.java
示例4: initiateReconsiderWorkflowDocument
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的package包/类
protected boolean initiateReconsiderWorkflowDocument(String principalId, Integer dossierId, String dossierType, Collection<EdoReviewLayerDefinition> moveNodes) {
EdoDossierType dossierTypeObj = EdoServiceLocator.getEdoDossierTypeService().getEdoDossierTypeByName(dossierType);
Principal principal = KimApiServiceLocator.getIdentityService().getPrincipal(principalId);
boolean routed = false;
if (ObjectUtils.isNotNull(dossierTypeObj) && ObjectUtils.isNotNull(principal)) {
WorkflowDocument workflowDocument = createReconsiderWorkflowDocument(principalId, dossierId.toString(), dossierTypeObj.getDocumentTypeName(), moveNodes);
workflowDocument.setTitle("Reconsider Dossier - candidate: " + principal.getPrincipalName());
//Route the document.
//workflowDocument.move(MovePoint.create(SeqSetup.WORKFLOW_DOCUMENT_NODE, 1), "");
//authorizedNodes - this collection will always be of size one.
for(EdoReviewLayerDefinition moveNode : moveNodes) {
//workflowDocument.move(MovePoint.create(EdoConstants.ROUTING_NODE_NAMES.INITIATED, moveNode.getRouteLevel().intValue()), "");
//Initiated document has to be saved before its routed using the move command
//workflowDocument.saveDocument("");
workflowDocument.move(MovePoint.create(EdoConstants.ROUTING_NODE_NAMES.INITIATED, new Integer(moveNode.getRouteLevel())), "This document is routed/moved to" + moveNode.getNodeName());
}
//Update that we have finished the routing process.
routed = true;
}
return routed;
}
开发者ID:kuali-mirror,项目名称:kpme,代码行数:24,代码来源:EdoDossierServiceImpl.java
示例5: determineReturnNodeName
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的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);
}
开发者ID:kuali,项目名称:kc-rice,代码行数:14,代码来源:MoveDocumentAction.java
示例6: move
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的package包/类
@Override
public void move(MovePoint movePoint, String annotation) {
if (movePoint == null) {
throw new IllegalArgumentException("movePoint was null");
}
DocumentActionResult result = getWorkflowDocumentActionsService().move(
constructDocumentActionParameters(annotation), movePoint);
resetStateAfterAction(result);
}
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:WorkflowDocumentImpl.java
示例7: testMoveDocumentInsideProcess
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的package包/类
/**
* This tests that we can invoke the move document command inside of a sub process.
*/
@Test public void testMoveDocumentInsideProcess() throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("user1"), "MoveInProcessTest");
document.route("");
// approve as bmcgough and rkirkend to move into process
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("bmcgough"), document.getDocumentId());
assertTrue("bmcgough should have approve", document.isApprovalRequested());
document.approve("");
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId());
assertTrue("rkirkend should have approve", document.isApprovalRequested());
document.approve("");
WorkflowDocumentService workflowDocumentService = KewApiServiceLocator.getWorkflowDocumentService();
List<RouteNodeInstance> activeNodeInstances = workflowDocumentService.getActiveRouteNodeInstances(document.getDocumentId());
assertEquals("Should be 1 active node instance.", 1, activeNodeInstances.size());
RouteNodeInstance node2 = activeNodeInstances.get(0);
assertEquals("Should be at the WorkflowDocument2 node.", SeqSetup.WORKFLOW_DOCUMENT_2_NODE, node2.getName());
assertTrue("Node should be in a process.", node2.getProcessId() != null);
// now try to move the document forward one which will keep us inside the subprocess
document.move(MovePoint.create(SeqSetup.WORKFLOW_DOCUMENT_2_NODE, 1), "");
activeNodeInstances = workflowDocumentService.getActiveRouteNodeInstances(document.getDocumentId());
RouteNodeInstance node3 = activeNodeInstances.get(0);
assertEquals("Should be at the WorkflowDocument3 node.", SeqSetup.WORKFLOW_DOCUMENT_3_NODE, node3.getName());
assertTrue("Node should be in a process.", node3.getProcessId() != null);
assertEquals("Node 2 and 3 should be in the same process.", node2.getProcessId(), node3.getProcessId());
document.move(MovePoint.create(SeqSetup.WORKFLOW_DOCUMENT_3_NODE, 0), "");
document.move(MovePoint.create(SeqSetup.WORKFLOW_DOCUMENT_3_NODE, -1), "");
}
开发者ID:kuali,项目名称:kc-rice,代码行数:36,代码来源:MoveDocumentTest.java
示例8: move
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的package包/类
@Override
public void move(MovePoint movePoint, String annotation) {}
开发者ID:kuali,项目名称:kc-rice,代码行数:3,代码来源:MockWorkflowDocument.java
示例9: moveDocument
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的package包/类
public DocumentRouteHeaderValue moveDocument(String principalId, DocumentRouteHeaderValue routeHeader, MovePoint movePoint, String annotation) throws InvalidActionTakenException {
Principal principal = loadPrincipal(principalId);
MoveDocumentAction action = new MoveDocumentAction(routeHeader, principal, annotation, movePoint);
action.performAction();
return finish(routeHeader);
}
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:WorkflowDocumentServiceImpl.java
示例10: MoveDocumentAction
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的package包/类
public MoveDocumentAction(DocumentRouteHeaderValue routeHeader, PrincipalContract principal, String annotation, MovePoint movePoint) {
super(KewApiConstants.ACTION_TAKEN_MOVE_CD, routeHeader, principal, annotation);
this.movePoint = movePoint;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:5,代码来源:MoveDocumentAction.java
示例11: displayMovePoint
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的package包/类
private String displayMovePoint(MovePoint movePoint) {
return "fromNode="+movePoint.getStartNodeName()+", stepsToMove="+movePoint.getStepsToMove();
}
开发者ID:kuali,项目名称:kc-rice,代码行数:4,代码来源:MoveDocumentAction.java
示例12: testMoveDocumentSequential
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的package包/类
/**
* Tests that we can move a sequential document forward and backward.
*
*/
@Test public void testMoveDocumentSequential() throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("user1"), SeqSetup.DOCUMENT_TYPE_NAME);
document.route("");
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("bmcgough"), document.getDocumentId());
assertTrue("Bmcgough should have an approve.", document.isApprovalRequested());
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId());
assertTrue("Rkirkend should have an approve.", document.isApprovalRequested());
assertEquals("Should be at the WorkflowDocument Node.", SeqSetup.WORKFLOW_DOCUMENT_NODE, document.getNodeNames().iterator().next());
// move the document forward one node
document.move(MovePoint.create(SeqSetup.WORKFLOW_DOCUMENT_NODE, 1), "");
List actionRequests = KEWServiceLocator.getActionRequestService().findPendingByDoc(document.getDocumentId());
assertEquals("Should be only 1 pending approve request to pmckown.", 1, actionRequests.size());
assertEquals("Should be at the WorkflowDocument2 Node.", SeqSetup.WORKFLOW_DOCUMENT_2_NODE, document.getNodeNames().iterator().next());
// after moving the document forward, bmcgough and rkirkend should no longer have requests, but phil should
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("bmcgough"), document.getDocumentId());
assertFalse("Bmcgough should NOT have an approve.", document.isApprovalRequested());
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId());
assertFalse("Rkirkend should NOT have an approve.", document.isApprovalRequested());
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("pmckown"), document.getDocumentId());
assertTrue("Pmckown should have an approve.", document.isApprovalRequested());
ActionRequestValue pmckownRequest = (ActionRequestValue)actionRequests.get(0);
// now try moving it to itself, effectively refreshing the node
document.move(MovePoint.create(SeqSetup.WORKFLOW_DOCUMENT_2_NODE, 0), "");
assertTrue("Pmckown should still have an approve.", document.isApprovalRequested());
actionRequests = KEWServiceLocator.getActionRequestService().findPendingByDoc(document.getDocumentId());
assertEquals("Should be only 1 pending approve request to pmckown.", 1, actionRequests.size());
assertEquals("Should be at the WorkflowDocument2 Node.", SeqSetup.WORKFLOW_DOCUMENT_2_NODE, document.getNodeNames().iterator().next());
// since this should have invoked a refresh, let's ensure that the action request ids are different after the move
assertFalse("Action request ids should be different.", pmckownRequest.getActionRequestId().equals(((ActionRequestValue)actionRequests.get(0)).getActionRequestId()));
// now try moving it back
document.move(MovePoint.create(SeqSetup.WORKFLOW_DOCUMENT_2_NODE, -1), "");
// document should now be back at the WorkflowDocumentNode with requests to rkirkend and brian
actionRequests = KEWServiceLocator.getActionRequestService().findPendingByDoc(document.getDocumentId());
assertEquals("Should be 2 pending requests.", 2, actionRequests.size());
assertEquals("Should be at the WorkflowDocument Node.", SeqSetup.WORKFLOW_DOCUMENT_NODE, document.getNodeNames().iterator().next());
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("bmcgough"), document.getDocumentId());
assertTrue("Bmcgough should have an approve.", document.isApprovalRequested());
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId());
assertTrue("Rkirkend should have an approve.", document.isApprovalRequested());
// Let's do a sanity check to make sure we're still ENROUTE and move the doc to an ack node, rendering it PROCESSED,
// also, we'll check that there are no permissions enforced on the move document action by moving as a random user
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("xqi"), document.getDocumentId());
assertTrue("Doc should be ENROUTE.", document.isEnroute());
document.move(MovePoint.create(SeqSetup.WORKFLOW_DOCUMENT_NODE, 2), "");
assertTrue("Doc should be PROCESSED.", document.isProcessed());
}
开发者ID:kuali,项目名称:kc-rice,代码行数:63,代码来源:MoveDocumentTest.java
示例13: move
import org.kuali.rice.kew.api.action.MovePoint; //导入依赖的package包/类
/**
* @see org.kuali.rice.kew.api.WorkflowDocument#move(org.kuali.rice.kew.api.action.MovePoint, java.lang.String)
*/
@Override
public void move(MovePoint movePoint, String annotation) {
// TODO Auto-generated method stub
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:9,代码来源:MockWorkflowDocument.java
注:本文中的org.kuali.rice.kew.api.action.MovePoint类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论