<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Oleksandr,</p>
    <p>I think Gustav meant to use the limitations in schema handling,
      not in schema, as schema may be refreshed and your changes would
      be lost:</p>
    <p><attribute><br>
        <ref>ri:midPointAccountStatus</ref><br>
        <limitations><br>
          <maxOccurs>1</maxOccurs><br>
        </limitations></p>
    <p></attribute><br>
    </p>
    I can't imagine why it works with one resource and not other... For
    sure I have not been working with a resource which has multivalue
    attribute for account state...<br>
    <br>
    Ivan<br>
    <br>
    <div class="moz-cite-prefix">On 21.09.2017 17:13, Oleksandr Nekriach
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CANb693Rb4U-6d11243c50cMJ6RbmdQ3UNBtwvVQqAo8+r893Fg@mail.gmail.com">
      <div dir="ltr">
        <div>Hello Pálos,<br>
        </div>
        I have tried to apply this limitation on resource schema and the
        limitation doesn't help me too.<br>
        <div>
          <div><br>
                              <xsd:element minOccurs="0"
            maxOccurs="1" name="midPointAccountStatus"
            type="xsd:string"><br>
                                 <xsd:annotation><br>
                                    <xsd:appinfo><br>
                                      
            <a:ignore>true</a:ignore><br>
                                      
            <a:displayOrder>140</a:displayOrder><br>
                                       <a:matchingRule xmlns:qn289="<a
href="http://prism.evolveum.com/xml/ns/public/matching-rule-3"
              moz-do-not-send="true">http://prism.evolveum.com/xml/ns/public/matching-rule-3</a>">qn289:stringIgnoreCase</a:matchingRule><br>
                                      
<ra:nativeAttributeName>midPointAccountStatus</ra:nativeAttributeName><br>
                                      
<ra:frameworkAttributeName>midPointAccountStatus</ra:frameworkAttributeName><br>
                                    </xsd:appinfo><br>
                                 </xsd:annotation><br>
                              </xsd:element><br>
            <br>
          </div>
          <div>But the new resource created from scratch works fine. I
            have compared XML of both resources and do not see any
            differences.<br>
            <br>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">2017-09-21 17:17 GMT+03:00 Pálos Gustáv
          <span dir="ltr"><<a href="mailto:gustav.palos@gmail.com"
              target="_blank" moz-do-not-send="true">gustav.palos@gmail.com</a>></span>:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">Hi <span
                style="color:rgb(76,76,76);font-size:12.8px">Oleksandr</span>
              <div><font color="#4c4c4c"><span style="font-size:12.8px"><br>
                  </span></font></div>
              <div><font color="#4c4c4c"><span style="font-size:12.8px">try
                    to set up this attribute as single-valued over:</span></font></div>
              <div>
                <table class="m_-2351540492955452774gmail-highlight
                  m_-2351540492955452774gmail-tab-size
                  m_-2351540492955452774gmail-js-file-line-container"
style="box-sizing:border-box;border-collapse:collapse;color:rgb(36,41,46);font-family:-apple-system,BlinkMacSystemFont,"Segoe
                  UI",Helvetica,Arial,sans-serif,"Apple Color
                  Emoji","Segoe UI Emoji","Segoe UI
                  Symbol";font-size:14px">
                  <tbody style="box-sizing:border-box">
                    <tr style="box-sizing:border-box">
                      <td id="m_-2351540492955452774gmail-LC107"
                        class="m_-2351540492955452774gmail-blob-code
                        m_-2351540492955452774gmail-blob-code-inner
                        m_-2351540492955452774gmail-js-file-line"
                        style="box-sizing:border-box;padding:0px
