<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p></p>
<div>In the schema handling I assign icfs:uid, which is associated with the primary key of the table (TREL_CODIGO) in the resource configuration, with the "name" attribute, so, both "uid" and "name" have the same value: TREL_CODIGO.</div>
<div><br>
</div>
<div>On the other hand, I have tried this:</div>
<div><correlation></div>
<div>  <q:equal xmlns=""></div>
<div>    <q:path>name</q:path></div>
<div>    <expression></div>
<div>      <path>$projection/attributes/trel_codigo</path></div>
<div>    </expression></div>
<div>  </q:equal></div>
<div></correlation></div>
<div><br>
<br>
</div>
<p>Try with <path>$projection/attributes/ri:trel_codigo</path><br>
</p>
<p><br>
</p>
<p>Note the "ri:"<br>
</p>
<p><br>
</p>
<p><br>
</p>
<div id="Signature">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><font size="3"><b style="font-family:Times New Roman"><span style="font-size:10pt; color:rgb(31,73,125)">Paulo Fernandes de Souza Júnior</span></b><b style="font-family:Times New Roman"><span style="font-size:10pt; color:rgb(23,54,93)"></span></b><span style="font-family:Times New Roman">
</span><br style="font-family:Times New Roman">
<b style="font-family:Times New Roman"><span style="font-size:8pt; color:rgb(31,73,125)">NQPPPS<br>
</span></b><span style="font-size:8pt; font-family:Times New Roman; color:rgb(23,54,93)">Senado Federal -
</span></font><font size="3"><span style="font-size:8pt; font-family:Times New Roman; color:rgb(31,73,125)">PRODASEN<br>
</span><span style="font-size:8pt; font-family:Times New Roman; color:rgb(23,54,93)">Fone: 61 3303.3924</span></font><span style="color:rgb(31,73,125)"></span>
<br>
<br>
<p class="MsoNormal"><br>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="font-family:Arial; font-size:14px">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>De:</b> midPoint <midpoint-bounces@lists.evolveum.com> em nome de MERCEDES ONCINA DELTELL via midPoint <midpoint@lists.evolveum.com><br>
<b>Enviado:</b> quinta-feira, 10 de fevereiro de 2022 17:50<br>
<b>Para:</b> midpoint@lists.evolveum.com<br>
<b>Cc:</b> MERCEDES ONCINA DELTELL<br>
<b>Assunto:</b> Re: [midPoint] Synchronizating roles between a database table and midPoint</font>
<div> </div>
</div>
<div>
<p>In the schema handling I assign icfs:uid, which is associated with the primary key of the table (TREL_CODIGO) in the resource configuration, with the "name" attribute, so, both "uid" and "name" have the same value: TREL_CODIGO.<br>
<br>
On the other hand, I have tried this:<br>
<em><correlation><br>
  <q:equal xmlns=""><br>
    <q:path>name</q:path><br>
    <expression><br>
      <path>$projection/attributes/trel_codigo</path><br>
    </expression><br>
  </q:equal><br>
</correlation></em></p>
<div>And I get the same error:<br>
<em>Message: Could not import account shadow:b18c3e63-f2c5-461c-b6c0-27b91e0aa2bb(01)<br>
Error: No object class found for the shadow</em><br>
<br>
I admit that I don't really understand the variables that can be used inside the expression, I have seen $user, $focus and $projection, but I am not very sure when each one should be used.<br>
<br>
In the rest of the resources, I use $focus in the correlation expression, both for input and output resources and it runs fine.<br>
<br>
Thanks in advance.<br>
 </div>
<blockquote type="cite" style="border-left:2px solid blue; margin-left:2px; padding-left:12px">
<p>please check you correlation. In the path-Tag you need to refer to an<br>
attribute of the projection/account, not to an attribute of the focus<br>
object.<br>
<br>
You could try this:<br>
<br>
<correlation> <q:equal xmlns=""> <q:path>name</q:path> <expression> <path>$projection/attributes/<a href="" target="_blank">ri:/TREL_CODIGO/</a></path> </expression> </q:equal> </correlation></p>
</blockquote>
<p><br>
<a href="mailto:midpoint-request@lists.evolveum.com">midpoint-request@lists.evolveum.com</a> escribió:</p>
<blockquote type="cite" style="border-left:2px solid blue; margin-left:2px; padding-left:12px">
<p><br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 10 Feb 2022 14:14:51 +0100<br>
From: Mercedes Oncina Deltell <<a href="mailto:moncina@um.es">moncina@um.es</a>><br>
To: <a href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a><br>
Subject: Re: [midPoint] Synchronizating roles between a database table<br>
        and midPoint<br>
