[midPoint-git] [Evolveum/midpoint] 8a7426: Add rudimentary activity state maintenance
mederly
noreply at github.com
Mon Jun 7 22:31:45 CEST 2021
Branch: refs/heads/feature/task-part-restructuring
Home: https://github.com/Evolveum/midpoint
Commit: 8a742685bf8495b0cafb7d14831907f8379b1a76
https://github.com/Evolveum/midpoint/commit/8a742685bf8495b0cafb7d14831907f8379b1a76
Author: Pavol Mederly <mederly at evolveum.com>
Date: 2021-06-04 (Fri, 04 Jun 2021)
Changed paths:
M infra/schema/src/main/java/com/evolveum/midpoint/schema/statistics/IterativeOperationStartInfo.java
M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/task/BucketsProgressInformation.java
M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/task/TaskPartProgressInformation.java
M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/task/TaskWorkStateUtil.java
M infra/schema/src/main/resources/xml/ns/public/common/common-tasks-3.xsd
M infra/schema/src/test/resources/statistics/task-aggregation-child-1.xml
M infra/schema/src/test/resources/statistics/task-aggregation-root.xml
M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/sync/TestReconTaskMultithreaded.java
M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/sync/TestReconTaskPartitioned.java
M model/model-test/src/main/java/com/evolveum/midpoint/model/test/AbstractModelIntegrationTest.java
R model/model-test/src/main/java/com/evolveum/midpoint/model/test/TaskFinishChecker.java
M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/task/PropagationActivityExecution.java
M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/task/PropagationActivityHandler.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/Activity.java
A repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/ActivityState.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/ExecutionSupplier.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/execution/AbstractActivityExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/execution/AbstractCompositeActivityExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/execution/ActivityExecutionResult.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/execution/PureCompositeActivityExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/handlers/ActivityHandler.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/handlers/PureCompositeActivityHandler.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/AbstractIterativeActivityExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/AbstractSearchIterativeActivityExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/AbstractSearchIterativeItemProcessor.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/CommonTaskBeans.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/ItemProcessingGatekeeper.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/ItemProcessingRequest.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/ObjectProcessingRequest.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/task/GenericTaskExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/work/BucketOperation.java
A repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/work/BucketingManager.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/work/CompleteBucketOperation.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/work/GetBucketOperation.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/work/ReleaseBucketOperation.java
R repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/work/WorkStateManager.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/TestActivities.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/TestBucketManagement.java
A repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/AbstractMockActivityHandler.java
A repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/CommonMockActivityHelper.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/composite/CompositeMockActivityExecution.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/composite/CompositeMockActivityHandler.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/composite/MockComponentActivityExecution.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/iterative/IterativeMockActivityExecution.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/iterative/IterativeMockActivityHandler.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/search/SearchIterativeMockActivityExecution.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/search/SearchIterativeMockActivityHandler.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/simple/SimpleMockActivityExecution.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/simple/SimpleMockActivityHandler.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/simple/SimpleMockWorkDefinition.java
M repo/repo-common/src/test/resources/schema/extension.xsd
R repo/repo-common/src/test/resources/tasks/activities/task-190-subtask.xml
A repo/repo-common/src/test/resources/tasks/activities/task-190-suspending-composite.xml
A repo/repo-common/src/test/resources/tasks/activities/task-200-subtask.xml
R repo/repo-common/src/test/resources/tasks/activities/task-200-suspending-composite.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-100.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-110.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-120.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-130.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-140.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-150.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-200-c.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-200-w.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-210-1.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-210-2.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-210-3.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-210-4.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-210-5.xml
M repo/repo-common/src/test/resources/tasks/buckets/task-210-c.xml
M repo/repo-sql-impl-test/src/test/java/com/evolveum/midpoint/repo/sql/ConcurrencyTest.java
M repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/AbstractIntegrationTest.java
A repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/TaskFinishChecker.java
M repo/task-api/src/main/java/com/evolveum/midpoint/task/api/Task.java
M repo/task-api/src/main/java/com/evolveum/midpoint/task/api/test/NullTaskImpl.java
M repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/TaskQuartzImpl.java
M repo/task-quartz-impl/src/test/java/com/evolveum/midpoint/task/quartzimpl/TestTaskManagerBasic.java
Log Message:
-----------
Add rudimentary activity state maintenance
Here we introduced ActivityState class that provides the support for
maintaining state of activities - both common items and activity-
specific ones.
Also:
- renamed "work state" things to "activity state", reserving the
term "work state" to the state of the business aspect (~ the work)
of an activity;
- renamed WorkStateManager to BucketingManager;
- moved some of task assertion methods to AbstractIntegrationTest.
Commit: 090b1cf161dfd1360742ca4ddaad1a3ea8082a1d
https://github.com/Evolveum/midpoint/commit/090b1cf161dfd1360742ca4ddaad1a3ea8082a1d
Author: Pavol Mederly <mederly at evolveum.com>
Date: 2021-06-07 (Mon, 07 Jun 2021)
Changed paths:
M infra/prism-impl/src/main/java/com/evolveum/midpoint/prism/impl/delta/ItemDeltaImpl.java
M infra/schema/src/main/resources/xml/ns/public/common/common-core-3.xsd
M infra/schema/src/main/resources/xml/ns/public/common/common-tasks-3.xsd
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/sync/tasks/AsyncUpdateTaskHandler.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/sync/tasks/LiveSyncTaskHandler.java
M model/model-test/src/main/java/com/evolveum/midpoint/model/test/AbstractModelIntegrationTest.java
M provisioning/provisioning-impl/src/main/java/com/evolveum/midpoint/provisioning/impl/shadows/task/PropagationActivityExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/Activity.java
A repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/ActivityExecutionException.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/ActivityState.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/definition/ActivityControlFlowDefinition.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/definition/ActivityDefinition.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/execution/AbstractActivityExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/execution/AbstractCompositeActivityExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/execution/ActivityExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/execution/ActivityExecutionResult.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/activity/handlers/ActivityHandler.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/AbstractIterativeActivityExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/AbstractSearchIterativeActivityExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/ErrorHandlingStrategyExecutor.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/ErrorState.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/ItemProcessingGatekeeper.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/TaskExceptionHandlingUtil.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/task/GenericTaskExecution.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/task/GenericTaskHandler.java
M repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/task/task/TaskExecution.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/TestActivities.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/AbstractMockActivityHandler.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/CommonMockActivityHelper.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/iterative/IterativeMockActivityExecution.java
M repo/repo-common/src/test/java/com/evolveum/midpoint/repo/common/tasks/handlers/search/SearchIterativeMockActivityExecution.java
M repo/repo-common/src/test/resources/logback-test.xml
M repo/repo-common/src/test/resources/schema/extension.xsd
M repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/AbstractIntegrationTest.java
R repo/task-api/src/main/java/com/evolveum/midpoint/task/api/StopHandlerExecutionException.java
M repo/task-api/src/main/java/com/evolveum/midpoint/task/api/Task.java
M repo/task-api/src/main/java/com/evolveum/midpoint/task/api/TaskException.java
M repo/task-api/src/main/java/com/evolveum/midpoint/task/api/TaskHandler.java
M repo/task-api/src/main/java/com/evolveum/midpoint/task/api/TaskRunResult.java
M repo/task-api/src/main/java/com/evolveum/midpoint/task/api/test/NullTaskImpl.java
M repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/TaskQuartzImpl.java
M repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/run/BucketAwareHandlerExecution.java
M repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/run/HandlerExecutor.java
M repo/task-quartz-impl/src/main/java/com/evolveum/midpoint/task/quartzimpl/run/TaskCycleExecutor.java
Log Message:
-----------
Add simple activity error handling
1. ErrorHandlingStrategyExecutor takes activity-level error handling
strategy into account.
2. Exception handling in activities was streamlined.
3. Added policyThreshold error category.
4. Avoiding re-running already executed activities when resumed.
Also:
- Improvements/fixes in work state handling code.
- Moved more task-related test method to AbstractIntegrationTest.
BEHAVIOR CHANGE:
- When single-run tasks encounter permanent error, they now suspend
themselves instead of closing. The reason is that the task may comprise
of several activities, so it may be reasonable to suspend+resume it.
- The prism item cleanup after delta application was fixed so that
we no longer remove empty PCVs. (Only items with no values.)
Compare: https://github.com/Evolveum/midpoint/compare/1836343f2045...090b1cf161df
More information about the midPoint-svn
mailing list