10px;line-height:20px;vertical-align:top;overflow:visible;word-wrap:normal"><limitations><br>
                        <maxOccurs>1</maxOccurs><br>
                        </limitations></td>
                    </tr>
                  </tbody>
                </table>
                <div class="gmail_extra"><br>
                </div>
                <div class="gmail_extra">Best regards,</div>
                <div class="gmail_extra"><br>
                </div>
                <div class="gmail_extra">Gustav</div>
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">
                    <div>
                      <div class="h5">2017-09-21 15:58 GMT+02:00
                        Oleksandr Nekriach <span dir="ltr"><<a
                            href="mailto:o.nekriach@dynatech.lv"
                            target="_blank" moz-do-not-send="true">o.nekriach@dynatech.lv</a>></span>:<br>
                      </div>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0px
                      0px 0px 0.8ex;border-left:1px solid
                      rgb(204,204,204);padding-left:1ex">
                      <div>
                        <div class="h5">
                          <div dir="ltr">
                            <div>
                              <div>
                                <div>Hello, <br>
                                  I had followed guides to add
                                  enable/disable Resource capabilities
                                  to my openLdap resource.<br>
                                </div>
                                <div>I have configured it and everything
                                  was fine I can disable resource but
                                  when I tried to enable it I have got
                                  an error <br>
                                </div>
                                "attribute 'midPointAccountStatus'
                                cannot have multiple values".<br>
                              </div>
                               I cant understand why connector  try to
                              add attribute instead of modify it?<br>
                            </div>
                            Please help<br>
                            <div>
                              <div>
                                <div><br>
                                  <a
href="https://wiki.evolveum.com/display/midPoint/Recommended+OpenLDAP+Structure"
                                    target="_blank"
                                    moz-do-not-send="true">https://wiki.evolveum.com/disp<wbr>lay/midPoint/Recommended+OpenL<wbr>DAP+Structure</a><br>
                                  <a
href="https://wiki.evolveum.com/display/midPoint/Simulated+Disable+HOWTO"
                                    target="_blank"
                                    moz-do-not-send="true">https://wiki.evolveum.com/disp<wbr>lay/midPoint/Simulated+Disable<wbr>+HOWTO</a><br>
                                  <a
