Recompute Task

Last modified 13 Sep 2024 16:57 +02:00

The responsibility of the recompute task is to process the focal objects (e.g. users), recompute their state with respect to all applicable policies and update any data that need to be updated.

By default, the recompute task will recompute everything that is can, including projections. This means that all accounts will be retrieved, reconciled and updated as needed. When necessary, fine-tuning of recomputed elements may be configured using recompute options.

Example

Recompute Users Task
<task>
    <name>Recompute all users</name>
    <description>This task recomputes all users in midPoint.</description>
    <assignment>
        <targetRef oid="00000000-0000-0000-0000-000000000502" relation="org:default" type="c:ArchetypeType"/>
    </assignment>
    <ownerRef oid="00000000-0000-0000-0000-000000000002" relation="org:default" type="c:UserType"/>
    <executionState>closed</executionState>
    <activity>
        <work>
            <recomputation>
                <objects>
                    <type>UserType</type>
                </objects>
            </recomputation>
        </work>
    </activity>
</task>

Recompute vs Reconciliation

At the first sight recompute does almost the same job as reconciliation. But there are important differences:

  • Recompute tasks are iterating over focal objects (users, roles, …​). Reconciliation tasks are iterating over resource objects (accounts, groups). Recompute has very little chance to find new resource objects. In fact that can only happen by the slim chance if recompute triggers creation of a new resource object and that object already exists.

  • Reconciliation is a multi-stage operation: it is trying to finish unfinished operations, then list all the resource objects and recompute them and then remove all shadows that do not have corresponding resource object. On the other hand recompute is a single-stage task that only iterates over the objects once.

  • The goal of a reconciliation is to make sure that data stored in a particular resource are consistence with midPoint. The primary purpose of reconciliation is to "fix" particular resource. The purpose of recompute is to make sure that internal midPoint data are consistent. Recompute may change the resources (and it really does that in default setting). But that is not the primary purpose. It is rather a side effect of updating and re-evaluating focal objects.

Recompute Options

MidPoint has an ability to fine-tune the recompute process by specifying the model execution options. This can be used to control whether the recompute process triggers reconciliation, what particular parts of the clockwork and projector computation will take place and so on.

Handle with care!

These options give very good control over the recompute process. However, not all combinations of the settings are meaningful. Some of the combinations may lead to errors and few combinations may even be dangerous and they may destroy data. When using this approach please make sure you know what you are doing. Test the configuration well in the development environment before using on any valuable data. There is a real danger of data loss and damages. Use with utmost care.

The following example shows configuration for light recompute - recompute process that only updates the internal integrity of the focal object and does not touch the projections:

Recompute Users Task - light recompute
<task>
    <name>Recompute all users - light recompute</name>
    <description>This task recomputes all users in midPoint.
        It updates the internal integrity of midPoint users only and does not touch the projections.
    </description>
    <assignment>
        <targetRef oid="00000000-0000-0000-0000-000000000502" relation="org:default" type="c:ArchetypeType"/>
    </assignment>
    <ownerRef oid="00000000-0000-0000-0000-000000000002" relation="org:default" type="c:UserType"/>
    <executionState>closed</executionState>
    <activity>
        <work>
            <recomputation>
                <objects>
                    <type>UserType</type>
                </objects>
                <executionOptions>
                    <partialProcessing>
                        <inbound>skip</inbound>
                        <objectTemplateBeforeAssignments>skip</objectTemplateBeforeAssignments>
                        <objectTemplateAfterAssignments>skip</objectTemplateAfterAssignments>
                        <projection>skip</projection>
                        <outbound>skip</outbound>
                        <approvals>skip</approvals>
                    </partialProcessing>
                </executionOptions>
            </recomputation>
        </work>
    </activity>
</task>
Was this page helpful?
YES NO
Thanks for your feedback