Class TasksImpl
- java.lang.Object
-
- org.alfresco.rest.workflow.api.impl.WorkflowRestImpl
-
- org.alfresco.rest.workflow.api.impl.TasksImpl
-
- All Implemented Interfaces:
Tasks
public class TasksImpl extends WorkflowRestImpl implements Tasks
-
-
Field Summary
-
Fields inherited from class org.alfresco.rest.workflow.api.impl.WorkflowRestImpl
activitiProcessEngine, authorityService, BPM_PACKAGE, deployWorkflowsInTenant, dictionaryService, excludeModelTypes, namespaceService, nodeService, tenantService
-
-
Constructor Summary
Constructors Constructor Description TasksImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addVariables(Task task, Boolean includeProcessVariables, Boolean includeTaskVariables, Map<String,Object> processVariables, Map<String,Object> taskVariables, Map<String,TypeDefinition> definitionTypeMap)
protected Object
convertAssociationDefinitionValue(AssociationDefinition associationDef, String variableName, Object variableValue)
protected TaskVariable
convertToTypedVariable(TaskVariable taskVariable, org.activiti.engine.task.Task taskInstance)
Item
createItem(String taskId, Item item)
void
deleteItem(String taskId, String itemId)
void
deleteTaskVariable(String taskId, String variableName)
protected String
getFormResourceKey(org.activiti.engine.task.Task task)
Item
getItem(String taskId, String itemId)
CollectionWithPagingInfo<Item>
getItems(String taskId, Paging paging)
protected NodeRef
getPersonNodeRef(String name)
protected WorkflowQNameConverter
getQNameConverter()
Task
getTask(String taskId)
CollectionWithPagingInfo<TaskCandidate>
getTaskCandidates(String taskId, Paging paging)
CollectionWithPagingInfo<FormModelElement>
getTaskFormModel(String taskId, Paging paging)
CollectionWithPagingInfo<Task>
getTasks(String processId, Parameters parameters)
CollectionWithPagingInfo<Task>
getTasks(Parameters parameters)
CollectionWithPagingInfo<TaskVariable>
getTaskVariables(String taskId, Paging paging, VariableScope scope)
int
getTaskVariablesLimit()
protected org.activiti.engine.history.HistoricTaskInstance
getValidHistoricTask(String taskId)
Get a validHistoricTaskInstance
based on the given task id.protected org.activiti.engine.task.Task
getValidTask(String taskId)
Get a validTask
based on the given task id.protected WorkflowObjectFactory
getWorkflowFactory()
void
setMessageService(MessageService messageService)
void
setPersonService(PersonService personService)
void
setPropertyConverter(ActivitiPropertyConverter propertyConverter)
void
setRestVariableHelper(RestVariableHelper restVariableHelper)
protected void
setSorting(org.activiti.engine.history.HistoricTaskInstanceQuery query, SortColumn sortColumn)
protected void
setSorting(org.activiti.engine.task.TaskQuery query, SortColumn sortColumn)
void
setTaskVariablesLimit(int taskVariablesLimit)
Task
update(String taskId, Task task, Parameters parameters)
protected boolean
updateTaskProperties(List<String> selectedProperties, Task task, org.activiti.engine.task.Task taskInstance)
TaskVariable
updateTaskVariable(String taskId, TaskVariable taskVariable)
List<TaskVariable>
updateTaskVariables(String taskId, List<TaskVariable> variables)
protected TaskVariable
updateVariableInTask(org.activiti.engine.task.Task taskInstance, TaskVariable taskVariable)
-
Methods inherited from class org.alfresco.rest.workflow.api.impl.WorkflowRestImpl
createItemForNodeRef, createItemInProcess, deleteItemFromProcess, getFormModelElements, getItemFromProcess, getItemsFromProcess, getNodeRef, getParameter, getTypesToExclude, setActivitiProcessEngine, setActivitiWorkflowEngine, setAuthorityService, setDeployWorkflowsInTenant, setDictionaryService, setNamespaceService, setNodeService, setTenantService, validateIfUserAllowedToWorkWithProcess
-
-
-
-
Method Detail
-
setPropertyConverter
public void setPropertyConverter(ActivitiPropertyConverter propertyConverter)
-
setRestVariableHelper
public void setRestVariableHelper(RestVariableHelper restVariableHelper)
-
setMessageService
public void setMessageService(MessageService messageService)
-
setPersonService
public void setPersonService(PersonService personService)
-
getTaskVariablesLimit
public int getTaskVariablesLimit()
-
setTaskVariablesLimit
public void setTaskVariablesLimit(int taskVariablesLimit)
-
getTasks
public CollectionWithPagingInfo<Task> getTasks(Parameters parameters)
-
addVariables
protected void addVariables(Task task, Boolean includeProcessVariables, Boolean includeTaskVariables, Map<String,Object> processVariables, Map<String,Object> taskVariables, Map<String,TypeDefinition> definitionTypeMap)
-
getTasks
public CollectionWithPagingInfo<Task> getTasks(String processId, Parameters parameters)
-
update
public Task update(String taskId, Task task, Parameters parameters)
-
getTaskFormModel
public CollectionWithPagingInfo<FormModelElement> getTaskFormModel(String taskId, Paging paging)
- Specified by:
getTaskFormModel
in interfaceTasks
-
getTaskVariables
public CollectionWithPagingInfo<TaskVariable> getTaskVariables(String taskId, Paging paging, VariableScope scope)
- Specified by:
getTaskVariables
in interfaceTasks
-
updateTaskVariable
public TaskVariable updateTaskVariable(String taskId, TaskVariable taskVariable)
- Specified by:
updateTaskVariable
in interfaceTasks
-
updateTaskVariables
public List<TaskVariable> updateTaskVariables(String taskId, List<TaskVariable> variables)
- Specified by:
updateTaskVariables
in interfaceTasks
-
updateVariableInTask
protected TaskVariable updateVariableInTask(org.activiti.engine.task.Task taskInstance, TaskVariable taskVariable)
-
convertToTypedVariable
protected TaskVariable convertToTypedVariable(TaskVariable taskVariable, org.activiti.engine.task.Task taskInstance)
-
deleteTaskVariable
public void deleteTaskVariable(String taskId, String variableName)
- Specified by:
deleteTaskVariable
in interfaceTasks
-
getTaskCandidates
public CollectionWithPagingInfo<TaskCandidate> getTaskCandidates(String taskId, Paging paging)
- Specified by:
getTaskCandidates
in interfaceTasks
-
createItem
public Item createItem(String taskId, Item item)
- Specified by:
createItem
in interfaceTasks
-
deleteItem
public void deleteItem(String taskId, String itemId)
- Specified by:
deleteItem
in interfaceTasks
-
getItems
public CollectionWithPagingInfo<Item> getItems(String taskId, Paging paging)
-
getFormResourceKey
protected String getFormResourceKey(org.activiti.engine.task.Task task)
-
updateTaskProperties
protected boolean updateTaskProperties(List<String> selectedProperties, Task task, org.activiti.engine.task.Task taskInstance)
- Returns:
- true, if at least one task property has been changed based on the given parameters.
-
getValidHistoricTask
protected org.activiti.engine.history.HistoricTaskInstance getValidHistoricTask(String taskId)
Get a validHistoricTaskInstance
based on the given task id. Checks if current logged in user is assignee/owner/involved with the task. In case true was passed for "validIfClaimable", the task is also valid if the current logged in user is a candidate for claiming the task.- Throws:
EntityNotFoundException
- when the task was not foundPermissionDeniedException
- when the current logged in user isn't allowed to access task.
-
getValidTask
protected org.activiti.engine.task.Task getValidTask(String taskId)
Get a validTask
based on the given task id. Checks if current logged in user is assignee/owner/involved with the task. In case true was passed for "validIfClaimable", the task is also valid if the current logged in user is a candidate for claiming the task.- Throws:
EntityNotFoundException
- when the task was not foundPermissionDeniedException
- when the current logged in user isn't allowed to access task.
-
setSorting
protected void setSorting(org.activiti.engine.task.TaskQuery query, SortColumn sortColumn)
-
setSorting
protected void setSorting(org.activiti.engine.history.HistoricTaskInstanceQuery query, SortColumn sortColumn)
-
convertAssociationDefinitionValue
protected Object convertAssociationDefinitionValue(AssociationDefinition associationDef, String variableName, Object variableValue)
-
getQNameConverter
protected WorkflowQNameConverter getQNameConverter()
-
getWorkflowFactory
protected WorkflowObjectFactory getWorkflowFactory()
-
-