1
14
15 package com.liferay.portal.kernel.workflow;
16
17 import com.liferay.portal.kernel.util.OrderByComparator;
18
19 import java.io.Serializable;
20
21 import java.util.List;
22 import java.util.Map;
23
24
31 public class WorkflowInstanceManagerUtil {
32
33 public static void deleteWorkflowInstance(
34 long companyId, long workflowInstanceId)
35 throws WorkflowException {
36
37 _workflowInstanceManager.deleteWorkflowInstance(
38 companyId, workflowInstanceId);
39 }
40
41 public static List<String> getNextTransitionNames(
42 long companyId, long userId, long workflowInstanceId)
43 throws WorkflowException {
44
45 return _workflowInstanceManager.getNextTransitionNames(
46 companyId, userId, workflowInstanceId);
47 }
48
49 public static WorkflowInstance getWorkflowInstance(
50 long companyId, long workflowInstanceId)
51 throws WorkflowException {
52
53 return _workflowInstanceManager.getWorkflowInstance(
54 companyId, workflowInstanceId);
55 }
56
57 public static int getWorkflowInstanceCount(
58 long companyId, String workflowDefinitionName,
59 Integer workflowDefinitionVersion, Boolean completed)
60 throws WorkflowException {
61
62 return _workflowInstanceManager.getWorkflowInstanceCount(
63 companyId, workflowDefinitionName, workflowDefinitionVersion,
64 completed);
65 }
66
67 public static WorkflowInstanceManager getWorkflowInstanceManager() {
68 return _workflowInstanceManager;
69 }
70
71 public static List<WorkflowInstance> getWorkflowInstances(
72 long companyId, String workflowDefinitionName,
73 Integer workflowDefinitionVersion, Boolean completed, int start,
74 int end, OrderByComparator orderByComparator)
75 throws WorkflowException {
76
77 return _workflowInstanceManager.getWorkflowInstances(
78 companyId, workflowDefinitionName,
79 workflowDefinitionVersion, completed, start,
80 end, orderByComparator);
81 }
82
83 public static WorkflowInstance signalWorkflowInstance(
84 long companyId, long userId, long workflowInstanceId,
85 String transitionName, Map<String, Serializable> workflowContext)
86 throws WorkflowException {
87
88 return _workflowInstanceManager.signalWorkflowInstance(
89 companyId, userId, workflowInstanceId, transitionName,
90 workflowContext);
91 }
92
93 public static WorkflowInstance startWorkflowInstance(
94 long companyId, long groupId, long userId,
95 String workflowDefinitionName, Integer workflowDefinitionVersion,
96 String transitionName, Map<String, Serializable> workflowContext)
97 throws WorkflowException {
98
99 return _workflowInstanceManager.startWorkflowInstance(
100 companyId, groupId, userId, workflowDefinitionName,
101 workflowDefinitionVersion, transitionName, workflowContext);
102 }
103
104 public static WorkflowInstance updateWorkflowContext(
105 long companyId, long workflowInstanceId,
106 Map<String, Serializable> workflowContext)
107 throws WorkflowException {
108
109 return _workflowInstanceManager.updateWorkflowContext(
110 companyId, workflowInstanceId, workflowContext);
111 }
112
113 public void setWorkflowInstanceManager(
114 WorkflowInstanceManager workflowInstanceManager) {
115
116 _workflowInstanceManager = workflowInstanceManager;
117 }
118
119 private static WorkflowInstanceManager _workflowInstanceManager;
120
121 }