[midPoint] inbound to outbound synchronization

kajetan parzyszek kajetan at icrypto.com
Tue Dec 21 10:21:39 CET 2021


Hi,



sadly that didn't make any difference.



I might add that on the results page I can see that the account on Resource1 is processed then the flow goes back to processing projections on focus and then only the account on Resource2 is created.



Same story for history of User: first is Discovery for account on Resource1 with Modify User containing new 'data', and as a last history item is Add object where Resource2 account shadow is added, when checking 'View object data' for that step the 'data' is on user.



Forgot to mention midpoint version, it's 4.0.3.



Raw history from user is as follows:

<operationExecution id="2">

        <timestamp>2021-12-21T09:18:24.027Z</timestamp>

        <operation>

            <objectDelta>

                <t:changeType>modify</t:changeType>

                <t:objectType>c:UserType</t:objectType>

            </objectDelta>

            <executionResult>

                <operation>com.evolveum.midpoint.model.impl.lens.ChangeExecutor.executeDelta</operation>

                <status>success</status>

                <importance>normal</importance>

                <token>1000000000000003028</token>

            </executionResult>

            <objectName>9111065688083</objectName>

        </operation>

        <operation>

            <objectDelta>

                <t:changeType>modify</t:changeType>

                <t:objectType>c:UserType</t:objectType>

            </objectDelta>

            <executionResult>

                <operation>com.evolveum.midpoint.model.impl.lens.ChangeExecutor.linkShadow</operation>

                <status>success</status>

                <importance>normal</importance>

                <token>1000000000000003029</token>

            </executionResult>

            <objectName>9111065688083</objectName>

            <resourceOid>6d475d6b-8fa7-4fb0-b2de-f311b315339c</resourceOid>

            <resourceName>Resource1</resourceName>

        </operation>

        <status>success</status>

        <initiatorRef oid="00000000-0000-0000-0000-000000000002" relation="org:default" type="c:UserType">

            <!-- administrator -->

        </initiatorRef>

        <channel>http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#discovery</channel>

    </operationExecution>

    <operationExecution id="3">

        <timestamp>2021-12-21T09:18:25.798Z</timestamp>

        <operation>

            <objectDelta>

                <t:changeType>add</t:changeType>

                <t:objectType>c:UserType</t:objectType>

            </objectDelta>

            <executionResult>

                <operation>com.evolveum.midpoint.model.impl.lens.ChangeExecutor.executeDelta</operation>

                <status>success</status>

                <importance>normal</importance>

                <token>1000000000000003191</token>

            </executionResult>

            <objectName>9111065688083</objectName>

        </operation>

        <operation>

            <objectDelta>

                <t:changeType>modify</t:changeType>

                <t:objectType>c:UserType</t:objectType>

            </objectDelta>

            <executionResult>

                <operation>com.evolveum.midpoint.model.impl.lens.ChangeExecutor.executeDelta</operation>

                <status>success</status>

                <importance>normal</importance>

                <token>1000000000000003192</token>

            </executionResult>

            <objectName>9111065688083</objectName>

        </operation>

        <operation>

            <objectDelta>

                <t:changeType>modify</t:changeType>

                <t:objectType>c:UserType</t:objectType>

            </objectDelta>

            <executionResult>

                <operation>com.evolveum.midpoint.model.impl.lens.ChangeExecutor.linkShadow</operation>

                <status>success</status>

                <importance>normal</importance>

                <token>1000000000000003193</token>

            </executionResult>

            <objectName>9111065688083</objectName>

            <resourceOid>4c627e2a-01ab-4139-ba08-9d7c75a0a012</resourceOid>

            <resourceName>Resource2</resourceName>

        </operation>

        <status>success</status>

        <initiatorRef oid="00000000-0000-0000-0000-000000000002" relation="org:default" type="c:UserType">

            <!-- administrator -->

        </initiatorRef>

        <channel>http://midpoint.evolveum.com/xml/ns/public/gui/channels-3#user</channel>

    </operationExecution>







Kind Regards,

Kajetan Parzyszek






---- On Mon, 20 Dec 2021 19:33:05 +0100 Chris Woods via midPoint <midpoint at lists.evolveum.com> wrote ----



Hi Kajetan, 



try making the mappings strong instead of normal. Also use $focus instead of $user. 



Regards, Chris

Am 20. Dezember 2021 15:58:01 schrieb kajetan parzyszek via midPoint <mailto:midpoint at lists.evolveum.com>:

Hi,



I'm facing an issue where I just can't get attributes from Resource1 to be passed to Resource2.



So I have inbound mapping on resource1:

<attribute>
    <c:ref xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">ri:data</c:ref>
    <inbound>
        <authoritative>true</authoritative>
        <exclusive>false</exclusive>
        <strength>normal</strength>
        <target>
            <c:path>$user/extension/data</c:path>
        </target>
    </inbound>
</attribute>
And outbound mapping on resource2:

<attribute id="9">
    <c:ref xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">ri:data</c:ref>
    <outbound>
        <name>data</name>
        <authoritative>true</authoritative>
        <exclusive>false</exclusive>
        <strength>normal</strength>
        <expression>
            <c:path xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="t:ItemPathType">$user/extension/data</c:path>
        </expression>
    </outbound>
</attribute>
+ resource2 depends on resource1 this way:

<dependency>
    <resourceRef oid="6d475d6b-8fa7-4fb0-b2de-f311b315339c"/>
    <strictness>lax</strictness>
</dependency>


Both resources are assigned on User creation via GUI. Account from Resource1 is retrieved and mapped to the user. The idea here is to pass the just mapped data to Resource2.

The inbound mapping works correctly but the inbound value is not present during the outbound mapping processing thus the account on Resource2 lacks required data.



What would be the correct way to handle that?

I'll add that after triggering "Reconcile" on the user after it's created the data gets updated on Resource2 correctly, but I would like the process to be automated.



Thanks in advance!



Kind Regards,

Kajetan Parzyszek






_______________________________________________

midPoint mailing list

http://mailto:midPoint%40lists.evolveum.com

https://lists.evolveum.com/mailman/listinfo/midpoint









_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com
https://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20211221/084a59c7/attachment-0001.htm>


More information about the midPoint mailing list