<div dir="ltr"><div><div><div><div>Hi,<br><br></div>Even when using SCRIPTEDSQL, following the instructions already posted in the list, the result was the same (as shown by the last message I wrote).<br><br></div>In my opinion, what goes through the connector is not enough to customize the groovy script so as to accomplish what I mean.<br><br></div>Am I wrong?<br><br><br></div>Carlos A. Ferreira<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-10-08 10:29 GMT-03:00 Radovan Semancik <span dir="ltr"><<a href="mailto:radovan.semancik@evolveum.com" target="_blank">radovan.semancik@evolveum.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div class="m_3159819063503210572moz-cite-prefix">Hi,<br>
      <br>
      Once again, the DatabaseTable connector is a Sun legacy. As far as
      I know it does not support multivalue fields. But this time there
      are also deeper reasons. Multiple-value properties are typically
      stored in multiple tables. This is how relational data models
      usually work. It is not that easy to discover these tables from
      the tables definitions. The original connector was not built to do
      this. As most Sun connectors it is not using the schema very well.
      That is one of the reasons that we want to rewrite this connector.
      The ConnId framework evolved during the last 5 years after the
      fork from Sun Identity Connector Framework. But the old Sun
      connectors haven't. And that made these connectors quite obsolete.
      We have already rewritten LDAP connector from scratch. We are
      currently working on new CSVFile connector. But there is no
      funding for rewriting the DB table connector yet.<br>
      <br>
      I would suggest to use either Scripted SQL connector or to develop
      your own custom connector. It is not that difficult. The guide is
      here:<br>
<a class="m_3159819063503210572moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Connector+Development+Guide" target="_blank">https://wiki.evolveum.com/<wbr>display/midPoint/Connector+<wbr>Development+Guide</a><br>
      <br>
      <pre class="m_3159819063503210572moz-signature" cols="72">-- 
Radovan Semancik
Software Architect
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre><div><div class="h5">
      <br>
      <br>
      On 10/07/2016 08:40 PM, Martin Marchese wrote:<br>
    </div></div></div>
    <blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hi All,
        <div><br>
        </div>
        <div>Within our MidPoint implementation we have a DatabaseTable
          resource in order to create Users in MidPoint from a DB table.</div>
        <div><br>
        </div>
        <div>We have also, another table where we store User IDs (FK to
          the 1st table) and a multivalue attribute (say employeeType).
          So we'll have N records per user in this table (PK is formed
          by the 2 columns userid and employeeType) e.g.</div>
        <div><br>
        </div>
        <div>User1,Type1</div>
        <div>User1,Tyep2<br>
          User2,Type1<br>
          User2,Type2<br>
          User2,Type3</div>
        <div>User3,Type3</div>
        <div><br>
        </div>
        <div>For this last table, we have another DatabaseTable resource
          and we are trying to achieve the following behavior:</div>
        <div><br>
        </div>
        <div>- Users are created in MidPoint from the 1st DB table,
          using the first resource.</div>
        <div>- EmployeeType attribute values are added to the user only,
          if it is already created, from the 2nd DB table, using the
          second resource. And also removing the employeeType values as
          they are removed from the 2nd table.</div>
        <div><br>
        </div>
        <div>So far we are able to create the users from the 1st table
          but as far as it concerns the employeeType addition, we are
          being able to set only one value (the last one the connector
          sees).<br>
          As we could see in the traces, every time the connector reads
          a new line for a user, adds the new employeeType value but
          removes the previous one.</div>
        <div><br>
        </div>
        <div>We were wondering if this is the correct approach for our
          needs or if we are missing something.</div>
        <div><br>
        </div>
        <div>Thanks in advance</div>
        <div><br clear="all">
          <div>
            <div class="m_3159819063503210572gmail_signature" data-smartmail="gmail_signature">
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">
                        <div>
                          <div dir="ltr">
                            <div>
                              <div dir="ltr"><b><span></span><span></span>Ing.
                                  Martín Marchese</b><br>
                                <img src="http://www.identicum.com/img/favicon.ico">Identicum
                                S.A.<br>
                                Jorge Newbery 3226<br>
                                Tel: <a href="tel:%2B54%20%2811%29%204552-3050" value="+541145523050" target="_blank">+54 (11) 4552-3050</a><br>
                                <a href="mailto:mmarchese@identicum.com" target="_blank">mmarchese@identicum.com</a><br>
                                <a href="http://www.identicum.com" target="_blank">www.identicum.com</a></div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="m_3159819063503210572mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
midPoint mailing list
<a class="m_3159819063503210572moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a class="m_3159819063503210572moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a>
</pre>
    </blockquote>
    <br>
    <br>
  </div>

<br>______________________________<wbr>_________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><br>
<br></blockquote></div><br></div>