Package pro.taskana.spi.priority.api
Interface PriorityServiceProvider
public interface PriorityServiceProvider
The PriorityServiceProvider allows to determine the priority of a Task according to
custom logic.
-
Method Summary
Modifier and TypeMethodDescriptioncalculatePriority(TaskSummary taskSummary) Determine the priority of a certain Task during execution of TaskService.createTask(Task) and TaskService.updateTask(Task).default voidinitialize(TaskanaEngine taskanaEngine) Provide the active TaskanaEngine which is initialized for this TASKANA installation.
-
Method Details
-
initialize
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
-
calculatePriority
Determine the priority of a certain Task during execution of TaskService.createTask(Task) and TaskService.updateTask(Task). This priority overwrites the priority from Classification-driven logic.The implemented method must calculate the priority efficiently. There can be a huge amount of Tasks the SPI has to handle.
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) or TaskService.updateTask(Task).
- Parameters:
taskSummary- the TaskSummary to compute the priority for- Returns:
- the computed priority
-