Class WorkflowServiceImpl

java.lang.Object
org.alfresco.repo.workflow.WorkflowServiceImpl
All Implemented Interfaces:
WorkflowService

public class WorkflowServiceImpl extends Object implements WorkflowService
Default Alfresco Workflow Service whose implementation is backed by registered BPM Engine plug-in components.
Author:
davidc
  • Constructor Details

    • WorkflowServiceImpl

      public WorkflowServiceImpl()
  • Method Details

    • setTransactionService

      public void setTransactionService(TransactionService transactionService)
      Parameters:
      transactionService - service that tells if the server is read-only or not
    • setAuthorityService

      public void setAuthorityService(AuthorityService authorityService)
      Sets the Authority Service
      Parameters:
      authorityService - AuthorityService
    • setBPMEngineRegistry

      public void setBPMEngineRegistry(BPMEngineRegistry registry)
      Sets the BPM Engine Registry
      Parameters:
      registry - bpm engine registry
    • setWorkflowAdminService

      public void setWorkflowAdminService(WorkflowAdminService workflowAdminService)
      Parameters:
      workflowAdminService - the workflowAdminService to set
    • setWorkflowPackageComponent

      public void setWorkflowPackageComponent(WorkflowPackageComponent workflowPackageComponent)
      Sets the Workflow Package Component
      Parameters:
      workflowPackageComponent - workflow package component
    • setNodeService

      public void setNodeService(NodeService nodeService)
      Sets the Node Service
      Parameters:
      nodeService - NodeService
    • setContentService

      public void setContentService(ContentService contentService)
      Sets the Content Service
      Parameters:
      contentService - ContentService
    • setDictionaryService

      public void setDictionaryService(DictionaryService dictionaryService)
      Set the dictionary service
      Parameters:
      dictionaryService - DictionaryService
    • setProtectedNodeService

      public void setProtectedNodeService(NodeService protectedNodeService)
      Set the node service which applies permissions
      Parameters:
      protectedNodeService - NodeService
    • setWorkflowNotification

      public void setWorkflowNotification(WorkflowNotificationUtils service)
      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: WorkflowService
      Deploy a Workflow Definition to the Alfresco Repository
      Specified by:
      deployDefinition in interface WorkflowService
      Parameters:
      engineId - the bpm engine id
      workflowDefinition - the workflow definition
      mimetype - 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: WorkflowService
      Deploy a Workflow Definition to the Alfresco Repository
      Specified by:
      deployDefinition in interface WorkflowService
      Parameters:
      engineId - the bpm engine id
      workflowDefinition - the workflow definition
      mimetype - the mimetype of the workflow definition
      name - 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: WorkflowService
      Deploy a Workflow Definition to the Alfresco Repository
      Specified by:
      deployDefinition in interface WorkflowService
      Parameters:
      engineId - the bpm engine id
      workflowDefinition - the workflow definition
      mimetype - the mimetype of the workflow definition
      name - a name representing the deployment
      Returns:
      workflow deployment descriptor
    • isDefinitionDeployed

      public boolean isDefinitionDeployed(NodeRef workflowDefinition)
      Description copied from interface: WorkflowService
      Is 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:
      isDefinitionDeployed in interface WorkflowService
      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: WorkflowService
      Is 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:
      isDefinitionDeployed in interface WorkflowService
      Parameters:
      engineId - the bpm engine id
      workflowDefinition - the definition to check
      mimetype - the mimetype of the definition
      Returns:
      true => already deployed
    • checkDeploymentCategory

      public void checkDeploymentCategory(String engineId, InputStream workflowDefinition)
      Description copied from interface: WorkflowService
      Checks if the deployment for supplied workflow definition has the proper category
      Specified by:
      checkDeploymentCategory in interface WorkflowService
      Parameters:
      engineId - the bpm engine id
      workflowDefinition - the definition to check
    • deployDefinition

      public WorkflowDeployment deployDefinition(NodeRef definitionContent)
      Description copied from interface: WorkflowService
      Deploy 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:
      deployDefinition in interface WorkflowService
      Parameters:
      definitionContent - the content object containing the definition
      Returns:
      workflow deployment descriptor
    • undeployDefinition

      public void undeployDefinition(String workflowDefinitionId)
      Description copied from interface: WorkflowService
      Undeploy an exisiting Workflow Definition TODO: Determine behaviour when "in-flight" workflow instances exist
      Specified by:
      undeployDefinition in interface WorkflowService
      Parameters:
      workflowDefinitionId - the id of the definition to undeploy
    • getDefinitions

      public List<WorkflowDefinition> getDefinitions()
      Description copied from interface: WorkflowService
      Gets latest deployed Workflow Definitions
      Specified by:
      getDefinitions in interface WorkflowService
      Returns:
      the latest deployed workflow definitions
    • getAllDefinitions

      public List<WorkflowDefinition> getAllDefinitions()
      Description copied from interface: WorkflowService
      Gets all deployed Workflow Definitions (with all previous versions)
      Specified by:
      getAllDefinitions in interface WorkflowService
      Returns:
      the deployed (and previous) workflow definitions
    • getDefinitionById

      public WorkflowDefinition getDefinitionById(String workflowDefinitionId)
      Description copied from interface: WorkflowService
      Gets a Workflow Definition by unique Id
      Specified by:
      getDefinitionById in interface WorkflowService
      Parameters:
      workflowDefinitionId - the workflow definition id
      Returns:
      the deployed workflow definition (or null if not found)
    • getDefinitionByName

      public WorkflowDefinition getDefinitionByName(String workflowName)
      Description copied from interface: WorkflowService
      Gets the latest Workflow Definition by unique name
      Specified by:
      getDefinitionByName in interface WorkflowService
      Parameters:
      workflowName - workflow name e.g. activiti$activitiReview
      Returns:
      the deployed workflow definition (or null if not found)
    • getAllDefinitionsByName

      public List<WorkflowDefinition> getAllDefinitionsByName(String workflowName)
      Description copied from interface: WorkflowService
      Gets all (including previous) Workflow Definitions for the given unique name
      Specified by:
      getAllDefinitionsByName in interface WorkflowService
      Parameters:
      workflowName - workflow name e.g. activiti$activitiReview
      Returns:
      the deployed workflow definition (or null if not found)
    • getDefinitionImage

      public byte[] getDefinitionImage(String workflowDefinitionId)
      Description copied from interface: WorkflowService
      Gets a graphical view of the Workflow Definition
      Specified by:
      getDefinitionImage in interface WorkflowService
      Parameters:
      workflowDefinitionId - the workflow definition id
      Returns:
      image view of the workflow definition
    • getTaskDefinitions

      public List<WorkflowTaskDefinition> getTaskDefinitions(String workflowDefinitionId)
      Description copied from interface: WorkflowService
      Gets the Task Definitions for the given Workflow Definition
      Specified by:
      getTaskDefinitions in interface WorkflowService
      Parameters:
      workflowDefinitionId - the workflow definition id
      Returns:
      the deployed task definitions (or null if not found)
    • startWorkflow

      public WorkflowPath startWorkflow(String workflowDefinitionId, Map<QName,Serializable> parameters)
      Description copied from interface: WorkflowService
      Start a Workflow Instance
      Specified by:
      startWorkflow in interface WorkflowService
      Parameters:
      workflowDefinitionId - the workflow definition id
      parameters - the initial set of parameters used to populate the "Start Task" properties
      Returns:
      the initial workflow path
    • startWorkflowFromTemplate

      public WorkflowPath startWorkflowFromTemplate(NodeRef templateDefinition)
      Description copied from interface: WorkflowService
      Start 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:
      startWorkflowFromTemplate in interface WorkflowService
      Parameters:
      templateDefinition - the node representing the Start Task properties
      Returns:
      the initial workflow path
    • getActiveWorkflows

      public List<WorkflowInstance> getActiveWorkflows(String workflowDefinitionId)
      Gets all active workflow instances of the specified Workflow Definition
      Specified by:
      getActiveWorkflows in interface WorkflowService
      Parameters:
      workflowDefinitionId - the workflow definition id
      Returns:
      the list of "in-flight" workflow instances
    • getCompletedWorkflows

      public List<WorkflowInstance> getCompletedWorkflows(String workflowDefinitionId)
      Gets all completed workflow instances of the specified Workflow Definition
      Specified by:
      getCompletedWorkflows in interface WorkflowService
      Parameters:
      workflowDefinitionId - the workflow definition id
      Returns:
      the list of "in-flight" workflow instances
    • getWorkflows

      public List<WorkflowInstance> getWorkflows(String workflowDefinitionId)
      Gets all workflow instances (both active and completed) of the specified Workflow Definition
      Specified by:
      getWorkflows in interface WorkflowService
      Parameters:
      workflowDefinitionId - the workflow definition id
      Returns:
      the list of "in-flight" workflow instances
    • getWorkflows

      public List<WorkflowInstance> getWorkflows(WorkflowInstanceQuery workflowInstanceQuery)
      Description copied from interface: WorkflowService
      Gets all "in-flight" workflow instances according to the specified workflowInstanceQuery parameter
      Specified by:
      getWorkflows in interface WorkflowService
      Parameters:
      workflowInstanceQuery - WorkflowInstanceQuery
    • getWorkflows

      public List<WorkflowInstance> getWorkflows(WorkflowInstanceQuery workflowInstanceQuery, int maxItems, int skipCount)
      Description copied from interface: WorkflowService
      Gets maxItems "in-flight" workflow instances according to the specified workflowInstanceQuery parameter Get maxItems and skipCount parameters form request
      Specified by:
      getWorkflows in interface WorkflowService
      Parameters:
      workflowInstanceQuery - WorkflowInstanceQuery
      maxItems - int
      skipCount - int
      Returns:
      maxItems workflow instances
    • countWorkflows

      public long countWorkflows(WorkflowInstanceQuery workflowInstanceQuery)
      Description copied from interface: WorkflowService
      Get count of workflow instances
      Specified by:
      countWorkflows in interface WorkflowService
      Parameters:
      workflowInstanceQuery - WorkflowInstanceQuery
      Returns:
      count of workflow instances
    • countTasks

      public long countTasks(WorkflowTaskQuery workflowTaskQuery)
      Description copied from interface: WorkflowService
      Get the number of tasks matching the given query
      Specified by:
      countTasks in interface WorkflowService
      Parameters:
      workflowTaskQuery - the filter by which tasks are queried
      Returns:
      count of matching tasks
    • getActiveWorkflows

      public List<WorkflowInstance> getActiveWorkflows()
      Gets all active workflow instances.
      Specified by:
      getActiveWorkflows in interface WorkflowService
      Returns:
      the list of "in-flight" workflow instances
    • getCompletedWorkflows

      public List<WorkflowInstance> getCompletedWorkflows()
      Gets all completed workflow instances.
      Specified by:
      getCompletedWorkflows in interface WorkflowService
      Returns:
      the list of "in-flight" workflow instances
    • getWorkflows

      public List<WorkflowInstance> getWorkflows()
      Gets all workflow instances (both active and completed).
      Specified by:
      getWorkflows in interface WorkflowService
      Returns:
      the list of "in-flight" workflow instances
    • getWorkflowById

      public WorkflowInstance getWorkflowById(String workflowId)
      Gets a specific workflow instances
      Specified by:
      getWorkflowById in interface WorkflowService
      Parameters:
      workflowId - the id of the workflow to retrieve
      Returns:
      the workflow instance (or null if not found)
    • getWorkflowPaths

      public List<WorkflowPath> getWorkflowPaths(String workflowId)
      Description copied from interface: WorkflowService
      Gets all Paths for the specified Workflow instance. NOTE: It only returns information for an active Workflow instance.
      Specified by:
      getWorkflowPaths in interface WorkflowService
      Parameters:
      workflowId - workflow instance id
      Returns:
      the list of workflow paths
    • getPathProperties

      public Map<QName,Serializable> getPathProperties(String pathId)
      Description copied from interface: WorkflowService
      Gets the properties associated with the specified path (and parent paths)
      Specified by:
      getPathProperties in interface WorkflowService
      Parameters:
      pathId - workflow path id
      Returns:
      map of path properties
    • cancelWorkflow

      public WorkflowInstance cancelWorkflow(String workflowId)
      Description copied from interface: WorkflowService
      Cancel an "in-flight" Workflow instance
      Specified by:
      cancelWorkflow in interface WorkflowService
      Parameters:
      workflowId - the workflow instance to cancel
      Returns:
      an updated representation of the workflow instance
    • cancelWorkflows

      public List<WorkflowInstance> cancelWorkflows(List<String> workflowIds)
      Description copied from interface: WorkflowService
      Cancel a batch of "in-flight" Workflow instances
      Specified by:
      cancelWorkflows in interface WorkflowService
      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:
      isMultiTenantWorkflowDeploymentEnabled in interface WorkflowService
      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

      public WorkflowInstance deleteWorkflow(String workflowId)
      Description copied from interface: WorkflowService
      Delete 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:
      deleteWorkflow in interface WorkflowService
      Parameters:
      workflowId - the workflow instance to cancel
      Returns:
      an updated representation of the workflow instance
    • signal

      public WorkflowPath signal(String pathId, String transition)
      Description copied from interface: WorkflowService
      Signal the transition from one Workflow Node to another
      Specified by:
      signal in interface WorkflowService
      Parameters:
      pathId - the workflow path to signal on
      transition - the transition id to follow (or null, for the default transition)
      Returns:
      the updated workflow path
    • fireEvent

      public WorkflowPath fireEvent(String pathId, String event)
      Description copied from interface: WorkflowService
      Fire custom event against specified path
      Specified by:
      fireEvent in interface WorkflowService
      Parameters:
      pathId - the workflow path to fire event on
      event - name of event
      Returns:
      workflow path (it may have been updated as a result of firing the event
    • getTimers

      public List<WorkflowTimer> getTimers(String workflowId)
      Description copied from interface: WorkflowService
      Gets all active timers for the specified workflow
      Specified by:
      getTimers in interface WorkflowService
      Returns:
      the list of active timers
    • getTasksForWorkflowPath

      public List<WorkflowTask> getTasksForWorkflowPath(String pathId)
      Description copied from interface: WorkflowService
      Gets all Tasks associated with the specified path
      Specified by:
      getTasksForWorkflowPath in interface WorkflowService
      Parameters:
      pathId - the path id
      Returns:
      the list of associated tasks
    • getStartTask

      public WorkflowTask getStartTask(String workflowInstanceId)
      Gets the start task instance for the given workflow instance.
      Specified by:
      getStartTask in interface WorkflowService
      Parameters:
      workflowInstanceId - String
      Returns:
      WorkflowTask
    • getStartTasks

      public List<WorkflowTask> getStartTasks(List<String> workflowInstanceIds, boolean sameSession)
      Description copied from interface: WorkflowService
      Gets the start task instances for the given workflow instances.
      Specified by:
      getStartTasks in interface WorkflowService
      sameSession - indicates that the returned WorkflowTask elements will be used in the same session. If true, the returned List will be a lazy loaded list providing greater performance.
    • hasWorkflowImage

      public boolean hasWorkflowImage(String workflowInstanceId)
      Description copied from interface: WorkflowService
      Determines if a graphical view of the workflow instance exists
      Specified by:
      hasWorkflowImage in interface WorkflowService
      Parameters:
      workflowInstanceId - the workflow instance id
      Returns:
      true if there is a workflow instance diagram available
    • getWorkflowImage

      public InputStream getWorkflowImage(String workflowInstanceId)
      Description copied from interface: WorkflowService
      Gets a graphical view of the workflow instance
      Specified by:
      getWorkflowImage in interface WorkflowService
      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

      public List<WorkflowTask> getAssignedTasks(String authority, WorkflowTaskState state)
      Description copied from interface: WorkflowService
      Gets all tasks assigned to the specified authority
      Specified by:
      getAssignedTasks in interface WorkflowService
      Parameters:
      authority - the authority
      state - 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: WorkflowService
      Gets all tasks assigned to the specified authority
      Specified by:
      getAssignedTasks in interface WorkflowService
      Parameters:
      authority - the authority
      state - filter by specified workflow task state
      lazyInitialization - hint to the underlying workflow-engine to allow returning WorkflowTasks which aren't fully initialized but will be when the required values are required. If true, the returned enities should be used inside of the transaction-boundaries of this service-call. If false, fully initialized entities are returned, just as with WorkflowService.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

      public List<WorkflowTask> getPooledTasks(String authority)
      Description copied from interface: WorkflowService
      Gets the pooled tasks available to the specified authority
      Specified by:
      getPooledTasks in interface WorkflowService
      Parameters:
      authority - the authority
      Returns:
      the list of pooled tasks
    • getPooledTasks

      public List<WorkflowTask> getPooledTasks(String authority, boolean lazyinitialization)
      Description copied from interface: WorkflowService
      Gets the pooled tasks available to the specified authority
      Specified by:
      getPooledTasks in interface WorkflowService
      Parameters:
      authority - the authority
      lazyinitialization - hint to the underlying workflow-engine to allow returning WorkflowTasks which aren't fully initialized but will be when the required values are required. If true, the returned enities should be used inside of the transaction-boundaries of this service-call. If false, fully initialized entities are returned, just as with WorkflowService.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

      public List<WorkflowTask> queryTasks(WorkflowTaskQuery query)
      Specified by:
      queryTasks in interface WorkflowService
    • queryTasks

      public List<WorkflowTask> queryTasks(WorkflowTaskQuery query, boolean sameSession)
      Description copied from interface: WorkflowService
      Query for tasks
      Specified by:
      queryTasks in interface WorkflowService
      Parameters:
      query - the filter by which tasks are queried
      sameSession - indicates that the returned WorkflowTask elements will be used in the same session. If true, 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: WorkflowService
      Update the Properties and Associations of a Task
      Specified by:
      updateTask in interface WorkflowService
      Parameters:
      taskId - the task id to update
      properties - 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

      public WorkflowTask endTask(String taskId, String transition)
      Description copied from interface: WorkflowService
      End the Task (i.e. complete the task)
      Specified by:
      endTask in interface WorkflowService
      Parameters:
      taskId - the task id to end
      transition - the task transition id to take on completion (or null, for the default transition)
      Returns:
      the updated task
    • isTaskEditable

      public boolean isTaskEditable(WorkflowTask task, String username)
      Description copied from interface: WorkflowService
      Determines if the given user can edit the given task
      Specified by:
      isTaskEditable in interface WorkflowService
      Parameters:
      task - The task to check
      username - The user to check
      Returns:
      true if the user can edit the task
    • isTaskEditable

      public boolean isTaskEditable(WorkflowTask task, String username, boolean refreshTask)
      Description copied from interface: WorkflowService
      Determines if the given user can edit the given task
      Specified by:
      isTaskEditable in interface WorkflowService
      Parameters:
      task - The task to check
      username - The user to check
      refreshTask - Whether or not to refresh the WorkflowTask before check is perfromed
      Returns:
      true if the user can edit the task
    • isTaskReassignable

      public boolean isTaskReassignable(WorkflowTask task, String username)
      Description copied from interface: WorkflowService
      Determines if the given user can reassign the given task
      Specified by:
      isTaskReassignable in interface WorkflowService
      Parameters:
      task - The task to check
      username - The user to check
      Returns:
      true if the user can reassign the task
    • isTaskReassignable

      public boolean isTaskReassignable(WorkflowTask task, String username, boolean refreshTask)
      Description copied from interface: WorkflowService
      Determines if the given user can reassign the given task
      Specified by:
      isTaskReassignable in interface WorkflowService
      Parameters:
      task - The task to check
      username - The user to check
      refreshTask - Whether or not to refresh the WorkflowTask before check is perfromed
      Returns:
      true if the user can reassign the task
    • isTaskClaimable

      public boolean isTaskClaimable(WorkflowTask task, String username)
      Description copied from interface: WorkflowService
      Determines if the given user can claim the given task
      Specified by:
      isTaskClaimable in interface WorkflowService
      Parameters:
      task - The task to check
      username - The user to check
      Returns:
      true if the user can claim the task
    • isTaskClaimable

      public boolean isTaskClaimable(WorkflowTask task, String username, boolean refreshTask)
      Description copied from interface: WorkflowService
      Determines if the given user can claim the given task
      Specified by:
      isTaskClaimable in interface WorkflowService
      Parameters:
      task - The task to check
      username - The user to check
      refreshTask - Whether or not to refresh the WorkflowTask before check is perfromed
      Returns:
      true if the user can claim the task
    • isTaskReleasable

      public boolean isTaskReleasable(WorkflowTask task, String username)
      Description copied from interface: WorkflowService
      Determines if the given user can release the given task
      Specified by:
      isTaskReleasable in interface WorkflowService
      Parameters:
      task - The task to check
      username - The user to check
      Returns:
      true if the user can release the task
    • isTaskReleasable

      public boolean isTaskReleasable(WorkflowTask task, String username, boolean refreshTask)
      Description copied from interface: WorkflowService
      Determines if the given user can release the given task
      Specified by:
      isTaskReleasable in interface WorkflowService
      Parameters:
      task - The task to check
      username - The user to check
      refreshTask - Whether or not to refresh the WorkflowTask before check is perfromed
      Returns:
      true if the user can release the task
    • getTaskById

      public WorkflowTask getTaskById(String taskId)
      Description copied from interface: WorkflowService
      Gets a Task by unique Id
      Specified by:
      getTaskById in interface WorkflowService
      Parameters:
      taskId - the task id
      Returns:
      the task (or null, if not found)
    • createPackage

      public NodeRef createPackage(NodeRef container)
      Description copied from interface: WorkflowService
      Create 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:
      createPackage in interface WorkflowService
      Parameters:
      container - (optional) a pre-created container (e.g. folder, versioned folder or layered folder)
      Returns:
      the workflow package
    • getWorkflowsForContent

      public List<WorkflowInstance> getWorkflowsForContent(NodeRef packageItem, boolean active)
      Description copied from interface: WorkflowService
      Gets the Workflows that act upon the specified Repository content.
      Specified by:
      getWorkflowsForContent in interface WorkflowService
      Parameters:
      packageItem - the repository content item to get workflows for
      active - true => active workflows only, false => completed workflows only
      Returns:
      list of workflows which act upon the specified content
    • getPackageContents

      public List<NodeRef> getPackageContents(String taskId)
      Description copied from interface: WorkflowService
      Get a list of node refs to all the package contents for the given task id.
      Specified by:
      getPackageContents in interface WorkflowService
      Parameters:
      taskId - - the task id
      Returns:
      - A list of NodeRefs
    • getPackageContents

      public List<NodeRef> getPackageContents(NodeRef packageRef)
      Description copied from interface: WorkflowService
      Get a list of node refs to all the package contents.
      Specified by:
      getPackageContents in interface WorkflowService
      Parameters:
      packageRef - the nodeRef to the package
      Returns:
      A list of nodeRefs the package is referring to