Message-ID: <<a href="mailto:7b623c6f-989c-1cd2-74ad-08e159063317@um.es">7b623c6f-989c-1cd2-74ad-08e159063317@um.es</a>><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
I have configured it as you wrote and I can see the entitlements from de<br>
resource in midPoint, but when I try to import them, I get the now<br>
familiar error:<br>
<br>
Message<br>
   Could not import account shadow:b18c3e63-f2c5-461c-b6c0-27b91e0aa2bb(01)<br>
<br>
Error<br>
   No object class found for the shadow<br>
<br>
My configuration is:<br>
<br>
   /*    <schemaHandling>*<br>
            <objectType id="16"><br>
   *            <kind>entitlement</kind>**<br>
   **            <intent>default</intent>**<br>
   **            <default>true</default>**<br>
   **<objectClass>ri:AccountObjectClass</objectClass>*<br>
                <attribute id="17"><br>
                    <ref>icfs:uid</ref><br>
                    <tolerant>true</tolerant><br>
                    <inbound id="19"><br>
   <authoritative>true</authoritative><br>
                        <exclusive>false</exclusive><br>
                        <strength>normal</strength><br>
                        <target><br>
                            <path>name</path><br>
                        </target><br>
                    </inbound><br>
                </attribute><br>
                <attribute id="18"><br>
                    <ref>ri:TREL_DESCRIPCION</ref><br>
                    <tolerant>true</tolerant><br>
   <exclusiveStrong>false</exclusiveStrong><br>
                    <inbound id="20"><br>
   <authoritative>true</authoritative><br>
                        <exclusive>false</exclusive><br>
                        <strength>normal</strength><br>
                        <target><br>
                            <path>displayName</path><br>
                        </target><br>
                    </inbound><br>
                </attribute><br>
            </objectType><br>
        </schemaHandling><br>
   *  <synchronization>*<br>
            <objectSynchronization><br>
                <name>SynchroRoles</name><br>
   *<objectClass>AccountObjectClass</objectClass>**<br>
   **            <kind>entitlement</kind>**<br>
   **            <intent>default</intent>**<br>
   **<focusType>c:RoleType</focusType>**<br>
   **            <enabled>true</enabled>*<br>
   *            <correlation>*<br>
                    <q:equal xmlns=""><br>
                        <q:path>name</q:path><br>
                        <expression xmlns=""><br>
   <path>$focus/attributes/trel_codigo</path><br>
                        </expression><br>
                    </q:equal><br>
   <q:description>CheckUIDwithCODIGO</q:description><br>
                </correlation><br>
                <reconcile>false</reconcile><br>
                <reaction><br>
                    <situation>deleted</situation><br>
                    <synchronize>true</synchronize><br>
                    <action><br>
   <handlerUri><a href="http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink" target="_blank">http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</a></handlerUri><br>
                    </action><br>
                </reaction><br>
                <reaction><br>
                    <situation>linked</situation><br>
                    <synchronize>true</synchronize><br>
                    <reconcile>false</reconcile><br>
                </reaction><br>
                <reaction><br>
                    <situation>unlinked</situation><br>
                    <synchronize>true</synchronize><br>
                    <action><br>
   <handlerUri><a href="http://midpoint.evolveum.com/xml/ns/public/model/action-3#link" target="_blank">http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</a></handlerUri><br>
                    </action><br>
                </reaction><br>
                <reaction><br>
                    <situation>unmatched</situation><br>
                    <synchronize>true</synchronize><br>
                    <reconcile>false</reconcile><br>
                    <action><br>
   <handlerUri><a href="http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus" target="_blank">http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</a></handlerUri><br>
                    </action><br>
                </reaction><br>
            </objectSynchronization><br>
        </synchronization>/<br>
<br>
The Oracle table is:<br>
<br>
   /CREATE TABLE TIPO_RELACIONES<br>
   (<br>
      TREL_CODIGO         VARCHAR2(2 BYTE),<br>
      TREL_DESCRIPCION    VARCHAR2(60 BYTE),<br>
      TREL_UNIVERSITARIO  VARCHAR2(1 BYTE),<br>
      TREL_PRIORIDAD      NUMBER(2),<br>
      TREL_DURACION       DATE,<br>
      TREL_MESES          NUMBER(4),<br>
      TREL_TIPO_DURACION  VARCHAR2(1 BYTE),<br>
      TREL_VIGENTE        VARCHAR2(1 BYTE),<br>
      TREL_RESPONSABLE    VARCHAR2(8 BYTE),<br>
      TREL_TIPO_EMAIL     VARCHAR2(1 BYTE),<br>
      TREL_EXTERNO        VARCHAR2(1 BYTE)<br>
   )/<br>
<br>
I only want it for importing and synchronizing data into midPoint (inbound).<br>
<br>
<br>
El 10/02/2022 a las 12:00, <a href="mailto:midpoint-request@lists.evolveum.com">midpoint-request@lists.evolveum.com</a> escribió:</p>
<blockquote type="cite" style="border-left:2px solid blue; margin-left:2px; padding-left:12px">
<p><schemaHandling> <objectType> <objectClass>ri:AccountObjectClass</objectClass> <default>true</default> <kind>*entitlement*</kind> <intent>default</intent> ...<br>
<synchronization> <objectSynchronization> <objectClass>AccountObjectClass</objectClass> <kind>*entitlement*</kind> <intent>default</intent> <focusType>RoleType</focusType> <enabled>true</enabled><br>
<br>
...</p>
</blockquote>
--<br>
Mercedes Oncina Deltell<br>
Servicio de Infraestructuras TICS<br>
ATICA - Universidad de Murcia<br>
Telf: +34 868881983<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.evolveum.com/pipermail/midpoint/attachments/20220210/51943c85/attachment-0001.htm" target="_blank">https://lists.evolveum.com/pipermail/midpoint/attachments/20220210/51943c85/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 10 Feb 2022 16:46:51 +0100<br>
From: Marc Fueller <<a href="mailto:marc.fueller@daasi.de">marc.fueller@daasi.de</a>><br>
To: Mercedes Oncina Deltell via midPoint <<a href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a>><br>
Subject: Re: [midPoint] Synchronizating roles between a database table<br>
        and midPoint<br>
Message-ID: <<a href="mailto:831e49ab-7b01-c992-9916-ec01841df301@daasi.de">831e49ab-7b01-c992-9916-ec01841df301@daasi.de</a>><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
Hi,<br>
<br>
please check you correlation. In the path-Tag you need to refer to an<br>
attribute of the projection/account, not to an attribute of the focus<br>
object.<br>
<br>
You could try this:<br>
<br>
<correlation> <q:equal xmlns=""> <q:path>name</q:path> <expression> <path>$projection/attributes/<a href="" target="_blank">ri:/TREL_CODIGO/</a></path> </expression> </q:equal> </correlation><br>
<br>
<br>
You also need to make sure that you are also mapping TREL_CODIGO to the<br>
midPoint "name" property in the schema handling.<br>
<br>
HTH<br>
<br>
Marc<br>
<br>
<br>
Am 10.02.22 um 14:14 schrieb Mercedes Oncina Deltell via midPoint:
<blockquote type="cite" style="border-left:2px solid blue; margin-left:2px; padding-left:12px">
<p>I have configured it as you wrote and I can see the entitlements from<br>
de resource in midPoint, but when I try to import them, I get the now<br>
familiar error:<br>
<br>
Message<br>
    Could not import account<br>
    shadow:b18c3e63-f2c5-461c-b6c0-27b91e0aa2bb(01)<br>
<br>
Error<br>
    No object class found for the shadow<br>
<br>
My configuration is:<br>
<br>
    /*    <schemaHandling>*<br>
            <objectType id="16"><br>
    *            <kind>entitlement</kind>**<br>
    **            <intent>default</intent>**<br>
    **            <default>true</default>**<br>
    **<objectClass>ri:AccountObjectClass</objectClass>*<br>
                <attribute id="17"><br>
                    <ref>icfs:uid</ref><br>
                    <tolerant>true</tolerant><br>
                    <inbound id="19"><br>
    <authoritative>true</authoritative><br>
    <exclusive>false</exclusive><br>
    <strength>normal</strength><br>
                        <target><br>
                            <path>name</path><br>
                        </target><br>
                    </inbound><br>
                </attribute><br>
                <attribute id="18"><br>
                    <ref>ri:TREL_DESCRIPCION</ref><br>
                    <tolerant>true</tolerant><br>
    <exclusiveStrong>false</exclusiveStrong><br>
                    <inbound id="20"><br>
    <authoritative>true</authoritative><br>
    <exclusive>false</exclusive><br>
    <strength>normal</strength><br>
                        <target><br>
    <path>displayName</path><br>
                        </target><br>
                    </inbound><br>
                </attribute><br>
            </objectType><br>
        </schemaHandling><br>
    *  <synchronization>*<br>
            <objectSynchronization><br>
                <name>SynchroRoles</name><br>
    *<objectClass>AccountObjectClass</objectClass>**<br>
    **            <kind>entitlement</kind>**<br>
    **            <intent>default</intent>**<br>
    **<focusType>c:RoleType</focusType>**<br>
    **            <enabled>true</enabled>*<br>
    *            <correlation>*<br>
                    <q:equal xmlns=""><br>
                        <q:path>name</q:path><br>
                        <expression xmlns=""><br>
    <path>$focus/attributes/trel_codigo</path><br>
                        </expression><br>
                    </q:equal><br>
    <q:description>CheckUIDwithCODIGO</q:description><br>
                </correlation><br>
                <reconcile>false</reconcile><br>
                <reaction><br>
                    <situation>deleted</situation><br>
    <synchronize>true</synchronize><br>
                    <action><br>
    <handlerUri><a href="http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink" target="_blank">http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</a></handlerUri><br>
                    </action><br>
                </reaction><br>
                <reaction><br>
                    <situation>linked</situation><br>
    <synchronize>true</synchronize><br>
                    <reconcile>false</reconcile><br>
                </reaction><br>
                <reaction><br>
    <situation>unlinked</situation><br>
    <synchronize>true</synchronize><br>
                    <action><br>
    <handlerUri><a href="http://midpoint.evolveum.com/xml/ns/public/model/action-3#link" target="_blank">http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</a></handlerUri><br>
                    </action><br>
                </reaction><br>
                <reaction><br>
    <situation>unmatched</situation><br>
    <synchronize>true</synchronize><br>
                    <reconcile>false</reconcile><br>
                    <action><br>
    <handlerUri><a href="http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus" target="_blank">http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</a></handlerUri><br>
                    </action><br>
                </reaction><br>
            </objectSynchronization><br>
        </synchronization>/<br>
<br>
The Oracle table is:<br>
<br>
    /CREATE TABLE TIPO_RELACIONES<br>
    (<br>
      TREL_CODIGO         VARCHAR2(2 BYTE),<br>
      TREL_DESCRIPCION    VARCHAR2(60 BYTE),<br>
      TREL_UNIVERSITARIO  VARCHAR2(1 BYTE),<br>
      TREL_PRIORIDAD      NUMBER(2),<br>
      TREL_DURACION       DATE,<br>
      TREL_MESES          NUMBER(4),<br>
      TREL_TIPO_DURACION  VARCHAR2(1 BYTE),<br>
      TREL_VIGENTE        VARCHAR2(1 BYTE),<br>
      TREL_RESPONSABLE    VARCHAR2(8 BYTE),<br>
      TREL_TIPO_EMAIL     VARCHAR2(1 BYTE),<br>
      TREL_EXTERNO        VARCHAR2(1 BYTE)<br>
    )/<br>
<br>
I only want it for importing and synchronizing data into midPoint<br>
(inbound).<br>
<br>
<br>
El 10/02/2022 a las 12:00, <a href="mailto:midpoint-request@lists.evolveum.com">midpoint-request@lists.evolveum.com</a> escribió:</p>
<blockquote type="cite" style="border-left:2px solid blue; margin-left:2px; padding-left:12px">
<p><schemaHandling> <objectType> <objectClass>ri:AccountObjectClass</objectClass> <default>true</default> <kind>*entitlement*</kind> <intent>default</intent> ...<br>
<synchronization> <objectSynchronization> <objectClass>AccountObjectClass</objectClass> <kind>*entitlement*</kind> <intent>default</intent> <focusType>RoleType</focusType> <enabled>true</enabled><br>
<br>
...</p>
</blockquote>
--<br>
Mercedes Oncina Deltell<br>
Servicio de Infraestructuras TICS<br>
ATICA - Universidad de Murcia<br>
Telf: +34 868881983<br>
<br>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="https://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">https://lists.evolveum.com/mailman/listinfo/midpoint</a></blockquote>
--<br>
Marc Füller<br>
Consultant<br>
<br>
DAASI International GmbH<br>
Europaplatz 3<br>
D-72072 Tübingen<br>
Germany<br>
<br>
phone: +49 7071 407109-0<br>
fax:   +49 7071 407109-9<br>
email:marc.fueller@daasi.de<br>
web:<a href="http://www.daasi.de" target="_blank">www.daasi.de</a><br>
Sitz der Gesellschaft: Tübingen<br>
Registergericht: Amtsgericht Stuttgart, HRB 382175<br>
Geschäftsleitung: Peter Gietz<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="https://lists.evolveum.com/pipermail/midpoint/attachments/20220210/6cf285e3/attachment.htm" target="_blank">https://lists.evolveum.com/pipermail/midpoint/attachments/20220210/6cf285e3/attachment.htm</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="https://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">https://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br>
<br>
------------------------------<br>
<br>
End of midPoint Digest, Vol 118, Issue 19*****************************************</blockquote>
<p><br>
 </p>
</div>
</div>
</body>
</html>