public interface AssignmentStrategy
Modifier and Type | Method and Description |
---|---|
Assignment |
apply(org.kie.api.task.model.Task task,
org.kie.api.task.TaskContext context,
String excludedUser)
Applies the strategy on given task based on concrete implementation details.
|
String |
getIdentifier()
Returns unique identifier of the strategy
|
default void |
taskDone(org.kie.api.task.model.Task task,
org.kie.api.task.TaskContext context)
Optional method that notifies the strategy about task being done (completed, exited, etc).
|
String getIdentifier()
Assignment apply(org.kie.api.task.model.Task task, org.kie.api.task.TaskContext context, String excludedUser)
task
- task that should be assignedcontext
- task context to be able to use various services including PersistenceContextexcludedUser
- user that should be excluded from the assignment as it's the one who performed operation
e.g. use who has been assigned to the task and released should not be reassign to it againdefault void taskDone(org.kie.api.task.model.Task task, org.kie.api.task.TaskContext context)
task
- task that has been donecontext
- task context to be able to use various services including PersistenceContextCopyright © 2001–2018 JBoss by Red Hat. All rights reserved.