<div dir="ltr">Hi Radovan,<div><br></div><div>Thanks for your answer.</div><div><br></div><div>We are facing a similar case, so we decided to add extension properties to the AssignmentTypes. We created the metaAssignment.xsd file within the home/schema directory and restarted tomcat. The xsd file content is the following:</div><div><br></div><div><div><font size="1"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></font></div><div><font size="1"><xsd:schema elementFormDefault="qualified"</font></div><div><font size="1">            targetNamespace="<a href="http://midpoint.identicum.com/xml/ns/metaAssignment">http://midpoint.identicum.com/xml/ns/metaAssignment</a>"</font></div><div><font size="1">            xmlns:a="<a href="http://prism.evolveum.com/xml/ns/public/annotation-3">http://prism.evolveum.com/xml/ns/public/annotation-3</a>"</font></div><div><font size="1">            xmlns:c="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>"</font></div><div><font size="1">            xmlns:xsd="<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>"></font></div><div><font size="1">        <xsd:complexType name="AssignmentExtensionType"></font></div><div><font size="1">                <xsd:annotation></font></div><div><font size="1">                        <xsd:appinfo></font></div><div><font size="1">                                <a:extension ref="c:AssignmentType"/></font></div><div><font size="1">                        </xsd:appinfo></font></div><div><font size="1">                </xsd:annotation></font></div><div><font size="1">                <xsd:sequence></font></div><div><font size="1">                        <xsd:element name="metaRelation" type="xsd:string"   minOccurs="0" maxOccurs="1" /></font></div><div><font size="1">                </xsd:sequence></font></div><div><font size="1">        </xsd:complexType></font></div><div><font size="1"></xsd:schema></font></div></div><div><br></div><div>However, seems like the extension is not being loaded since when we try to add the following assignment:</div><div><br></div><div><div><font size="1">    <assignment></font></div><div><font size="1">        <extension></font></div><div><font size="1">          <metaRelation>STUDENT</metaRelation></font></div><div><font size="1">        </extension></font></div><div><font size="1">        <targetRef oid="fa18702d-7c44-4b73-82fe-5cad153782e5" type="OrgType"/></font></div><div><font size="1">    </assignment></font></div></div><div><br></div><div>We receive the following error:</div><div><br></div><div><font size="1">Item {<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3}metaRelation">http://midpoint.evolveum.com/xml/ns/public/common/common-3}metaRelation</a> has no definition (schema present, in container PCD:{.../common/common-3}extension {<a href="http://midpoint.identicum.com/xml/ns/metaAssignment}AssignmentExtensionType[0,1],dyn,RAM,runtime)while">http://midpoint.identicum.com/xml/ns/metaAssignment}AssignmentExtensionType[0,1],dyn,RAM,runtime)while</a> parsing ( {.../common/common-3}metaRelation => parser ValueParser(DOMe, {.../common/common-3}metaRelation: STUDENT</font><br></div><div><br></div><div><br></div><div>Are we forgetting about something? Is there a way to troubleshoot if the schema is being loaded OK?</div><div><br></div><div>Thanks in advance</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_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: +54 (11) 4552-3050<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>
<br><div class="gmail_quote">On Thu, Jul 14, 2016 at 12:16 PM, Radovan Semancik <span dir="ltr"><<a href="mailto:radovan.semancik@evolveum.com" target="_blank">radovan.semancik@evolveum.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    Oh yes, there is a very nice way: just use assignments.<br>
    <br>
    Users can have assignments for Orgs. They can have any number of
    assignments to any number of Orgs. A user can even have several
    assignments to the same org as long as there are different
    parameters (orgRef, tenantRef or any extension property).
    Assignments can have extension properties that define the type of
    the assignment if you need that (e.g. to differentiate teacher and
    student). Or you can use the "relation" feature in targetRef. We use
    that feature to distinguish organization managers from members, but
    it should be generic enough to also support other types (teacher,
    student). Assignments also have validity ("from" and "to" dates), so
    they are ideal to model relations with a fixed end date such as
    student affiliations to school that automatically end at the end of
    semester.<br>
    <br>
    Assignments are designed from the day 1 to handle exactly the use
    case that you are describing.<br>
    <br>
    <pre class="m_-3402345168636044339moz-signature" cols="72">-- 
Radovan Semancik
Software Architect
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre><div><div class="h5">
    <br>
    <br>
    <div class="m_-3402345168636044339moz-cite-prefix">On 07/12/2016 03:53 PM, Martin Marchese
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      <div dir="ltr">Hi All,
        <div><br>
        </div>
        <div>We are facing a need in our MidPoint implementation. It's
          the case of an educational system (made up of many schools).</div>
        <div><br>
        </div>
        <div>We have ths schools modeled as orgTypes. </div>
        <div><br>
        </div>
        <div>Users can be part of one or more orgTypes, and they can
          have 1 or more positions in each school, for example:<br>
          <br>
          user1 can be a teacher and principal in school A and teacher
          in school B</div>
        <div><br>
        </div>
        <div>Is there a way to represent these kind of relationships
          between orgTypes and userTypes?</div>
        <div><br>
        </div>
        <div>We are looking for something like this (if it's possible):</div>
        <div><br>
        </div>
        <div><a href="http://www.internet2.edu/products-services/trust-identity/eduperson-eduorg/" target="_blank">http://www.internet2.edu/<wbr>products-services/trust-<wbr>identity/eduperson-eduorg/</a><br>
        </div>
        <div><br>
        </div>
        <div>Thanks</div>
        <div><br>
        </div>
        <div>
          <div>
            <div class="m_-3402345168636044339gmail_signature" data-smartmail="gmail_signature">
              <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>
                    Anchorena 1357 PB<br>
                    Tel: +54 (11) 3526.5509<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>
      <br>
      <fieldset class="m_-3402345168636044339mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
midPoint mailing list
<a class="m_-3402345168636044339moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a class="m_-3402345168636044339moz-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>
  </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>