Class TaskController

java.lang.Object
pro.taskana.task.rest.TaskController

@RestController @EnableHypermediaSupport(type=HAL) public class TaskController extends Object
Controller for all Task related endpoints.
  • Method Details

    • createTask

      @PostMapping(path="/api/v1/tasks") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> createTask(@RequestBody TaskRepresentationModel taskRepresentationModel) throws pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException, pro.taskana.classification.api.exceptions.ClassificationNotFoundException, pro.taskana.task.api.exceptions.TaskAlreadyExistException, pro.taskana.common.api.exceptions.InvalidArgumentException, pro.taskana.task.api.exceptions.AttachmentPersistenceException, pro.taskana.task.api.exceptions.ObjectReferencePersistenceException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint creates a persistent Task.
      Parameters:
      taskRepresentationModel - the Task which should be created.
      Returns:
      the created Task
      Throws:
      pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException - if the referenced Workbasket does not exist
      pro.taskana.classification.api.exceptions.ClassificationNotFoundException - if the referenced Classification does not exist
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user is not authorized to append a Task to the referenced Workbasket
      pro.taskana.task.api.exceptions.TaskAlreadyExistException - if the requested Task already exists.
      pro.taskana.common.api.exceptions.InvalidArgumentException - if any input is semantically wrong.
      pro.taskana.task.api.exceptions.AttachmentPersistenceException - if an Attachment with ID will be added multiple times without using the task-methods
      pro.taskana.task.api.exceptions.ObjectReferencePersistenceException - if an ObjectReference with ID will be added multiple times without using the task-methods
    • getTasks

      @GetMapping(path="/api/v1/tasks") @Transactional(readOnly=true, rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskSummaryPagedRepresentationModel> getTasks(jakarta.servlet.http.HttpServletRequest request, TaskQueryFilterParameter filterParameter, TaskQueryFilterCustomFields filterCustomFields, TaskQueryFilterCustomIntFields filterCustomIntFields, TaskQueryGroupByParameter groupByParameter, TaskController.TaskQuerySortParameter sortParameter, QueryPagingParameter<pro.taskana.task.api.models.TaskSummary,pro.taskana.task.api.TaskQuery> pagingParameter)
      This endpoint retrieves a list of existing Tasks. Filters can be applied.
      Parameters:
      request - the HTTP request
      filterParameter - the filter parameters
      filterCustomFields - the filter parameters regarding TaskCustomFields
      filterCustomIntFields - the filter parameters regarding TaskCustomIntFields * @param
      groupByParameter - the group by parameters
      sortParameter - the sort parameters
      pagingParameter - the paging parameters
      Returns:
      the Tasks with the given filter, sort and paging options.
    • getTask

      @GetMapping(path="/api/v1/tasks/{taskId}") @Transactional(readOnly=true, rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> getTask(@PathVariable("taskId") String taskId) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint retrieves a specific Task.
      Parameters:
      taskId - the Id of the requested Task
      Returns:
      the requested Task
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user is not authorized to get the requested Task.
    • claimTask

      @PostMapping(path="/api/v1/tasks/{taskId}/claim") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> claimTask(@PathVariable("taskId") String taskId, @RequestBody(required=false) String userName) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidOwnerException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException, pro.taskana.task.api.exceptions.InvalidTaskStateException
      This endpoint claims a Task if possible.
      Parameters:
      taskId - the Id of the Task which should be claimed
      userName - TODO: this is currently not used
      Returns:
      the claimed Task
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the state of the requested Task is not READY.
      pro.taskana.task.api.exceptions.InvalidOwnerException - if the Task is already claimed by someone else.
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no read permissions for the requested Task.
    • forceClaimTask

      @PostMapping(path="/api/v1/tasks/{taskId}/claim/force") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> forceClaimTask(@PathVariable("taskId") String taskId, @RequestBody(required=false) String userName) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.task.api.exceptions.InvalidOwnerException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint force claims a Task if possible even if it is already claimed by someone else.
      Parameters:
      taskId - the Id of the Task which should be force claimed
      userName - TODO: this is currently not used
      Returns:
      the force claimed Task
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the state of Task with taskId is in an END_STATE.
      pro.taskana.task.api.exceptions.InvalidOwnerException - cannot be thrown.
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no read permissions for the requested Task.
    • selectAndClaimTask

      @PostMapping(path="/api/v1/tasks/select-and-claim") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> selectAndClaimTask(TaskQueryFilterParameter filterParameter, TaskQueryFilterCustomFields filterCustomFields, TaskQueryFilterCustomIntFields filterCustomIntFields, TaskController.TaskQuerySortParameter sortParameter) throws pro.taskana.task.api.exceptions.InvalidOwnerException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint selects the first Task returned by the Task Query and claims it.
      Parameters:
      filterParameter - the filter parameters
      filterCustomFields - the filter parameters regarding TaskCustomFields
      filterCustomIntFields - the filter parameters regarding TaskCustomIntFields
      sortParameter - the sort parameters
      Returns:
      the claimed Task or 404 if no Task is found
      Throws:
      pro.taskana.task.api.exceptions.InvalidOwnerException - if the Task is already claimed by someone else
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no read permission for the Workbasket the Task is in
    • cancelClaimTask

      @DeleteMapping(path="/api/v1/tasks/{taskId}/claim") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> cancelClaimTask(@PathVariable("taskId") String taskId, @RequestParam(value="keepOwner",defaultValue="false") boolean keepOwner) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.task.api.exceptions.InvalidOwnerException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint cancels the claim of an existing Task if it was claimed by the current user before.
      Parameters:
      taskId - the Id of the requested Task.
      keepOwner - flag whether or not to keep the owner despite the cancel claim
      Returns:
      the unclaimed Task.
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the Task is already in an end state.
      pro.taskana.task.api.exceptions.InvalidOwnerException - if the Task is claimed by a different user.
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no read permission for the Workbasket the Task is in
    • forceCancelClaimTask

      @DeleteMapping(path="/api/v1/tasks/{taskId}/claim/force") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> forceCancelClaimTask(@PathVariable("taskId") String taskId, @RequestParam(value="keepOwner",defaultValue="false") boolean keepOwner) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.task.api.exceptions.InvalidOwnerException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint force cancels the claim of an existing Task.
      Parameters:
      taskId - the Id of the requested Task.
      keepOwner - flag whether or not to keep the owner despite the cancel claim
      Returns:
      the unclaimed Task.
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the Task is already in an end state.
      pro.taskana.task.api.exceptions.InvalidOwnerException - if the Task is claimed by a different user.
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no read permission for the Workbasket the Task is in
    • requestReview

      @PostMapping(path="/api/v1/tasks/{taskId}/request-review") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> requestReview(@PathVariable("taskId") String taskId) throws pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidOwnerException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint request a review on the specified Task.
      Parameters:
      taskId - taskId the id of the relevant Task
      Returns:
      the Task after a review has been requested
      Throws:
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the state of the Task with taskId is not CLAIMED
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the Task with taskId wasn't found
      pro.taskana.task.api.exceptions.InvalidOwnerException - if the Task is claimed by another user
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no READ permissions for the Workbasket the Task is in
    • forceRequestReview

      @PostMapping(path="/api/v1/tasks/{taskId}/request-review/force") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> forceRequestReview(@PathVariable("taskId") String taskId) throws pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidOwnerException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint force request a review on the specified Task.
      Parameters:
      taskId - taskId the id of the relevant Task
      Returns:
      the Task after a review has been requested
      Throws:
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the state of the Task with taskId is not CLAIMED
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the Task with taskId wasn't found
      pro.taskana.task.api.exceptions.InvalidOwnerException - cannot be thrown
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no READ permissions for the Workbasket the Task is in
    • requestChanges

      @PostMapping(path="/api/v1/tasks/{taskId}/request-changes") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> requestChanges(@PathVariable("taskId") String taskId) throws pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidOwnerException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint request changes on the specified Task.
      Parameters:
      taskId - the id of the relevant Task
      Returns:
      the Task after changes have been requested
      Throws:
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the state of the Task with taskId is not IN_REVIEW
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the Task with taskId wasn't found
      pro.taskana.task.api.exceptions.InvalidOwnerException - if the Task is claimed by another user
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no READ permissions for the Workbasket the Task is in
    • forceRequestChanges

      @PostMapping(path="/api/v1/tasks/{taskId}/request-changes/force") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> forceRequestChanges(@PathVariable("taskId") String taskId) throws pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidOwnerException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint force requests changes on a Task.
      Parameters:
      taskId - the Id of the Task on which a review should be requested
      Returns:
      the change requested Task
      Throws:
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the Task with taskId is in an end state
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the Task with taskId wasn't found
      pro.taskana.task.api.exceptions.InvalidOwnerException - cannot be thrown
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no READ permissions for the Workbasket the Task is in
    • completeTask

      @PostMapping(path="/api/v1/tasks/{taskId}/complete") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> completeTask(@PathVariable("taskId") String taskId) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidOwnerException, pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint completes a Task.
      Parameters:
      taskId - Id of the requested Task to complete.
      Returns:
      the completed Task
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.task.api.exceptions.InvalidOwnerException - if current user is not the owner of the Task or an administrator.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if Task wasn't claimed previously.
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no read permission for the Workbasket the Task is in
    • forceCompleteTask

      @PostMapping(path="/api/v1/tasks/{taskId}/complete/force") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> forceCompleteTask(@PathVariable("taskId") String taskId) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidOwnerException, pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint force completes a Task.
      Parameters:
      taskId - Id of the requested Task to force complete.
      Returns:
      the force completed Task
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.task.api.exceptions.InvalidOwnerException - cannot be thrown.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the state of the Task with taskId is TERMINATED or CANCELED
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no read permission for the Workbasket the Task is in
    • cancelTask

      @PostMapping(path="/api/v1/tasks/{taskId}/cancel") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> cancelTask(@PathVariable("taskId") String taskId) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException, pro.taskana.task.api.exceptions.InvalidTaskStateException
      This endpoint cancels a Task. Cancellation marks a Task as obsolete. The actual work the Task was referring to is no longer required
      Parameters:
      taskId - Id of the requested Task to cancel.
      Returns:
      the cancelled Task
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the task is not in state READY or CLAIMED
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no read permission for the Workbasket the Task is in
    • terminateTask

      @PostMapping(path="/api/v1/tasks/{taskId}/terminate") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> terminateTask(@PathVariable("taskId") String taskId) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.common.api.exceptions.NotAuthorizedException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint terminates a Task. Termination is an administrative action to complete a Task.
      Parameters:
      taskId - Id of the requested Task to terminate.
      Returns:
      the terminated Task
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the task is not in state READY or CLAIMED
      pro.taskana.common.api.exceptions.NotAuthorizedException - if the current user isn't an administrator (ADMIN/TASKADMIN)
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has not correct permissions
    • transferTask

      @PostMapping(path="/api/v1/tasks/{taskId}/transfer/{workbasketId}") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> transferTask(@PathVariable("taskId") String taskId, @PathVariable("workbasketId") String workbasketId, @RequestBody(required=false) Boolean setTransferFlag) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException, pro.taskana.task.api.exceptions.InvalidTaskStateException
      This endpoint transfers a given Task to a given Workbasket, if possible.
      Parameters:
      taskId - the Id of the Task which should be transferred
      workbasketId - the Id of the destination Workbasket
      setTransferFlag - sets the tansfer flag of the task (default: true)
      Returns:
      the successfully transferred Task.
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist
      pro.taskana.workbasket.api.exceptions.WorkbasketNotFoundException - if the requested Workbasket does not exist
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no authorization to transfer the Task.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if the Task is in a state which does not allow transferring.
    • updateTask

      @PutMapping(path="/api/v1/tasks/{taskId}") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> updateTask(@PathVariable("taskId") String taskId, @RequestBody TaskRepresentationModel taskRepresentationModel) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.classification.api.exceptions.ClassificationNotFoundException, pro.taskana.common.api.exceptions.InvalidArgumentException, pro.taskana.common.api.exceptions.ConcurrencyException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException, pro.taskana.task.api.exceptions.AttachmentPersistenceException, pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.task.api.exceptions.ObjectReferencePersistenceException
      This endpoint updates a requested Task.
      Parameters:
      taskId - the Id of the Task which should be updated
      taskRepresentationModel - the new Task for the requested id.
      Returns:
      the updated Task
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.classification.api.exceptions.ClassificationNotFoundException - if the updated Classification does not exist.
      pro.taskana.common.api.exceptions.InvalidArgumentException - if any semantically invalid parameter was provided
      pro.taskana.common.api.exceptions.ConcurrencyException - if the Task has been updated by a different process in the meantime
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user is not authorized.
      pro.taskana.task.api.exceptions.AttachmentPersistenceException - if the modified Task contains two attachments with the same id.
      pro.taskana.task.api.exceptions.ObjectReferencePersistenceException - if the modified Task contains two object references with the same id.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - if an attempt is made to change the owner of the Task and the Task is not in state READY.
    • setTaskRead

      @PostMapping(path="/api/v1/tasks/{taskId}/set-read") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> setTaskRead(@PathVariable("taskId") String taskId, @RequestBody IsReadRepresentationModel isRead) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException
      This endpoint sets the 'isRead' property of a Task.
      Parameters:
      taskId - Id of the requested Task to set read or unread.
      isRead - if true, the Task property isRead is set to true, else it's set to false
      Returns:
      the updated Task
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has no read permission for the Workbasket the Task is in
    • deleteTask

      @DeleteMapping(path="/api/v1/tasks/{taskId}") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> deleteTask(@PathVariable("taskId") String taskId) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.common.api.exceptions.NotAuthorizedException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException, pro.taskana.task.api.exceptions.InvalidCallbackStateException
      This endpoint deletes a Task.
      Parameters:
      taskId - the Id of the Task which should be deleted.
      Returns:
      the deleted Task.
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - If the Task is not in an END_STATE
      pro.taskana.common.api.exceptions.NotAuthorizedException - if the current user isn't an administrator (ADMIN)
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has not correct permissions
      pro.taskana.task.api.exceptions.InvalidCallbackStateException - some comment
    • forceDeleteTask

      @DeleteMapping(path="/api/v1/tasks/{taskId}/force") @Transactional(rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskRepresentationModel> forceDeleteTask(@PathVariable("taskId") String taskId) throws pro.taskana.task.api.exceptions.TaskNotFoundException, pro.taskana.task.api.exceptions.InvalidTaskStateException, pro.taskana.common.api.exceptions.NotAuthorizedException, pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException, pro.taskana.task.api.exceptions.InvalidCallbackStateException
      This endpoint force deletes a Task even if it's not completed.
      Parameters:
      taskId - the Id of the Task which should be force deleted.
      Returns:
      the force deleted Task.
      Throws:
      pro.taskana.task.api.exceptions.TaskNotFoundException - if the requested Task does not exist.
      pro.taskana.task.api.exceptions.InvalidTaskStateException - If the Task is not TERMINATED or CANCELLED and the Callback state of the Task is CALLBACK_PROCESSING_REQUIRED
      pro.taskana.common.api.exceptions.NotAuthorizedException - if the current user isn't an administrator (ADMIN) Task.
      pro.taskana.workbasket.api.exceptions.NotAuthorizedOnWorkbasketException - if the current user has not correct
      pro.taskana.task.api.exceptions.InvalidCallbackStateException - some comment
    • deleteTasks

      @DeleteMapping(path="/api/v1/tasks") @Transactional(readOnly=true, rollbackFor=java.lang.Exception.class) public org.springframework.http.ResponseEntity<TaskSummaryCollectionRepresentationModel> deleteTasks(TaskQueryFilterParameter filterParameter, TaskQueryFilterCustomFields filterCustomFields, TaskQueryFilterCustomIntFields filterCustomIntFields) throws pro.taskana.common.api.exceptions.InvalidArgumentException, pro.taskana.common.api.exceptions.NotAuthorizedException
      This endpoint deletes an aggregation of Tasks and returns the deleted Tasks. Filters can be applied.
      Parameters:
      filterParameter - the filter parameters
      filterCustomFields - the filter parameters regarding TaskCustomFields
      filterCustomIntFields - the filter parameters regarding TaskCustomIntFields
      Returns:
      the deleted task summaries
      Throws:
      pro.taskana.common.api.exceptions.InvalidArgumentException - TODO: this is never thrown
      pro.taskana.common.api.exceptions.NotAuthorizedException - if the current user is not authorized to delete the requested Tasks.