Interface IWorkflowService


public interface IWorkflowService
A service that carries out all activities related to workflow instances / workflow tasks
  • Field Details

  • Method Details

    • searchWorkflows

      TaskOrWorkflowSearchResult searchWorkflows(WorkflowSearchQuery workflowSearchQuery)
      Gets the information of the workflow instances that match the provided search criteria
      Parameters:
      workflowSearchQuery - This parameter contains the (API-x model) search criteria for the workflow instances to be retrieved
      Returns:
      Returns a TaskOrWorkflowSearchResult object containing the information of the workflow instances to be returned. These workflow instances were found by using the WorkflowSearchQuery provided
    • searchTasks

      TaskOrWorkflowSearchResult searchTasks(TaskSearchQuery taskSearchQuery)
      Gets the information of the workflow tasks that match the provided search criteria
      Parameters:
      taskSearchQuery - This parameter contains the (API-x model) search criteria for the workflow tasks to be retrieved
      Returns:
      Returns a TaskOrWorkflowSearchResult object containing the information of the workflow tasks to be returned. These workflow tasks were found by using the WorkflowSearchQuery provided
    • getTaskInfo

      Task getTaskInfo(String taskID)
      Gets the information of the workflow task that has the provided id
      Parameters:
      taskID - Specifies the id of the requested workflow task
      Returns:
      Returns a workflow task instance with the provided id
    • getWorkflowInfo

      Workflow getWorkflowInfo(String workflowID)
      Gets the information of the workflow instance that has the provided id
      Parameters:
      workflowID - Specifies the id of the requested workflow instance
      Returns:
      Returns a workflow instance instance with the provided id
    • getAllDefinitions

      List<WorkflowDefinition> getAllDefinitions()
      Gets a list of all workflow definitions that are deployed
      Returns:
      A list of all workflow definitions that are deployed
    • endTask

      void endTask(String taskID, String transitionID)
      End the task with the provided id, by using the provided transitionID to specify in which way/transition the task has ended. This could be for example transitionID 'Next' that describes 'Task Done' transition. Other examples are 'Approve', 'Reject', etc.
      Parameters:
      taskID - Specifies the id of the workflow task to be ended
      transitionID - Specifies the id of the transition that describes how the task ended
    • updateWorkflow

      Workflow updateWorkflow(String id, WorkflowOrTaskChanges changes)
      [Deprecated] Updates the workflow instance that has the provided id with the provided set of the changed properties with their values.
      Parameters:
      id - Specifies the id of the workflow instance that is to be updated
      changes - A hash map that contains the full QName of the changed properties and their Serializable values
      Returns:
      The updated Workflow instance instance
    • updateTask

      Task updateTask(String id, WorkflowOrTaskChanges changes)
      Updates the workflow task that has the provided id with the provided set of the changed properties with their values.
      Parameters:
      id - Specifies the id of the workflow task that is to be updated
      changes - A hash map that contains the full QName of the changed properties and their Serializable values
      Returns:
      The updated workflow Task instance
    • claimWorkflowTask

      Task claimWorkflowTask(String taskID)
      Claim the task with the provided id. The current user will be used as the claimer.
      Parameters:
      taskID - Specifies the id of the workflow task that is to be claimed
      Returns:
      The claimed workflow Task instance
    • claimWorkflowTask

      Task claimWorkflowTask(String taskID, String userName)
      Claim the task with the provided id. The user name provided will be used to find the claimer user.
      Parameters:
      taskID - Specifies the id of the workflow task that is to be claimed
      userName - Specifies the user name of the user that will claim the task
      Returns:
      The claimed workflow Task instance
    • releaseWorkflowTask

      Task releaseWorkflowTask(String taskID)
      Release the task to pool of users and/or groups with the provided id.
      Parameters:
      taskID - Specifies the id of the workflow task that is to be released
      Returns:
      The released workflow Task instance
    • GenerateWorkflows

      void GenerateWorkflows(int amount, String username)
      [DEV] To be used for development/testing purposes only! Generates sample workflow based on the first workflow definition available.
      Parameters:
      amount - How many workflow instances to generate
      username - To who will these workflow instances be assigned
    • cancelWorkflow

      void cancelWorkflow(String id)
    • getWorkflowDefinition

      WorkflowDefinition getWorkflowDefinition(String workflowName)
    • startWorkflow

      Workflow startWorkflow(String definitionId, Map<String,Serializable> parameters)
      Starts one instance of the workflow of the given definition
      Parameters:
      definitionId - The id defining a workflow definition
      parameters - Starting parameters for workflow
      Returns:
      POJO containing workflow instance id