Package org.alfresco.repo.workflow
Class WorkflowServiceImpl
java.lang.Object
org.alfresco.repo.workflow.WorkflowServiceImpl
- All Implemented Interfaces:
WorkflowService
Default Alfresco Workflow Service whose implementation is backed by registered BPM Engine plug-in components.
- Author:
- davidc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncancelWorkflow(String workflowId) Cancel an "in-flight" Workflow instancecancelWorkflows(List<String> workflowIds) Cancel a batch of "in-flight" Workflow instancesvoidcheckDeploymentCategory(String engineId, InputStream workflowDefinition) Checks if the deployment for supplied workflow definition has the proper categorylongcountTasks(WorkflowTaskQuery workflowTaskQuery) Get the number of tasks matching the given querylongcountWorkflows(WorkflowInstanceQuery workflowInstanceQuery) Get count of workflow instancescreatePackage(NodeRef container) Create a Workflow Package (a container of content to route through the Workflow).deleteWorkflow(String workflowId) Delete a Workflow instance.deployDefinition(String engineId, InputStream workflowDefinition, String mimetype) Deploy a Workflow Definition to the Alfresco RepositorydeployDefinition(String engineId, InputStream workflowDefinition, String mimetype, String name) Deploy a Workflow Definition to the Alfresco RepositorydeployDefinition(String engineId, InputStream workflowDefinition, String mimetype, String name, boolean fullAccess) Deploy a Workflow Definition to the Alfresco RepositorydeployDefinition(NodeRef definitionContent) Deploy a Workflow Definition to the Alfresco Repository Note: The specified content object must be of type bpm:workflowdefinition.End the Task (i.e. complete the task)Fire custom event against specified pathGets all active workflow instances.getActiveWorkflows(String workflowDefinitionId) Gets all active workflow instances of the specified Workflow DefinitionGets all deployed Workflow Definitions (with all previous versions)getAllDefinitionsByName(String workflowName) Gets all (including previous) Workflow Definitions for the given unique namegetAssignedTasks(String authority, WorkflowTaskState state) Gets all tasks assigned to the specified authoritygetAssignedTasks(String authority, WorkflowTaskState state, boolean lazyInitialization) Gets all tasks assigned to the specified authorityGets all completed workflow instances.getCompletedWorkflows(String workflowDefinitionId) Gets all completed workflow instances of the specified Workflow DefinitiongetDefinitionById(String workflowDefinitionId) Gets a Workflow Definition by unique IdgetDefinitionByName(String workflowName) Gets the latest Workflow Definition by unique namebyte[]getDefinitionImage(String workflowDefinitionId) Gets a graphical view of the Workflow DefinitionGets latest deployed Workflow DefinitionsgetPackageContents(String taskId) Get a list of node refs to all the package contents for the given task id.getPackageContents(NodeRef packageRef) Get a list of node refs to all the package contents.getPathProperties(String pathId) Gets the properties associated with the specified path (and parent paths)getPooledTasks(String authority) Gets the pooled tasks available to the specified authoritygetPooledTasks(String authority, boolean lazyinitialization) Gets the pooled tasks available to the specified authoritygetStartTask(String workflowInstanceId) Gets the start task instance for the given workflow instance.getStartTasks(List<String> workflowInstanceIds, boolean sameSession) Gets the start task instances for the given workflow instances.getTaskById(String taskId) Gets a Task by unique IdgetTaskDefinitions(String workflowDefinitionId) Gets the Task Definitions for the given Workflow DefinitiongetTasksForWorkflowPath(String pathId) Gets all Tasks associated with the specified pathGets all active timers for the specified workflowgetWorkflowById(String workflowId) Gets a specific workflow instancesgetWorkflowImage(String workflowInstanceId) Gets a graphical view of the workflow instancegetWorkflowPaths(String workflowId) Gets all Paths for the specified Workflow instance.Gets all workflow instances (both active and completed).getWorkflows(String workflowDefinitionId) Gets all workflow instances (both active and completed) of the specified Workflow DefinitiongetWorkflows(WorkflowInstanceQuery workflowInstanceQuery) Gets all "in-flight" workflow instances according to the specified workflowInstanceQuery parametergetWorkflows(WorkflowInstanceQuery workflowInstanceQuery, int maxItems, int skipCount) Gets maxItems "in-flight" workflow instances according to the specified workflowInstanceQuery parameter Get maxItems and skipCount parameters form requestgetWorkflowsForContent(NodeRef packageItem, boolean active) Gets the Workflows that act upon the specified Repository content.booleanhasWorkflowImage(String workflowInstanceId) Determines if a graphical view of the workflow instance existsbooleanisDefinitionDeployed(String engineId, InputStream workflowDefinition, String mimetype) Is the specified Workflow Definition already deployed?booleanisDefinitionDeployed(NodeRef workflowDefinition) Is the specified Workflow Definition already deployed?booleanbooleanisTaskClaimable(WorkflowTask task, String username) Determines if the given user can claim the given taskbooleanisTaskClaimable(WorkflowTask task, String username, boolean refreshTask) Determines if the given user can claim the given taskbooleanisTaskEditable(WorkflowTask task, String username) Determines if the given user can edit the given taskbooleanisTaskEditable(WorkflowTask task, String username, boolean refreshTask) Determines if the given user can edit the given taskbooleanisTaskReassignable(WorkflowTask task, String username) Determines if the given user can reassign the given taskbooleanisTaskReassignable(WorkflowTask task, String username, boolean refreshTask) Determines if the given user can reassign the given taskbooleanisTaskReleasable(WorkflowTask task, String username) Determines if the given user can release the given taskbooleanisTaskReleasable(WorkflowTask task, String username, boolean refreshTask) Determines if the given user can release the given taskqueryTasks(WorkflowTaskQuery query) queryTasks(WorkflowTaskQuery query, boolean sameSession) Query for tasksvoidsetAuthorityService(AuthorityService authorityService) Sets the Authority ServicevoidsetBPMEngineRegistry(BPMEngineRegistry registry) Sets the BPM Engine RegistryvoidsetContentService(ContentService contentService) Sets the Content ServicevoidsetDictionaryService(DictionaryService dictionaryService) Set the dictionary servicevoidsetMaxAuthoritiesForPooledTasks(int maxAuthoritiesForPooledTasks) Sets the maximum number of groups to check for pooled tasks.voidsetMaxPooledTasks(int maxPooledTasks) Sets the maximum number of pooled tasks to return in a query.voidsetMultiTenantWorkflowDeploymentEnabled(boolean deployWorkflowsInTenant) voidsetNodeService(NodeService nodeService) Sets the Node ServicevoidsetProtectedNodeService(NodeService protectedNodeService) Set the node service which applies permissionsvoidsetTransactionService(TransactionService transactionService) voidsetWorkflowAdminService(WorkflowAdminService workflowAdminService) voidSet the workflow notification utilsvoidsetWorkflowPackageComponent(WorkflowPackageComponent workflowPackageComponent) Sets the Workflow Package ComponentSignal the transition from one Workflow Node to anotherstartWorkflow(String workflowDefinitionId, Map<QName, Serializable> parameters) Start a Workflow InstancestartWorkflowFromTemplate(NodeRef templateDefinition) Start a Workflow Instance from an existing "Start Task" template node held in the Repository.voidundeployDefinition(String workflowDefinitionId) Undeploy an exisiting Workflow Definition TODO: Determine behaviour when "in-flight" workflow instances existupdateTask(String taskId, Map<QName, Serializable> properties, Map<QName, List<NodeRef>> add, Map<QName, List<NodeRef>> remove) Update the Properties and Associations of a Task
-
Constructor Details
-
WorkflowServiceImpl
public WorkflowServiceImpl()
-
-
Method Details
-
setTransactionService
- Parameters:
transactionService- service that tells if the server is read-only or not
-
setAuthorityService
Sets the Authority Service- Parameters:
authorityService- AuthorityService
-
setBPMEngineRegistry
Sets the BPM Engine Registry- Parameters:
registry- bpm engine registry
-
setWorkflowAdminService
- Parameters:
workflowAdminService- the workflowAdminService to set
-
setWorkflowPackageComponent
Sets the Workflow Package Component- Parameters:
workflowPackageComponent- workflow package component
-
setNodeService
Sets the Node Service- Parameters:
nodeService- NodeService
-
setContentService
Sets the Content Service- Parameters:
contentService- ContentService
-
setDictionaryService
Set the dictionary service- Parameters:
dictionaryService- DictionaryService
-
setProtectedNodeService
Set the node service which applies permissions- Parameters:
protectedNodeService- NodeService
-
setWorkflowNotification
Set the workflow notification utils- Parameters:
service- workflow notification utils
-
setMaxAuthoritiesForPooledTasks
public void setMaxAuthoritiesForPooledTasks(int maxAuthoritiesForPooledTasks) Sets the maximum number of groups to check for pooled tasks. For performance reasons, this is limited to 100 by default.- Parameters:
maxAuthoritiesForPooledTasks- the limit to set. If this is less than or equal to zero then there is no limit.
-
setMaxPooledTasks
public void setMaxPooledTasks(int maxPooledTasks) Sets the maximum number of pooled tasks to return in a query. It may be necessary to limit this depending on UI limitations.- Parameters:
maxPooledTasks- the limit to set. If this is less than or equal to zero then there is no limit.
-
deployDefinition
public WorkflowDeployment deployDefinition(String engineId, InputStream workflowDefinition, String mimetype) Description copied from interface:WorkflowServiceDeploy a Workflow Definition to the Alfresco Repository- Specified by:
deployDefinitionin interfaceWorkflowService- Parameters:
engineId- the bpm engine idworkflowDefinition- the workflow definitionmimetype- the mimetype of the workflow definition- Returns:
- workflow deployment descriptor
-
deployDefinition
public WorkflowDeployment deployDefinition(String engineId, InputStream workflowDefinition, String mimetype, String name) Description copied from interface:WorkflowServiceDeploy a Workflow Definition to the Alfresco Repository- Specified by:
deployDefinitionin interfaceWorkflowService- Parameters:
engineId- the bpm engine idworkflowDefinition- the workflow definitionmimetype- the mimetype of the workflow definitionname- a name representing the deployment- Returns:
- workflow deployment descriptor
-
deployDefinition
public WorkflowDeployment deployDefinition(String engineId, InputStream workflowDefinition, String mimetype, String name, boolean fullAccess) Description copied from interface:WorkflowServiceDeploy a Workflow Definition to the Alfresco Repository- Specified by:
deployDefinitionin interfaceWorkflowService- Parameters:
engineId- the bpm engine idworkflowDefinition- the workflow definitionmimetype- the mimetype of the workflow definitionname- a name representing the deployment- Returns:
- workflow deployment descriptor
-
isDefinitionDeployed
Description copied from interface:WorkflowServiceIs the specified Workflow Definition already deployed? Note: the notion of "already deployed" may differ between bpm engines. For example, different versions of the same process may be considered equal.- Specified by:
isDefinitionDeployedin interfaceWorkflowService- Parameters:
workflowDefinition- the content object containing the definition- Returns:
- true => already deployed
-
isDefinitionDeployed
public boolean isDefinitionDeployed(String engineId, InputStream workflowDefinition, String mimetype) Description copied from interface:WorkflowServiceIs the specified Workflow Definition already deployed? Note: the notion of "already deployed" may differ between bpm engines. For example, different versions of the same process may be considered equal.- Specified by:
isDefinitionDeployedin interfaceWorkflowService- Parameters:
engineId- the bpm engine idworkflowDefinition- the definition to checkmimetype- the mimetype of the definition- Returns:
- true => already deployed
-
checkDeploymentCategory
Description copied from interface:WorkflowServiceChecks if the deployment for supplied workflow definition has the proper category- Specified by:
checkDeploymentCategoryin interfaceWorkflowService- Parameters:
engineId- the bpm engine idworkflowDefinition- the definition to check
-
deployDefinition
Description copied from interface:WorkflowServiceDeploy a Workflow Definition to the Alfresco Repository Note: The specified content object must be of type bpm:workflowdefinition. This type describes for which BPM engine the definition is appropriate.- Specified by:
deployDefinitionin interfaceWorkflowService- Parameters:
definitionContent- the content object containing the definition- Returns:
- workflow deployment descriptor
-
undeployDefinition
Description copied from interface:WorkflowServiceUndeploy an exisiting Workflow Definition TODO: Determine behaviour when "in-flight" workflow instances exist- Specified by:
undeployDefinitionin interfaceWorkflowService- Parameters:
workflowDefinitionId- the id of the definition to undeploy
-
getDefinitions
Description copied from interface:WorkflowServiceGets latest deployed Workflow Definitions- Specified by:
getDefinitionsin interfaceWorkflowService- Returns:
- the latest deployed workflow definitions
-
getAllDefinitions
Description copied from interface:WorkflowServiceGets all deployed Workflow Definitions (with all previous versions)- Specified by:
getAllDefinitionsin interfaceWorkflowService- Returns:
- the deployed (and previous) workflow definitions
-
getDefinitionById
Description copied from interface:WorkflowServiceGets a Workflow Definition by unique Id- Specified by:
getDefinitionByIdin interfaceWorkflowService- Parameters:
workflowDefinitionId- the workflow definition id- Returns:
- the deployed workflow definition (or null if not found)
-
getDefinitionByName
Description copied from interface:WorkflowServiceGets the latest Workflow Definition by unique name- Specified by:
getDefinitionByNamein interfaceWorkflowService- Parameters:
workflowName- workflow name e.g. activiti$activitiReview- Returns:
- the deployed workflow definition (or null if not found)
-
getAllDefinitionsByName
Description copied from interface:WorkflowServiceGets all (including previous) Workflow Definitions for the given unique name- Specified by:
getAllDefinitionsByNamein interfaceWorkflowService- Parameters:
workflowName- workflow name e.g. activiti$activitiReview- Returns:
- the deployed workflow definition (or null if not found)
-
getDefinitionImage
Description copied from interface:WorkflowServiceGets a graphical view of the Workflow Definition- Specified by:
getDefinitionImagein interfaceWorkflowService- Parameters:
workflowDefinitionId- the workflow definition id- Returns:
- image view of the workflow definition
-
getTaskDefinitions
Description copied from interface:WorkflowServiceGets the Task Definitions for the given Workflow Definition- Specified by:
getTaskDefinitionsin interfaceWorkflowService- Parameters:
workflowDefinitionId- the workflow definition id- Returns:
- the deployed task definitions (or null if not found)
-
startWorkflow
Description copied from interface:WorkflowServiceStart a Workflow Instance- Specified by:
startWorkflowin interfaceWorkflowService- Parameters:
workflowDefinitionId- the workflow definition idparameters- the initial set of parameters used to populate the "Start Task" properties- Returns:
- the initial workflow path
-
startWorkflowFromTemplate
Description copied from interface:WorkflowServiceStart a Workflow Instance from an existing "Start Task" template node held in the Repository. The node must be of the Type as described in the Workflow Definition.- Specified by:
startWorkflowFromTemplatein interfaceWorkflowService- Parameters:
templateDefinition- the node representing the Start Task properties- Returns:
- the initial workflow path
-
getActiveWorkflows
Gets all active workflow instances of the specified Workflow Definition- Specified by:
getActiveWorkflowsin interfaceWorkflowService- Parameters:
workflowDefinitionId- the workflow definition id- Returns:
- the list of "in-flight" workflow instances
-
getCompletedWorkflows
Gets all completed workflow instances of the specified Workflow Definition- Specified by:
getCompletedWorkflowsin interfaceWorkflowService- Parameters:
workflowDefinitionId- the workflow definition id- Returns:
- the list of "in-flight" workflow instances
-
getWorkflows
Gets all workflow instances (both active and completed) of the specified Workflow Definition- Specified by:
getWorkflowsin interfaceWorkflowService- Parameters:
workflowDefinitionId- the workflow definition id- Returns:
- the list of "in-flight" workflow instances
-
getWorkflows
Description copied from interface:WorkflowServiceGets all "in-flight" workflow instances according to the specified workflowInstanceQuery parameter- Specified by:
getWorkflowsin interfaceWorkflowService- Parameters:
workflowInstanceQuery- WorkflowInstanceQuery
-
getWorkflows
public List<WorkflowInstance> getWorkflows(WorkflowInstanceQuery workflowInstanceQuery, int maxItems, int skipCount) Description copied from interface:WorkflowServiceGets maxItems "in-flight" workflow instances according to the specified workflowInstanceQuery parameter Get maxItems and skipCount parameters form request- Specified by:
getWorkflowsin interfaceWorkflowService- Parameters:
workflowInstanceQuery- WorkflowInstanceQuerymaxItems- intskipCount- int- Returns:
- maxItems workflow instances
-
countWorkflows
Description copied from interface:WorkflowServiceGet count of workflow instances- Specified by:
countWorkflowsin interfaceWorkflowService- Parameters:
workflowInstanceQuery- WorkflowInstanceQuery- Returns:
- count of workflow instances
-
countTasks
Description copied from interface:WorkflowServiceGet the number of tasks matching the given query- Specified by:
countTasksin interfaceWorkflowService- Parameters:
workflowTaskQuery- the filter by which tasks are queried- Returns:
- count of matching tasks
-
getActiveWorkflows
Gets all active workflow instances.- Specified by:
getActiveWorkflowsin interfaceWorkflowService- Returns:
- the list of "in-flight" workflow instances
-
getCompletedWorkflows
Gets all completed workflow instances.- Specified by:
getCompletedWorkflowsin interfaceWorkflowService- Returns:
- the list of "in-flight" workflow instances
-
getWorkflows
Gets all workflow instances (both active and completed).- Specified by:
getWorkflowsin interfaceWorkflowService- Returns:
- the list of "in-flight" workflow instances
-
getWorkflowById
Gets a specific workflow instances- Specified by:
getWorkflowByIdin interfaceWorkflowService- Parameters:
workflowId- the id of the workflow to retrieve- Returns:
- the workflow instance (or null if not found)
-
getWorkflowPaths
Description copied from interface:WorkflowServiceGets all Paths for the specified Workflow instance. NOTE: It only returns information for an active Workflow instance.- Specified by:
getWorkflowPathsin interfaceWorkflowService- Parameters:
workflowId- workflow instance id- Returns:
- the list of workflow paths
-
getPathProperties
Description copied from interface:WorkflowServiceGets the properties associated with the specified path (and parent paths)- Specified by:
getPathPropertiesin interfaceWorkflowService- Parameters:
pathId- workflow path id- Returns:
- map of path properties
-
cancelWorkflow
Description copied from interface:WorkflowServiceCancel an "in-flight" Workflow instance- Specified by:
cancelWorkflowin interfaceWorkflowService- Parameters:
workflowId- the workflow instance to cancel- Returns:
- an updated representation of the workflow instance
-
cancelWorkflows
Description copied from interface:WorkflowServiceCancel a batch of "in-flight" Workflow instances- Specified by:
cancelWorkflowsin interfaceWorkflowService- Parameters:
workflowIds- List of the workflow instances to cancel- Returns:
- List of updated representations of the workflow instances
-
setMultiTenantWorkflowDeploymentEnabled
public void setMultiTenantWorkflowDeploymentEnabled(boolean deployWorkflowsInTenant) -
isMultiTenantWorkflowDeploymentEnabled
public boolean isMultiTenantWorkflowDeploymentEnabled()- Specified by:
isMultiTenantWorkflowDeploymentEnabledin interfaceWorkflowService- Returns:
- true, if all workflows (in workflowDeployers) have a copy deployed per tenant and workflows can be deployed in tenant. False when workflows are shared system-wide, regardless of the tenant context.
-
deleteWorkflow
Description copied from interface:WorkflowServiceDelete a Workflow instance. NOTE: This will force a delete, meaning that the workflow instance may not go through all the appropriate cancel events.- Specified by:
deleteWorkflowin interfaceWorkflowService- Parameters:
workflowId- the workflow instance to cancel- Returns:
- an updated representation of the workflow instance
-
signal
Description copied from interface:WorkflowServiceSignal the transition from one Workflow Node to another- Specified by:
signalin interfaceWorkflowService- Parameters:
pathId- the workflow path to signal ontransition- the transition id to follow (or null, for the default transition)- Returns:
- the updated workflow path
-
fireEvent
Description copied from interface:WorkflowServiceFire custom event against specified path- Specified by:
fireEventin interfaceWorkflowService- Parameters:
pathId- the workflow path to fire event onevent- name of event- Returns:
- workflow path (it may have been updated as a result of firing the event
-
getTimers
Description copied from interface:WorkflowServiceGets all active timers for the specified workflow- Specified by:
getTimersin interfaceWorkflowService- Returns:
- the list of active timers
-
getTasksForWorkflowPath
Description copied from interface:WorkflowServiceGets all Tasks associated with the specified path- Specified by:
getTasksForWorkflowPathin interfaceWorkflowService- Parameters:
pathId- the path id- Returns:
- the list of associated tasks
-
getStartTask
Gets the start task instance for the given workflow instance.- Specified by:
getStartTaskin interfaceWorkflowService- Parameters:
workflowInstanceId- String- Returns:
- WorkflowTask
-
getStartTasks
Description copied from interface:WorkflowServiceGets the start task instances for the given workflow instances.- Specified by:
getStartTasksin interfaceWorkflowServicesameSession- indicates that the returnedWorkflowTaskelements will be used in the same session. Iftrue, the returned List will be a lazy loaded list providing greater performance.
-
hasWorkflowImage
Description copied from interface:WorkflowServiceDetermines if a graphical view of the workflow instance exists- Specified by:
hasWorkflowImagein interfaceWorkflowService- Parameters:
workflowInstanceId- the workflow instance id- Returns:
- true if there is a workflow instance diagram available
-
getWorkflowImage
Description copied from interface:WorkflowServiceGets a graphical view of the workflow instance- Specified by:
getWorkflowImagein interfaceWorkflowService- Parameters:
workflowInstanceId- the workflow instance id- Returns:
- image view of the workflow instance as an InputStream or null if a diagram is not available
-
getAssignedTasks
Description copied from interface:WorkflowServiceGets all tasks assigned to the specified authority- Specified by:
getAssignedTasksin interfaceWorkflowService- Parameters:
authority- the authoritystate- filter by specified workflow task state- Returns:
- the list of assigned tasks
-
getAssignedTasks
public List<WorkflowTask> getAssignedTasks(String authority, WorkflowTaskState state, boolean lazyInitialization) Description copied from interface:WorkflowServiceGets all tasks assigned to the specified authority- Specified by:
getAssignedTasksin interfaceWorkflowService- Parameters:
authority- the authoritystate- filter by specified workflow task statelazyInitialization- hint to the underlying workflow-engine to allow returningWorkflowTasks which aren't fully initialized but will be when the required values are required. Iftrue, the returned enities should be used inside of the transaction-boundaries of this service-call. Iffalse, fully initialized entities are returned, just as withWorkflowService.getAssignedTasks(String, WorkflowTaskState).
It's a hint to the underlying workflow-engine and may be ignored by the actual implementation.- Returns:
- the list of assigned tasks
-
getPooledTasks
Description copied from interface:WorkflowServiceGets the pooled tasks available to the specified authority- Specified by:
getPooledTasksin interfaceWorkflowService- Parameters:
authority- the authority- Returns:
- the list of pooled tasks
-
getPooledTasks
Description copied from interface:WorkflowServiceGets the pooled tasks available to the specified authority- Specified by:
getPooledTasksin interfaceWorkflowService- Parameters:
authority- the authoritylazyinitialization- hint to the underlying workflow-engine to allow returningWorkflowTasks which aren't fully initialized but will be when the required values are required. Iftrue, the returned enities should be used inside of the transaction-boundaries of this service-call. Iffalse, fully initialized entities are returned, just as withWorkflowService.getPooledTasks(String).
It's a hint to the underlying workflow-engine and may be ignored by the actual implementation.- Returns:
- the list of pooled tasks
-
queryTasks
- Specified by:
queryTasksin interfaceWorkflowService
-
queryTasks
Description copied from interface:WorkflowServiceQuery for tasks- Specified by:
queryTasksin interfaceWorkflowService- Parameters:
query- the filter by which tasks are queriedsameSession- indicates that the returnedWorkflowTaskelements will be used in the same session. Iftrue, the returned List will be a lazy loaded list providing greater performance.- Returns:
- the list of tasks matching the specified query
-
updateTask
public WorkflowTask updateTask(String taskId, Map<QName, Serializable> properties, Map<QName, List<NodeRef>> add, Map<QName, List<NodeRef>> remove) Description copied from interface:WorkflowServiceUpdate the Properties and Associations of a Task- Specified by:
updateTaskin interfaceWorkflowService- Parameters:
taskId- the task id to updateproperties- the map of properties to set on the task (or null, if none to set)add- the map of items to associate with the task (or null, if none to add)remove- the map of items to dis-associate with the task (or null, if none to remove)- Returns:
- the update task
-
endTask
Description copied from interface:WorkflowServiceEnd the Task (i.e. complete the task)- Specified by:
endTaskin interfaceWorkflowService- Parameters:
taskId- the task id to endtransition- the task transition id to take on completion (or null, for the default transition)- Returns:
- the updated task
-
isTaskEditable
Description copied from interface:WorkflowServiceDetermines if the given user can edit the given task- Specified by:
isTaskEditablein interfaceWorkflowService- Parameters:
task- The task to checkusername- The user to check- Returns:
- true if the user can edit the task
-
isTaskEditable
Description copied from interface:WorkflowServiceDetermines if the given user can edit the given task- Specified by:
isTaskEditablein interfaceWorkflowService- Parameters:
task- The task to checkusername- The user to checkrefreshTask- Whether or not to refresh theWorkflowTaskbefore check is perfromed- Returns:
- true if the user can edit the task
-
isTaskReassignable
Description copied from interface:WorkflowServiceDetermines if the given user can reassign the given task- Specified by:
isTaskReassignablein interfaceWorkflowService- Parameters:
task- The task to checkusername- The user to check- Returns:
- true if the user can reassign the task
-
isTaskReassignable
Description copied from interface:WorkflowServiceDetermines if the given user can reassign the given task- Specified by:
isTaskReassignablein interfaceWorkflowService- Parameters:
task- The task to checkusername- The user to checkrefreshTask- Whether or not to refresh theWorkflowTaskbefore check is perfromed- Returns:
- true if the user can reassign the task
-
isTaskClaimable
Description copied from interface:WorkflowServiceDetermines if the given user can claim the given task- Specified by:
isTaskClaimablein interfaceWorkflowService- Parameters:
task- The task to checkusername- The user to check- Returns:
- true if the user can claim the task
-
isTaskClaimable
Description copied from interface:WorkflowServiceDetermines if the given user can claim the given task- Specified by:
isTaskClaimablein interfaceWorkflowService- Parameters:
task- The task to checkusername- The user to checkrefreshTask- Whether or not to refresh theWorkflowTaskbefore check is perfromed- Returns:
- true if the user can claim the task
-
isTaskReleasable
Description copied from interface:WorkflowServiceDetermines if the given user can release the given task- Specified by:
isTaskReleasablein interfaceWorkflowService- Parameters:
task- The task to checkusername- The user to check- Returns:
- true if the user can release the task
-
isTaskReleasable
Description copied from interface:WorkflowServiceDetermines if the given user can release the given task- Specified by:
isTaskReleasablein interfaceWorkflowService- Parameters:
task- The task to checkusername- The user to checkrefreshTask- Whether or not to refresh theWorkflowTaskbefore check is perfromed- Returns:
- true if the user can release the task
-
getTaskById
Description copied from interface:WorkflowServiceGets a Task by unique Id- Specified by:
getTaskByIdin interfaceWorkflowService- Parameters:
taskId- the task id- Returns:
- the task (or null, if not found)
-
createPackage
Description copied from interface:WorkflowServiceCreate a Workflow Package (a container of content to route through the Workflow). If an existing container is supplied, it's supplemented with the workflow package aspect.- Specified by:
createPackagein interfaceWorkflowService- Parameters:
container- (optional) a pre-created container (e.g. folder, versioned folder or layered folder)- Returns:
- the workflow package
-
getWorkflowsForContent
Description copied from interface:WorkflowServiceGets the Workflows that act upon the specified Repository content.- Specified by:
getWorkflowsForContentin interfaceWorkflowService- Parameters:
packageItem- the repository content item to get workflows foractive- true => active workflows only, false => completed workflows only- Returns:
- list of workflows which act upon the specified content
-
getPackageContents
Description copied from interface:WorkflowServiceGet a list of node refs to all the package contents for the given task id.- Specified by:
getPackageContentsin interfaceWorkflowService- Parameters:
taskId- - the task id- Returns:
- - A list of NodeRefs
-
getPackageContents
Description copied from interface:WorkflowServiceGet a list of node refs to all the package contents.- Specified by:
getPackageContentsin interfaceWorkflowService- Parameters:
packageRef- the nodeRef to the package- Returns:
- A list of nodeRefs the package is referring to
-