1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.server;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.junit.Ignore;
22 import org.kuali.rice.kew.engine.RouteContext;
23 import org.kuali.rice.kew.engine.RouteHelper;
24 import org.kuali.rice.kew.engine.node.SimpleSplitNode;
25 import org.kuali.rice.kew.engine.node.SplitResult;
26
27
28
29
30
31
32
33 @Ignore
34 public class TestSplitNode extends SimpleSplitNode {
35
36 private static boolean leftBranch = true;
37 private static boolean rightBranch = true;
38
39 @Override
40 public SplitResult process(RouteContext routeContext,
41 RouteHelper routeHelper) throws Exception {
42 return new SplitResult(getBranchNames());
43 }
44
45 public List<String> getBranchNames() {
46 List<String> branchNames = new ArrayList<String>();
47 if (isLeftBranch()) {
48 branchNames.add("Left");
49 }
50 if (isRightBranch()) {
51 branchNames.add("Right");
52 }
53 return branchNames;
54 }
55 public static void setLeftBranch(boolean leftBranch) {
56 TestSplitNode.leftBranch = leftBranch;
57 }
58 public static boolean isLeftBranch() {
59 return TestSplitNode.leftBranch;
60 }
61 public static void setRightBranch(boolean rightBranch) {
62 TestSplitNode.rightBranch = rightBranch;
63 }
64 public static boolean isRightBranch() {
65 return TestSplitNode.rightBranch;
66 }
67 }