Interface TaskRoutingProvider


public interface TaskRoutingProvider
The TaskRoutingProvider allows to determine the Workbasket for a Task that has no Workbasket on creation.
  • Method Details

    • initialize

      void initialize(TaskanaEngine taskanaEngine)
      Provide the active TaskanaEngine which is initialized for this TASKANA installation.

      This method is called during TASKANA startup and allows the service provider to store the active TaskanaEngine for later usage.

      Parameters:
      taskanaEngine - the active TaskanaEngine which is initialized for this installation
    • determineWorkbasketId

      String determineWorkbasketId(Task task)
      Determine the id of the Workbasket for a given Task.This method will be invoked by TASKANA when it is asked to create a Task that has no Workbasket assigned.

      If more than one TaskRoutingProvider class is registered, TASKANA calls them all and uses their results only if they agree on the Workbasket. This is, if more than one ids are returned, TASKANA uses them only if they are identical. If different ids are returned, the Task will not be created.

      If the Workbasket cannot be computed, the method should return NULL. If every registered TaskRoutingProvider return NULL, the Task will not be created

      The behaviour is undefined if this method tries to apply persistent changes to any entity.

      This SPI is executed with the same UserPrincipal and GroupPrincipal as in TaskService.createTask(Task).

      Parameters:
      task - the Task for which a Workbasket must be determined
      Returns:
      the id of the Workbasket