<div dir="ltr">Hi Katka, <div>I am using midPoint 3.1.1</div><div><br></div><div>There were no Object templates in repository, so I created new one. Is there something else I need to do to turn it on? Becauase it is not making hese fields mandatory.</div><div><br></div><div>Source:</div><div><div><objectTemplate xmlns="<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3">http://midpoint.evolveum.com/xml/ns/public/common/common-3</a>"</div><div> xmlns:icfs="<a href="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3">http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3</a>"</div><div> xmlns:t="<a href="http://prism.evolveum.com/xml/ns/public/types-3">http://prism.evolveum.com/xml/ns/public/types-3</a>"</div><div> 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>"</div><div> xmlns:q="<a href="http://prism.evolveum.com/xml/ns/public/query-3">http://prism.evolveum.com/xml/ns/public/query-3</a>"</div><div> xmlns:ri="<a href="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3">http://midpoint.evolveum.com/xml/ns/public/resource/instance-3</a>"</div><div> oid="10000000-0000-0000-0000-000000000223"</div><div> version="0"></div><div> <name>User Object Template for Mandatory Fields</name></div><div> <metadata></div><div> <createTimestamp>2015-08-07T09:43:38.605Z</createTimestamp></div><div> <creatorRef oid="00000000-0000-0000-0000-000000000002" type="c:UserType"><!-- administrator --></creatorRef></div><div> <createChannel><a href="http://midpoint.evolveum.com/xml/ns/public/model/channels-3#objectImport">http://midpoint.evolveum.com/xml/ns/public/model/channels-3#objectImport</a></createChannel></div><div> </metadata></div><div> <item></div><div> <c:ref>c:givenName</c:ref></div><div> <limitations></div><div> <layer>presentation</layer></div><div> <minOccurs>1</minOccurs></div><div> </limitations></div><div> </item></div><div> <item></div><div> <c:ref>c:familyName</c:ref></div><div> <limitations></div><div> <layer>presentation</layer></div><div> <minOccurs>1</minOccurs></div><div> </limitations></div><div> </item></div><div> <item></div><div> <c:ref>c:fullName</c:ref></div><div> <limitations></div><div> <layer>presentation</layer></div><div> <minOccurs>1</minOccurs></div><div> </limitations></div><div> </item></div><div> <item></div><div> <c:ref>c:emailAddress</c:ref></div><div> <limitations></div><div> <layer>presentation</layer></div><div> <minOccurs>1</minOccurs></div><div> </limitations></div><div> </item></div><div> <mapping/></div><div></objectTemplate></div><div><br></div><br><div class="gmail_quote"><div dir="ltr">čt 6. 8. 2015 v 15:16 odesílatel Katarina Valalikova <<a href="mailto:k.valalikova@evolveum.com">k.valalikova@evolveum.com</a>> napsal:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Peter,<br>
<br>
which version of midPoint are you using? I'm asking because from
the version 3.1.1 it is not necessary to modify midpoint's schemas
dirrectly. You can do it in runtime environment using object
template. In my opinion this is better way for customization as
you can do it without rebuilding and redeploying midPoint with
every other change. The example configuration is bellow:<br>
<br>
<objectTemplate
xmlns=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a><br>
xmlns:c=<a href="http://midpoint.evolveum.com/xml/ns/public/common/common-3" target="_blank">"http://midpoint.evolveum.com/xml/ns/public/common/common-3"</a><br>
oid="10000000-0000-0000-0000-000000000000"><br>
<name>User Template</name><br>
<mapping><br>
<!-- this is a section where you can have your
mappings --><br>
</mapping><br>
<br>
<!-- here start the section for 'schema override' --><br>
<item><br>
<ref>c:additionalName</ref>
<!-- the name of the schema attribute you want to modify --><br>
<limitations><br>
<b><layer>presentation</layer>
</b> <!-- layer has to be set to presentation - this
will provide checks on the GUI layer --><b><br>
</b><b> <ignore>true</ignore></b>
<!-- completely hides this attribute in
GUI --><br>
</limitations><br>
</item><br>
<br>
<item><br>
<ref>c:name</ref><br>
<limitations><br>
<b><layer>presentation</layer></b><b><br>
</b><b> <minOccurs>1</minOccurs></b>
<!-- this makes the field mandatory --><br>
</limitations><br>
</item><br>
<br>
<!-- end of the 'schema override' section --><br>
<br>
<br>
Hope this helps you.<br>
<br>
Best Regards,<br>
Katarina Valalikova<br>
<br>
<br>
Dňa 6. 8. 2015 o 14:43 Petr Gašparík napísal(a):<br>
</div>
<blockquote type="cite"></blockquote></div><div bgcolor="#FFFFFF" text="#000000"><blockquote type="cite">
<div dir="ltr">Hi,
<div>I customized common-3.xsd - minOccurs="1" in scheme jar to
make attributes mandatory.</div>
<div><br>
</div>
<div>Now, input fields has red asterisk but midPoint is not
taking care about that and allows empty values.</div>
<div><br>
</div>
<div>What I am missing? Thanks!<br>
</div>
<div>Any answer is appreciated, we run PoC right now..</div>
<div><br>
</div>
<div>beste regards, Petr G.</div>
</div>
<div dir="ltr">-- <br>
</div>
<div dir="ltr">--
<div>Petr G.</div>
</div>
<br>
<fieldset></fieldset>
<br>
</blockquote></div><div bgcolor="#FFFFFF" text="#000000"><blockquote type="cite"><pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
</div>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</blockquote></div></div></div><div dir="ltr">-- <br></div><div dir="ltr">--<div>Petr G.</div></div>