[midPoint-git] [Evolveum/midpoint] 158a0d: Fix archetype handling (mainly for linked objects)

mederly noreply at github.com
Thu Sep 22 19:22:52 CEST 2022


  Branch: refs/heads/master
  Home:   https://github.com/Evolveum/midpoint
  Commit: 158a0dce015e290855d9abda4e6806c06f1f8d6d
      https://github.com/Evolveum/midpoint/commit/158a0dce015e290855d9abda4e6806c06f1f8d6d
  Author: Pavol Mederly <mederly at evolveum.com>
  Date:   2022-09-22 (Thu, 22 Sep 2022)

  Changed paths:
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/component/data/column/ColumnUtils.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/reports/PageCreatedReports.java
    M gui/admin-gui/src/main/java/com/evolveum/midpoint/web/page/admin/server/TaskSummaryPanel.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/ObjectTypeUtil.java
    M infra/schema/src/main/java/com/evolveum/midpoint/schema/util/cases/CaseTypeUtil.java
    M model/cases-impl/src/main/java/com/evolveum/midpoint/cases/impl/engine/CaseEngineOperationImpl.java
    M model/cases-impl/src/main/java/com/evolveum/midpoint/cases/impl/helpers/CaseManagementHelper.java
    M model/model-api/src/main/java/com/evolveum/midpoint/model/api/expr/MidpointFunctions.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/LinkManager.java
    M model/model-common/src/main/java/com/evolveum/midpoint/model/common/archetypes/ArchetypeDeterminer.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/expr/LinkedObjectsFunctions.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/expr/MidpointFunctionsImpl.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/expr/OrgStructFunctionsImpl.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/LensFocusContext.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/scriptExecutor/LinkSourceFinder.java
    M model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/lens/projector/policy/scriptExecutor/LinkTargetFinder.java
    M model/model-impl/src/test/java/com/evolveum/midpoint/model/impl/lens/TestPolicyStateRecording.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestActivation.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestIndexing.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestLinkedObjects.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestMemberRecompute.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestModelServiceContract.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestNotifications.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/TestStrangeCases.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/archetypes/TestArchetypes.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/mapping/TestMapping.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/mapping/TestMappingInbound.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/multi/TestMultiAccount.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/password/AbstractPasswordTest.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/rbac/TestRbac.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/rbac/TestSegregationOfDuties.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/scripting/TestScriptingBasicNew.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/sync/TestImportRecon.java
    M model/model-intest/src/test/java/com/evolveum/midpoint/model/intest/tasks/TestProgressReporting.java
    M model/model-intest/src/test/resources/linked/gummi/archetype-device.xml
    A model/model-intest/src/test/resources/linked/gummi/archetype-dummy.xml
    M model/model-test/src/main/java/com/evolveum/midpoint/model/test/AbstractModelIntegrationTest.java
    M model/model-test/src/main/java/com/evolveum/midpoint/model/test/asserter/AssignmentAsserts.java
    M model/model-test/src/main/java/com/evolveum/midpoint/model/test/util/ImportSingleAccountRequest.java
    M model/report-impl/src/main/java/com/evolveum/midpoint/report/impl/ReportManagerImpl.java
    M model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/execution/ExecutionHelper.java
    M model/workflow-impl/src/main/java/com/evolveum/midpoint/wf/impl/processors/StartInstruction.java
    M model/workflow-impl/src/test/java/com/evolveum/midpoint/wf/impl/other/TestSequence.java
    M testing/story/src/test/java/com/evolveum/midpoint/testing/story/TestResourceInMaintenance.java
    M testing/story/src/test/java/com/evolveum/midpoint/testing/story/async/TestAsyncProvisioning.java

  Log Message:
  -----------
  Fix archetype handling (mainly for linked objects)

The code for determination of focus archetype in findLinkedSource,
findLinkedTarget and related methods was too simplistic. It failed
(in different ways) in situations when focus archetype was changed.

Changes in this commit:

1. Code for links resolution has been fixed. Although still not
perfect, it now looks for link definitions in new, current, and
old version of the focus; to cover definitions in both old and new
archetypes. This will work unless there are conflicting link
definitions in old and new archetypes.

2. The algorithm for archetype determination (in ArchetypeDeterminer)
has been simplified by ignoring values of archetypeRef. We kept
considering these values for a long time, mainly because originally
that was the primary mean of defining the archetype. But currently it
causes more troubles than benefits. So, from now on we look only at
archetype assignments in this class. (There are still some places
that look on archetypeRef, but they should NOT be used during clockwork,
when there may be inconsistencies between archetypeRef and assignments.)

Related to this, ObjectTypeUtil.hasArchetype was renamed to
ObjectTypeUtil.hasArchetypeRef, to emphasize the fact it uses
archetypeRef values to determine the result.

3. Determination of "source-linked" objects failed when the focus
OID was null. This is now fixed.

This should fix MID-8060 and MID-8059.




More information about the midPoint-svn mailing list