href="https://wiki.evolveum.com/display/midPoint/Auxiliary+Object+Classes"
                                    target="_blank"
                                    moz-do-not-send="true">https://wiki.evolveum.com/disp<wbr>lay/midPoint/Auxiliary+Object+<wbr>Classes</a><br>
                                  <br>
                                  <br>
                                  2017-09-21 16:44:24,841 [] [Thread-87]
                                  ERROR (com.evolveum.midpoint.model.i<wbr>mpl.lens.ChangeExecutor):
                                  Error executing changes for (account
                                  (default) on
                                  <a class="moz-txt-link-freetext" href="resource:dd8b9ada-2dfa-4aec-b5">resource:dd8b9ada-2dfa-4aec-b5</a><wbr>38-21357d2218be(OpenLdap3)):
                                  Internal error:
                                  com.evolveum.midpoint.util.exc<wbr>eption.SystemException:
                                  Got unexpected exception:
                                  org.identityconnectors.framewo<wbr>rk.common.exceptions.AlreadyEx<wbr>istsException:
                                  Error modifying LDAP entry
                                  uid=testuser6,ou=Users,ou=LV,d<wbr>c=dyninno,dc=test:
                                  [add:midPointAccountStatus:
                                  enabled,add:objectClass:
                                  midPointPerson,]: constraintViolation:
                                  attribute 'midPointAccountStatus'
                                  cannot have multiple values (19)<br>
                                  com.evolveum.midpoint.util.exc<wbr>eption.SystemException:
                                  Internal error:
                                  com.evolveum.midpoint.util.exc<wbr>eption.SystemException:
                                  Got unexpected exception:
                                  org.identityconnectors.framewo<wbr>rk.common.exceptions.AlreadyEx<wbr>istsException:
                                  Error modifying LDAP entry
                                  uid=testuser6,ou=Users,ou=LV,d<wbr>c=dyninno,dc=test:
                                  [add:midPointAccountStatus:
                                  enabled,add:objectClass:
                                  midPointPerson,]: constraintViolation:
                                  attribute 'midPointAccountStatus'
                                  cannot have multiple values (19)<br>
                                          at
                                  com.evolveum.midpoint.provisio<wbr>ning.impl.ProvisioningServiceI<wbr>mpl.modifyObject(ProvisioningS<wbr>erviceImpl.java:701)
                                  ~[provisioning-impl-3.6.jar:na<wbr>]<br>
                                          at <a
                                    href="http://com.evolveum.midpoint.model.im"
                                    moz-do-not-send="true">com.evolveum.midpoint.model.im</a><wbr>pl.lens.ChangeExecutor.modifyP<wbr>rovisioningObject(ChangeExecut<wbr>or.java:1397)
                                  ~[model-impl-3.6.jar:na]<br>
                                          at <a
                                    href="http://com.evolveum.midpoint.model.im"
                                    moz-do-not-send="true">com.evolveum.midpoint.model.im</a><wbr>pl.lens.ChangeExecutor.execute<wbr>Modification(ChangeExecutor.<wbr>java:1281)
                                  ~[model-impl-3.6.jar:na]<br>
                                          at <a
                                    href="http://com.evolveum.midpoint.model.im"
                                    moz-do-not-send="true">com.evolveum.midpoint.model.im</a><wbr>pl.lens.ChangeExecutor.execute<wbr>Delta(ChangeExecutor.java:812)
                                  ~[model-impl-3.6.jar:na]<br>
                                          at <a
                                    href="http://com.evolveum.midpoint.model.im"
                                    moz-do-not-send="true">com.evolveum.midpoint.model.im</a><wbr>pl.lens.ChangeExecutor.execute<wbr>Changes(ChangeExecutor.java:<wbr>308)
                                  ~[model-impl-3.6.jar:na]<br>
                                          at <a
                                    href="http://com.evolveum.midpoint.model.im"
                                    moz-do-not-send="true">com.evolveum.midpoint.model.im</a><wbr>pl.lens.Clockwork.lambda$proce<wbr>ssSecondary$0(Clockwork.java:<wbr>481)
                                  [model-impl-3.6.jar:na]<br>
                                          at <a
                                    href="http://com.evolveum.midpoint.model.im"
                                    moz-do-not-send="true">com.evolveum.midpoint.model.im</a><wbr>pl.lens.LensUtil.partialExecut<wbr>e(LensUtil.java:1253)
                                  ~[model-impl-3.6.jar:na]<br>
                                          at <a
                                    href="http://com.evolveum.midpoint.model.im"
                                    moz-do-not-send="true">com.evolveum.midpoint.model.im</a><wbr>pl.lens.LensUtil.partialExecut<wbr>e(LensUtil.java:1240)
                                  ~[model-impl-3.6.jar:na]<br>
                                          at <a
                                    href="http://com.evolveum.midpoint.model.im"
                                    moz-do-not-send="true">com.evolveum.midpoint.model.im</a><wbr>pl.lens.Clockwork.processSecon<wbr>dary(Clockwork.java:479)
                                  [model-impl-3.6.jar:na]<br>
                                          at <a
                                    href="http://com.evolveum.midpoint.model.im"
                                    moz-do-not-send="true">com.evolveum.midpoint.model.im</a><wbr>pl.lens.Clockwork.click(Clockw<wbr>ork.java:327)
                                  [model-impl-3.6.jar:na]<br>
                                          at <a
                                    href="http://com.evolveum.midpoint.model.im"
                                    moz-do-not-send="true">com.evolveum.midpoint.model.im</a><wbr>pl.lens.Clockwork.run(Clockwor<wbr>k.java:203)
                                  [model-impl-3.6.jar:na]<br>
                                          at <a
                                    href="http://com.evolveum.midpoint.model.im"
                                    moz-do-not-send="true">com.evolveum.midpoint.model.im</a><wbr>pl.controller.ModelController.<wbr>executeChanges(ModelController<wbr>.java:569)
                                  ~[model-impl-3.6.jar:na]<br>
                                          at
                                  sun.reflect.GeneratedMethodAcc<wbr>essor1281.invoke(Unknown
                                  Source) ~[na:na]<br>
                                          at
                                  sun.reflect.DelegatingMethodAc<wbr>cessorImpl.invoke(DelegatingMe<wbr>thodAccessorImpl.java:43)
                                  ~[na:1.8.0_131]<br>
                                          at
                                  java.lang.reflect.Method.invok<wbr>e(Method.java:498)
                                  ~[na:1.8.0_131]<br>
                                          at
                                  org.apache.wicket.proxy.LazyIn<wbr>itProxyFactory$JdkHandler.<wbr>invoke(LazyInitProxyFactory.<wbr>java:507)
                                  ~[wicket-ioc-7.6.0.jar:7.6.0]<br>
                                          at
                                  com.sun.proxy.$Proxy154.execut<wbr>eChanges(Unknown
                                  Source) ~[na:na]<br>
                                          at
                                  com.evolveum.midpoint.web.comp<wbr>onent.progress.ProgressReporte<wbr>r.lambda$executeChangesAsync$<wbr>0(ProgressReporter.java:187)
                                  ~[classes/:na]<br>
                                          at
                                  java.lang.Thread.run(Thread.ja<wbr>va:748)
                                  ~[na:1.8.0_131]<br>
                                  Caused by:
                                  com.evolveum.midpoint.util.exc<wbr>eption.SystemException:
                                  com.evolveum.midpoint.util.exc<wbr>eption.SystemException:
                                  Got unexpected exception:
                                  org.identityconnectors.framewo<wbr>rk.common.exceptions.AlreadyEx<wbr>istsException:
                                  Error modifying LDAP entry
                                  uid=testuser6,ou=Users,ou=LV,d<wbr>c=dyninno,dc=test:
                                  [add:midPointAccountStatus:
                                  enabled,add:objectClass:
                                  midPointPerson,]: constraintViolation:
                                  attribute 'midPointAccountStatus'
                                  cannot have multiple values (19)<br>
                                          at
                                  com.evolveum.midpoint.provisio<wbr>ning.consistency.impl.ErrorHan<wbr>dlerFactory.createErrorHandler<wbr>(ErrorHandlerFactory.java:89)
                                  ~[provisioning-impl-3.6.jar:na<wbr>]<br>
                                          at
                                  com.evolveum.midpoint.provisio<wbr>ning.impl.ShadowCache.handleEr<wbr>ror(ShadowCache.java:1128)
                                  ~[provisioning-impl-3.6.jar:na<wbr>]<br>
                                          at
                                  com.evolveum.midpoint.provisio<wbr>ning.impl.ShadowCache.modifySh<wbr>adow(ShadowCache.java:691)
                                  ~[provisioning-impl-3.6.jar:na<wbr>]<br>
                                          at
                                  com.evolveum.midpoint.provisio<wbr>ning.impl.ProvisioningServiceI<wbr>mpl.modifyObject(ProvisioningS<wbr>erviceImpl.java:679)
                                  ~[provisioning-impl-3.6.jar:na<wbr>]<br>
                                          ... 18 common frames omitted<br>
                                  <br clear="all">
                                  <br>
                                  -- <br>
                                  <div
                                    class="m_-2351540492955452774gmail-m_2291122331824040345gmail_signature">
                                    <div dir="ltr">
                                      <div>
                                        <div dir="ltr"><span
                                            style="color:rgb(76,76,76)">Best
                                            regards, <br>
                                            <br>
                                            Oleksandr Nekriach |
                                            Identity and access
                                            management engineer <br>
                                            <br>
                                            Dynatech, Mednieku str. 4a,
                                            Riga, LV-1010, Latvia <br>
                                            <br>
                                            <div
                                              style="display:inline-block"><a
