1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.actions; |
17 | |
|
18 | |
import org.kuali.rice.kew.api.exception.InvalidActionTakenException; |
19 | |
import org.kuali.rice.kew.api.exception.WorkflowException; |
20 | |
import org.kuali.rice.kew.routeheader.DocumentRouteHeaderValue; |
21 | |
import org.kuali.rice.kew.api.KewApiConstants; |
22 | |
import org.kuali.rice.kim.api.identity.principal.PrincipalContract; |
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
public class SuperUserReturnToPreviousNodeAction extends SuperUserActionTakenEvent { |
32 | |
|
33 | |
private String nodeName; |
34 | |
|
35 | |
public SuperUserReturnToPreviousNodeAction(DocumentRouteHeaderValue routeHeader, PrincipalContract principal) { |
36 | 0 | super(KewApiConstants.ACTION_TAKEN_SU_RETURNED_TO_PREVIOUS_CD, routeHeader, principal); |
37 | 0 | this.superUserAction = KewApiConstants.SUPER_USER_RETURN_TO_PREVIOUS_ROUTE_LEVEL; |
38 | 0 | } |
39 | |
|
40 | |
public SuperUserReturnToPreviousNodeAction(DocumentRouteHeaderValue routeHeader, PrincipalContract principal, String annotation, boolean runPostProcessor, String nodeName) { |
41 | 0 | super(KewApiConstants.ACTION_TAKEN_SU_RETURNED_TO_PREVIOUS_CD, routeHeader, principal, annotation, runPostProcessor); |
42 | 0 | this.superUserAction = KewApiConstants.SUPER_USER_RETURN_TO_PREVIOUS_ROUTE_LEVEL; |
43 | 0 | this.nodeName = nodeName; |
44 | 0 | } |
45 | |
|
46 | |
protected void markDocument() throws WorkflowException { |
47 | 0 | if (getRouteHeader().isInException()) { |
48 | |
|
49 | 0 | getRouteHeader().markDocumentEnroute(); |
50 | |
} |
51 | 0 | ReturnToPreviousNodeAction returnAction = new ReturnToPreviousNodeAction(this.getActionTakenCode(), getRouteHeader(), getPrincipal(), annotation, nodeName, true, isRunPostProcessorLogic()); |
52 | 0 | returnAction.setSuperUserUsage(true); |
53 | 0 | returnAction.performAction(); |
54 | 0 | } |
55 | |
|
56 | |
protected void processActionRequests() throws InvalidActionTakenException { |
57 | |
|
58 | 0 | } |
59 | |
|
60 | |
} |