Package pro.taskana.spi.task.api
Interface ReviewRequiredProvider
public interface ReviewRequiredProvider
The ReviewRequiredProvider allows to determine whether a Task requires a review
instead of completion.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidinitialize(TaskanaEngine taskanaEngine) Provide the active TaskanaEngine which is initialized for this TASKANA installation.booleanreviewRequired(Task task) Determine if a Task has to be reviewed instead of completed before TaskService.completeTask(String) is executed.
-
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
-
reviewRequired
Determine if a Task has to be reviewed instead of completed before TaskService.completeTask(String) is executed.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.completeTask(String).
- Parameters:
task- the Task before TaskService.completeTask(String) has started- Returns:
- true, if TaskService.requestReview(String) should be executed instead of TaskService.completeTask(String). False, if TaskService.completeTask(String) can be executed regularly
-