href="tel:+371%2025%20314%20685" value="+37125314685" target="_blank"
                                                moz-do-not-send="true">+37125314685</a></div>
                                            ,
                                            <div
                                              style="display:inline-block"><a
href="mailto:o.nekriach@dynatech.lv" target="_blank"
                                                moz-do-not-send="true">o.nekriach@dynatech.lv</a></div>
                                            |
                                            <div
                                              style="display:inline-block"><a
href="http://www.dynatech.lv" target="_blank" moz-do-not-send="true">www.dynatech.lv</a></div>
                                            <br>
                                            <br>
                                            <img
                                              src="cid:part21.6D20B85C.C5A5F786@evolveum.com"
                                              class=""> <br>
                                            <br>
                                            Stay connected: <br>
                                            <div
                                              style="display:inline-block;margin:5px
                                              5px 0px 0px"><a
                                                href="https://www.facebook.com/DynatechLatvia/?ref=br_rs"
                                                target="_blank"
                                                moz-do-not-send="true"><img
src="cid:part22.8C4EE2BC.C139D467@evolveum.com" class=""></a></div>
                                            <div
                                              style="display:inline-block;margin:5px
                                              0px 0px"><a
                                                href="https://www.linkedin.com/company-beta/17893047/"
                                                target="_blank"
                                                moz-do-not-send="true"><img
