[midPoint-git] [Evolveum/midpoint] 93829b: Consider correlated focusses when suggesting mappings
Andrej
noreply at github.com
Thu Apr 2 09:01:39 CEST 2026
Branch: refs/heads/master
Home: https://github.com/Evolveum/midpoint
Commit: 93829b0f7bc3871f1c0a6e33bf88b8e28ac8ba34
https://github.com/Evolveum/midpoint/commit/93829b0f7bc3871f1c0a6e33bf88b8e28ac8ba34
Author: Andrej Zan <andrej.zan at evolveum.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)
Changed paths:
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/OwnedShadowsProviderFromResource.java
M model/smart-impl/src/test/java/com/evolveum/midpoint/smart/impl/TestMappingsSuggestionOperation.java
Log Message:
-----------
Consider correlated focusses when suggesting mappings
**What**
When shadow-owner (focus) pairs are searched during the process of
suggesting mappings, consider not only linked focuses, but also
correlated focuses (if any).
**Why**
We want to add automatic correlation process before running suggesting
mappings, because requiring linked owners is too strict requirement.
The correlation alone is harmless, because the data about correlated
users are only informational. But for purposes of mappings suggestions
they can replace the need for linked users.
This works only if there is certain "owner candidate", i.e. there is one
resulting owner candidate.
**Task**: 11112
Commit: ed68f0db89c6f26f882528bce54669fb2a78ea20
https://github.com/Evolveum/midpoint/commit/ed68f0db89c6f26f882528bce54669fb2a78ea20
Author: Andrej Zan <andrej.zan at evolveum.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)
Changed paths:
A model/model-api/src/main/java/com/evolveum/midpoint/model/api/correlation/CorrelationDefinitionProvider.java
A model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/correlation/ResourceCorrelationDefinitionProvider.java
R model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/correlator/tasks/CorrelationDefinitionProvider.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/correlator/tasks/CorrelationDefinitionProviderFactory.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/correlator/tasks/CorrelationWorkDefinition.java
R model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/correlator/tasks/ResourceCorrelationDefinitionProvider.java
M model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/correlator/tasks/CorrelationDefinitionProviderFactoryTest.java
M model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/correlator/tasks/ResourceCorrelationDefinitionProviderTest.java
M model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/util/mock/MockFactory.java
A model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/util/mock/RepositoryServiceMock.java
Log Message:
-----------
Refactor and move classes providing correlation definitions
**What**
Slightly refactor and move interface and one of its implementation,
which allows to read correlation definition from resource.
**Why**
The `ResourceCorrelationDefinitionProvider` implementation of a provider
can read the correlation definition from a resource, considering most,
if not all places where the correlation can be defined (legacy
synchronization, definitions in schema handling and also directly in
attribute).
We will need this functionality also outside of the correlation
simulation task, so I have moved it to more appropriate place.
**Task**: 11112
Commit: 065dc4e11c4caa34aa52a8b6174aca9ae194199a
https://github.com/Evolveum/midpoint/commit/065dc4e11c4caa34aa52a8b6174aca9ae194199a
Author: Andrej Zan <andrej.zan at evolveum.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)
Changed paths:
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/MappingSuggestionOperationFactory.java
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/MappingsSuggestionOperation.java
R model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/OwnedShadowsProvider.java
R model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/OwnedShadowsProviderFromResource.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/ShadowsWithOwnersCorrelatingProvider.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/ShadowsWithOwnersProvider.java
R model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/OwnedShadow.java
A model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/ShadowWithOwner.java
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/ValuesPairSample.java
M model/smart-impl/src/test/java/com/evolveum/midpoint/smart/impl/TestMappingsSuggestionOperation.java
M model/smart-impl/src/test/java/com/evolveum/midpoint/smart/impl/TestSystemMappingsSuggestion.java
Log Message:
-----------
Correlate shadows before suggesting mappings
**What**
Run a correlation process before suggesting mappings, if the shadow
owner, or owner candidate is unknown.
**Why**
To correctly suggest mappings by LLM, we need to provide some sample
data. To get these sample we need to "pair" the shadow and its owner (or
owner candidate). To do that we either need to have the focuses already
linked or at least correlated with the shadows.
We want to eliminate the need of doing extra manual synchronization in
order to link the shadows with users. To do that, we run the correlation
process automatically, if no owner (linked focus) or owner candidate
(correlated focus) exists yet.
**Limitations**
The automatic correlation works only with the correlators already
defined in the resource. It does not work with correlators, which are
only suggested.
**Task**: 11112
Commit: 80297330e98773c47a88492e15f98f0e02e2ad33
https://github.com/Evolveum/midpoint/commit/80297330e98773c47a88492e15f98f0e02e2ad33
Author: Andrej Zan <andrej.zan at evolveum.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)
Changed paths:
M model/model-api/src/main/java/com/evolveum/midpoint/model/api/correlation/CorrelationService.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/correlation/CorrelationServiceImpl.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/mappings/tasks/MappingSimulationActivityRun.java
M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/tasks/TestMappingSimulationTask.java
M model/model-intest/src/test/resources/tasks/mapping-simulation/accounts.csv
M model/model-intest/src/test/resources/tasks/mapping-simulation/dummy-resource.xml
M model/model-intest/src/test/resources/tasks/mapping-simulation/users.xml
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/ShadowsWithOwnersCorrelatingProvider.java
M repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/DummyTestResource.java
M repo/repo-test-util/src/main/java/com/evolveum/midpoint/test/TestResourceAccounts.java
Log Message:
-----------
Correlate before suggesting mappings and mapping simulation
**What**
If now linked/correlated owner of the shadow exists yet, tries to
correlate it by running the correlation process.
**Why**
In order to generate good suggestions for mappings, we need data from
the shadow - owner (focus) pairs. Before this change we had to manually
run the synchronization task (or any task which links users to
accounts). With this change it is no more needed, it will be done
automatically.
We also need the owner of the shadow in mappings simulation. So we
run correlation also there (if needed).
**Notes**
This change also does:
- Improve tests a bit by adding documentation and linking accounts per
test (not globally in init method) and only for accounts expected by
the particular test.
- Remove one `@NotNull` annotation introduced by mistake in some of my
previous commits.
- Remove unnecessary code from `DummyTestResource`
**Task**: 11112
Commit: f8913445fb6930b4c37e9b71f63176d1ffe8f8cd
https://github.com/Evolveum/midpoint/commit/f8913445fb6930b4c37e9b71f63176d1ffe8f8cd
Author: Andrej Zan <andrej.zan at evolveum.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)
Changed paths:
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/correlation/ResourceCorrelationDefinitionProvider.java
M model/smart-impl/src/main/java/com/evolveum/midpoint/smart/impl/mappings/ShadowWithOwner.java
M model/smart-impl/src/test/java/com/evolveum/midpoint/smart/impl/TestMappingsSuggestionOperation.java
Log Message:
-----------
Address few issues in the code.
**What**
- Add JavaDoc to one of the classes to make it more clear what it does.
- Fix potential NPE.
- Use item factory to create prism reference value instead of direct
constructor.
**Why**
The item factory is used to not rely on implementation details of the
prism objects (in a broad sense not the `PrismObject` directly).
**Task**: 11112
Commit: 96b516ba6ac2bec6671c61c923df31de3375bfba
https://github.com/Evolveum/midpoint/commit/96b516ba6ac2bec6671c61c923df31de3375bfba
Author: Andrej Zan <andrej.zan at evolveum.com>
Date: 2026-04-02 (Thu, 02 Apr 2026)
Changed paths:
M model/model-api/src/main/java/com/evolveum/midpoint/model/api/correlation/CompleteCorrelationResult.java
M model/model-api/src/main/java/com/evolveum/midpoint/model/api/correlation/CorrelationService.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/correlation/CorrelationServiceImpl.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/correlator/tasks/CorrelationSimulationActivityRun.java
M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/sync/CorrelationProcessing.java
M model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/correlator/tasks/CorrelationServiceTest.java
Log Message:
-----------
Store correlation result when searching shadow owner
**What**
Persist correlation result to the shadow if correlation is executed
while searching for the shadow owner.
**Why**
We want it mainly to avoids unnecessary re-correlation in future
searches.
**Notes**
This commit moves the delta creation logic into the
`CompleteCorrelationResult` class, because now we have more places where
we need to construct the delta (correlation simulation and correlation
processing - sync task).
The new builder pattern was introduced to create complete correlation
results, because of its increased complexity.
**Task**: 11112
Compare: https://github.com/Evolveum/midpoint/compare/e0198e18565e...96b516ba6ac2
To unsubscribe from these emails, change your notification settings at https://github.com/Evolveum/midpoint/settings/notifications
More information about the midPoint-svn
mailing list