[midPoint] Two (or more) objectTemplate in resource sync

Jason Everling jeverling at bshp.edu
Mon May 20 16:38:03 CEST 2019


Snapped a few from our erp, see attached


On Mon, May 20, 2019 at 1:24 AM Vladislavs Filipciks <
vladislavs.filipciks at csolutions.lv> wrote:

> Hi Jason,
>
> Can You share with me Your resrouce config, object synchronization part?
> Because I've tried almost all compinations of there to insert
> objectTemplateRef and non worked:)
> Thanks.
>
> ------------------------------
> *From: *"Jason Everling" <jeverling at bshp.edu>
> *To: *"midpoint" <midpoint at lists.evolveum.com>
> *Sent: *Saturday, 18 May, 2019 22:08:57
> *Subject: *Re: [midPoint] Two (or more) objectTemplate in resource sync
>
> we do, add the object template to each reaction as needed and not there
> where you have it. Move it for all intents
> On May 18, 2019, at 13:43, Vladislavs Filipciks <
> vladislavs.filipciks at csolutions.lv> wrote:
>>
>> Hello everyone.
>>
>> Does any tried to use two or more objectTemplate in one resource
>> synchronization? Is it even possible in MidPoint?
>>
>> Resource look like:
>>
>>  <objectType>
>>             <kind>account</kind>
>>             *<intent>default</intent>*
>>             <displayName>CS Group User Account</displayName>
>>
>>             <objectClass>ri:user</objectClass>
>> ...
>> </objectType>
>>
>> <objectType>
>>             <kind>account</kind>
>>            * <intent>external</intent>*
>>             <displayName>CS AD External Account</displayName>
>>
>>             <objectClass>ri:user</objectClass>
>> ....
>> </objectType>
>>
>> <objectSynchronization>
>>             <name>Account sync</name>
>>             <objectClass>ri:user</objectClass>
>>             <kind>account</kind>
>>            * <intent>default</intent>*
>>             <focusType>UserType</focusType>
>>             <enabled>true</enabled>
>>             <correlation>
>>                 <q:equal>
>>                     <q:path>c:name</q:path>
>>                     <expression>
>>                         <path>$shadow/attributes/sAMAccountName</path>
>>                     </expression>
>>                 </q:equal>
>>             </correlation>
>>             *<objectTemplateRef oid="666-666-111"/>*
>> ...
>> </objectSynchronization>
>>
>> <objectSynchronization>
>>             <name>External Account sync</name>
>>             <objectClass>ri:user</objectClass>
>>             <kind>account</kind>
>>             *<intent>external</intent>*
>>             <focusType>UserType</focusType>
>>             <enabled>true</enabled>
>>             <correlation>
>>                 <q:equal>
>>                     <q:path>c:name</q:path>
>>                     <expression>
>>                         <path>$shadow/attributes/sAMAccountName</path>
>>                     </expression>
>>                 </q:equal>
>>             </correlation>
>>
>>            * <objectTemplateRef oid="666-666-222"/>*
>> ...
>> </objectSynchronization>
>>
>> When I import account with intent *default* correct objectTemplate is
>> used ( *666-666-111* ).
>> But when I try to import account with intent *external *then the same
>> objectTemplate from objectSynchronization of *account/default* is used -
>> *666-666-111*, but I would like to use *666-666-222*  for
>> *account/external*.
>>
>> Thanks in advance.
>>
>> ------------------------------
>>
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
>>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20190520/8d7c00f4/attachment.htm>
-------------- next part --------------
      <objectSynchronization>
         <kind>account</kind>
         <focusType>c:UserType</focusType>
         <enabled>true</enabled>
         <condition>
            <script>
               <code>
                  tmp = basic.getAttributeValue(shadow, 'http://midpoint.evolveum.com/xml/ns/public/resource/instance-3', 'primaryType');
                  return (tmp != 'FACULTY' && tmp != 'STAFF')
                  </code>
            </script>
         </condition>
         <correlation>
            <q:equal>
               <q:path>c:employeeNumber</q:path>
               <expression>
                  <path>$shadow/attributes/icfs:name</path>
               </expression>
            </q:equal>
         </correlation>
         <reaction>
            <situation>linked</situation>
            <synchronize>true</synchronize>
         </reaction>
         <reaction>
            <situation>deleted</situation>
            <synchronize>true</synchronize>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
            </action>
         </reaction>
         <reaction>
            <situation>unlinked</situation>
            <synchronize>true</synchronize>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
            </action>
         </reaction>
         <reaction>
            <situation>unmatched</situation>
            <synchronize>true</synchronize>
            <objectTemplateRef oid="objTemplate-newUserDefault"/>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</handlerUri>
            </action>
         </reaction>
      </objectSynchronization>
      <objectSynchronization>
         <kind>account</kind>
         <intent>faculty</intent>
         <focusType>c:UserType</focusType>
         <enabled>true</enabled>
         <condition>
            <script>
               <code>
                  tmp = basic.getAttributeValue(shadow, 'http://midpoint.evolveum.com/xml/ns/public/resource/instance-3', 'primaryType');
                  return (tmp == 'FACULTY')
                  </code>
            </script>
         </condition>
         <correlation>
            <q:equal>
               <q:path>c:name</q:path>
               <expression>
                  <path>$shadow/attributes/icfs:name</path>
               </expression>
            </q:equal>
         </correlation>
         <reaction>
            <situation>linked</situation>
            <synchronize>true</synchronize>
         </reaction>
         <reaction>
            <situation>deleted</situation>
            <synchronize>true</synchronize>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
            </action>
         </reaction>
         <reaction>
            <situation>unlinked</situation>
            <synchronize>true</synchronize>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
            </action>
         </reaction>
         <reaction>
            <situation>unmatched</situation>
            <synchronize>true</synchronize>
            <objectTemplateRef oid="objTemplate-newFacultyDefault_ERP"/>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</handlerUri>
            </action>
         </reaction>
      </objectSynchronization>
      <objectSynchronization>
         <kind>account</kind>
         <intent>staff</intent>
         <focusType>c:UserType</focusType>
         <enabled>true</enabled>
         <condition>
            <script>
               <code>
                  tmp = basic.getAttributeValue(shadow, 'http://midpoint.evolveum.com/xml/ns/public/resource/instance-3', 'primaryType');
                  return (tmp == 'STAFF')
                  </code>
            </script>
         </condition>
         <correlation>
            <q:equal>
               <q:path>c:name</q:path>
               <expression>
                  <path>$shadow/attributes/icfs:name</path>
               </expression>
            </q:equal>
         </correlation>
         <reaction>
            <situation>linked</situation>
            <synchronize>true</synchronize>
         </reaction>
         <reaction>
            <situation>deleted</situation>
            <synchronize>true</synchronize>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
            </action>
         </reaction>
         <reaction>
            <situation>unlinked</situation>
            <synchronize>true</synchronize>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
            </action>
         </reaction>
         <reaction>
            <situation>unmatched</situation>
            <synchronize>true</synchronize>
            <objectTemplateRef oid="objTemplate-newStaffDefault_ERP"/>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</handlerUri>
            </action>
         </reaction>
      </objectSynchronization>
      <objectSynchronization>
         <kind>generic</kind>
         <intent>ou</intent>
         <focusType>c:OrgType</focusType>
         <enabled>true</enabled>
         <correlation>
            <q:equal>
               <q:path>c:name</q:path>
               <expression>
                  <path>$shadow/attributes/icfs:name</path>
               </expression>
            </q:equal>
         </correlation>
         <reaction>
            <situation>linked</situation>
            <synchronize>true</synchronize>
         </reaction>
         <reaction>
            <situation>deleted</situation>
            <synchronize>true</synchronize>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
            </action>
         </reaction>
         <reaction>
            <situation>unlinked</situation>
            <synchronize>true</synchronize>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
            </action>
         </reaction>
         <reaction>
            <situation>unmatched</situation>
            <synchronize>true</synchronize>
            <objectTemplateRef oid="objTemplate-newOU_ERP"/>
            <action>
               <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</handlerUri>
            </action>
         </reaction>
      </objectSynchronization>
      


More information about the midPoint mailing list