Class ActivityBasedTaskHandler
java.lang.Object
com.evolveum.midpoint.repo.common.activity.run.task.ActivityBasedTaskHandler
- All Implemented Interfaces:
TaskHandler
Handler for tasks that are based on activity (activities) definition.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
getBeans()
@NotNull StatisticsCollectionStrategy
TODO decide what to do with this method.void
void
onNodeDown
(@NotNull TaskType taskBean, @NotNull OperationResult result) Should update the state of the task (or related tasks) when the node on which this task executed was found down.void
onTaskStalled
(@NotNull RunningTask task, long stalledSince, @NotNull OperationResult result) Should update the state of the task when the task manager finds that the task is stalled, i.e. did not update its progress for a given (long) time.void
refreshStatus
(Task task) TODO decide what to do with this method.run
(@NotNull RunningTask localCoordinatorTask) Main entry point.void
setAvoidAutoAssigningArchetypes
(boolean avoidAutoAssigningArchetypes) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.task.api.TaskHandler
getDefaultChannel
-
Field Details
-
HANDLER_URI
- See Also:
-
-
Constructor Details
-
ActivityBasedTaskHandler
public ActivityBasedTaskHandler()
-
-
Method Details
-
initialize
@PostConstruct public void initialize() -
destroy
@PreDestroy public void destroy() -
getBeans
-
run
Main entry point. We basically delegate all the processing to aTaskRun
object.- Specified by:
run
in interfaceTaskHandler
- Throws:
TaskException
-
getStatisticsCollectionStrategy
- Specified by:
getStatisticsCollectionStrategy
in interfaceTaskHandler
-
heartbeat
TODO decide what to do with this method.- Specified by:
heartbeat
in interfaceTaskHandler
-
refreshStatus
TODO decide what to do with this method.- Specified by:
refreshStatus
in interfaceTaskHandler
-
setAvoidAutoAssigningArchetypes
public void setAvoidAutoAssigningArchetypes(boolean avoidAutoAssigningArchetypes) -
onNodeDown
public void onNodeDown(@NotNull @NotNull TaskType taskBean, @NotNull @NotNull OperationResult result) throws SchemaException, ObjectNotFoundException Description copied from interface:TaskHandler
Should update the state of the task (or related tasks) when the node on which this task executed was found down. Currently this means releasing buckets allocated to this task. In the future we plan to execute this method within a dynamic repo transaction.- Specified by:
onNodeDown
in interfaceTaskHandler
- Throws:
SchemaException
ObjectNotFoundException
-
onTaskStalled
public void onTaskStalled(@NotNull @NotNull RunningTask task, long stalledSince, @NotNull @NotNull OperationResult result) throws CommonException Description copied from interface:TaskHandler
Should update the state of the task when the task manager finds that the task is stalled, i.e. did not update its progress for a given (long) time.- Specified by:
onTaskStalled
in interfaceTaskHandler
- Throws:
CommonException
-