src="cid:part24.A8D3CAD7.543C8D4F@evolveum.com" class=""></a></div>
                                            <br>
                                            <br>
                                            <span
                                              style="font-size:11px;color:rgb(161,161,161)">Confidentiality
                                              Notice: This message
                                              contains confidential
                                              information and is
                                              intended only for the
                                              named recipient(s). If you
                                              are not the addressee you
                                              may not copy, distribute
                                              or perform any other
                                              activities with this
                                              information. If you have
                                              received this transmission
                                              in error, please notify us
                                              by e-mail immediately.
                                              E-mail transmission cannot
                                              be guaranteed to be secure
                                              or error-free as
                                              information could be
                                              intercepted, corrupted,
                                              lost, destroyed, arrive
                                              late or incomplete, or
                                              contain viruses.</span></span></div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                          <br>
                        </div>
                      </div>
                      ______________________________<wbr>_________________<br>
                      midPoint mailing list<br>
                      <a href="mailto:midPoint@lists.evolveum.com"
                        target="_blank" moz-do-not-send="true">midPoint@lists.evolveum.com</a><br>
                      <a
                        href="http://lists.evolveum.com/mailman/listinfo/midpoint"
                        rel="noreferrer" target="_blank"
                        moz-do-not-send="true">http://lists.evolveum.com/mail<wbr>man/listinfo/midpoint</a><br>
                      <br>
                    </blockquote>
                  </div>
                  <span class="HOEnZb"><font color="#888888"><br>
                      <br clear="all">
                      <div><br>
                      </div>
                      -- <br>
                      <div class="m_-2351540492955452774gmail_signature">s
                        pozdravom
                        <div><br>
                        </div>
                        <div>Gustáv Pálos</div>
                      </div>
                    </font></span></div>
              </div>
            </div>
            <br>
            ______________________________<wbr>_________________<br>
            midPoint mailing list<br>
            <a href="mailto:midPoint@lists.evolveum.com"
              moz-do-not-send="true">midPoint@lists.evolveum.com</a><br>
            <a
              href="http://lists.evolveum.com/mailman/listinfo/midpoint"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.evolveum.com/<wbr>mailman/listinfo/midpoint</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <br>
        -- <br>
        <div class="gmail_signature" data-smartmail="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr"><span style="color:#4c4c4c">Best regards, <br>
                  <br>
                  Oleksandr Nekriach | Identity and access management
                  engineer <br>
                  <br>
                  Dynatech, Mednieku str. 4a, Riga, LV-1010, Latvia <br>
                  <br>
                  <div style="display:inline-block"><a
                      href="tel:+371%2025%20314%20685"
                      value="+37125314685" target="_blank"
                      moz-do-not-send="true">+37125314685</a></div>
                  ,
                  <div style="display:inline-block"><a
                      href="mailto:o.nekriach@dynatech.lv"
                      target="_blank" moz-do-not-send="true">o.nekriach@dynatech.lv</a></div>
                  |
                  <div style="display:inline-block"><a
                      href="http://www.dynatech.lv" target="_blank"
                      moz-do-not-send="true">www.dynatech.lv</a></div>
                  <br>
                  <br>
                  <img src="cid:part21.6D20B85C.C5A5F786@evolveum.com"
                    class=""> <br>
                  <br>
                  Stay connected: <br>
                  <div style="display:inline-block;margin:5px 5px 0 0"><a
href="https://www.facebook.com/DynatechLatvia/?ref=br_rs"
                      target="_blank" moz-do-not-send="true"><img
                        src="cid:part22.8C4EE2BC.C139D467@evolveum.com"
                        class=""></a></div>
                  <div style="display:inline-block;margin:5px 0 0 0"><a
href="https://www.linkedin.com/company-beta/17893047/" target="_blank"
                      moz-do-not-send="true"><img
                        src="cid:part24.A8D3CAD7.543C8D4F@evolveum.com"
                        class=""></a></div>
                  <br>
                  <br>
                  <span style="font-size:11px;color:#a1a1a1">Confidentiality
                    Notice: This message contains confidential
                    information and is intended only for the named
                    recipient(s). If you are not the addressee you may
                    not copy, distribute or perform any other activities
                    with this information. If you have received this
                    transmission in error, please notify us by e-mail
                    immediately. E-mail transmission cannot be
                    guaranteed to be secure or error-free as information
                    could be intercepted, corrupted, lost, destroyed,
                    arrive late or incomplete, or contain viruses.</span></span></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">-- 
Ivan Noris
Senior Identity Engineer
evolveum.com
</pre>
  </body>
</html>