001
014
015 package com.liferay.portal.kernel.workflow;
016
017 import com.liferay.portal.kernel.messaging.proxy.MessagingProxy;
018 import com.liferay.portal.kernel.messaging.proxy.ProxyMode;
019 import com.liferay.portal.kernel.util.OrderByComparator;
020
021 import java.io.Serializable;
022
023 import java.util.List;
024 import java.util.Map;
025
026
031 @MessagingProxy(mode = ProxyMode.SYNC)
032 public interface WorkflowInstanceManager {
033
034 public void deleteWorkflowInstance(long companyId, long workflowInstanceId)
035 throws WorkflowException;
036
037 public List<String> getNextTransitionNames(
038 long companyId, long userId, long workflowInstanceId)
039 throws WorkflowException;
040
041 public WorkflowInstance getWorkflowInstance(
042 long companyId, long workflowInstanceId)
043 throws WorkflowException;
044
045 public int getWorkflowInstanceCount(
046 long companyId, Long userId, String assetClassName,
047 Long assetClassPK, Boolean completed)
048 throws WorkflowException;
049
050 public int getWorkflowInstanceCount(
051 long companyId, String workflowDefinitionName,
052 Integer workflowDefinitionVersion, Boolean completed)
053 throws WorkflowException;
054
055 public List<WorkflowInstance> getWorkflowInstances(
056 long companyId, Long userId, String assetClassName,
057 Long assetClassPK, Boolean completed, int start,
058 int end, OrderByComparator orderByComparator)
059 throws WorkflowException;
060
061 public List<WorkflowInstance> getWorkflowInstances(
062 long companyId, String workflowDefinitionName,
063 Integer workflowDefinitionVersion, Boolean completed, int start,
064 int end, OrderByComparator orderByComparator)
065 throws WorkflowException;
066
067 public WorkflowInstance signalWorkflowInstance(
068 long companyId, long userId, long workflowInstanceId,
069 String transitionName, Map<String, Serializable> workflowContext)
070 throws WorkflowException;
071
072 public WorkflowInstance startWorkflowInstance(
073 long companyId, long groupId, long userId,
074 String workflowDefinitionName, Integer workflowDefinitionVersion,
075 String transitionName, Map<String, Serializable> workflowContext)
076 throws WorkflowException;
077
078 public WorkflowInstance updateWorkflowContext(
079 long companyId, long workflowInstanceId,
080 Map<String, Serializable> workflowContext)
081 throws WorkflowException;
082
083 }