<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Harits,<br>
    <br>
    <div class="moz-cite-prefix">On 05/02/2016 08:17 AM, Harits Elfahmi
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAG_KPw0v6DqTYZZV9HsghpGM4Riz+SWfoF7tmXtQ0czyMRRYXQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello all,
        <div><br>
        </div>
        <div>I'm trying to sync my role data from database table to
          midpoint using the GUI. From the docs I get the impression
          that the entitlements and accounts originated from single
          resource, but since DatabaseTableConnector connect to a
          certain table, I think I need to make another resource to
          store entitlement data. What I don't get is:</div>
        <div><br>
        </div>
        <div>- In Schema Handling what's the attribute I use in <b>target</b>?
          Is it <b>$role/name</b>? I can't find the reference in the
          docs</div>
      </div>
    </blockquote>
    <br>
    Instead of $user you would use $focus. (It would work for users as
    well.)<br>
    <br>
    <blockquote
cite="mid:CAG_KPw0v6DqTYZZV9HsghpGM4Riz+SWfoF7tmXtQ0czyMRRYXQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>- In Synchronization, what's the appropriate reaction? I
          can't find <b>add role</b> reaction in the dropdown list</div>
      </div>
    </blockquote>
    <br>
    No, that's connected to the bug you discovered earlier. The proper
    action is addFocus.<br>
<handlerUri><a class="moz-txt-link-freetext" href="http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus">http://midpoint.evolveum.com/xml/ns/public/model/action-3#addFocus</a></handlerUri><br>
    <br>
    In order to synchronize resource objects to anything else than
    users, the following must be added to synchronization settings (I
    don't know if the wizard supports it):<br>
    <br>
    ...<br>
                   <objectSynchronization><br>
                            <name>role sync</name><br>
                            
    <objectClass>ri:AccountObjectClass</objectClass><!--
    DB Table connector supports only accounts --><br>
                            <kind>account</kind><br>
                            <intent>default</intent><br>
                            <focusType><b>c:RoleType</b></focusType><br>
                    <enabled>true</enabled><br>
                    <correlation><br>
    ...<br>
                    </correlation><br>
    ...<br>
    <br>
    This means that the object will be corelated with Roles, not Users
    (which is default). In correlation expression you will search for
    Roles and not Users. If the correlation expressions returns zero
    results, unmatched situation will occur and action (e.g. addFocus)
    will be executed. Everything is the same as for users. Just use
    $focus instead of $user in the inbound mappings.<br>
    <br>
    See some of our Generic Synchronization samples such as
    <a class="moz-txt-link-freetext" href="https://github.com/Evolveum/midpoint/blob/master/samples/resources/opendj/opendj-resource-genericsync.xml">https://github.com/Evolveum/midpoint/blob/master/samples/resources/opendj/opendj-resource-genericsync.xml</a>
    (it's OpenDJ, not DB Table, but you will see the things I
    mentioned).<br>
    <br>
    Also see
    <a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Generic+Synchronization">https://wiki.evolveum.com/display/midPoint/Generic+Synchronization</a><br>
    <br>
    Regards,<br>
    Ivan<br>
    <br>
    <blockquote
cite="mid:CAG_KPw0v6DqTYZZV9HsghpGM4Riz+SWfoF7tmXtQ0czyMRRYXQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Is it possible to do this? Or do I need to manually add
          roles to midpoint? Please help.</div>
        <div><br>
        </div>
        <div>Thanks</div>
        <div>
          <div><br>
          </div>
          -- <br>
          <div>
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>Cheers,</div>
                  <div><b><br>
                    </b></div>
                  <div><b>Harits</b> Elfahmi</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer & IDM Architect
  evolveum.com                     evolveum.com/blog/
  ___________________________________________________
  "Semper ID(e)M Vix."
</pre>
  </body>
</html>