[midPoint] Mandatory fields

Petr Gašparík petr at gasparik.cz
Fri Aug 7 13:04:45 CEST 2015


It works! Great, thank you! Is that somewhere on wiki? Because it should
be..

Anyway, since this is our first PoC, we have some customer feedback:
- is it possible to override system messages (like "output definition must
be specified for asIs expression evaluator in objectTemplate") with
something less technical? Technical detail can stay in error stack..

Thank you again, and have a nice day!
P.


pá 7. 8. 2015 v 12:37 odesílatel Katarina Valalikova <
k.valalikova at evolveum.com> napsal:

> Hi Peter,
>
> you need to add reference for the object template to the
> systemConfiguration:
>
> this should be in your system configuration object:
>
> <defaultObjectPolicyConfiguration>
>       <type>UserType</type>
>       <objectTemplateRef oid="10000000-0000-0000-0000-000000000223"
> type="ObjectTemplateType"><!-- User Object Template for  Mandatory Fields
> --></objectTemplateRef>
>    </defaultObjectPolicyConfiguration>
>
> Or you can use GUI:
>
>    1. Go to the Configuration -> Basic
>    2. Find 'Object Policies'
>    3. Click on 'Edit'
>    4. Set 'Object type' to UserType and choose your object template
>    5. Save
>
> Best regards,
> Katarina Valalikova
>
>
>
> Dňa 7. 8. 2015 o 12:01 Petr Gašparík napísal(a):
>
> Hi Katka,
> I am using midPoint 3.1.1
>
> 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.
>
> Source:
> <objectTemplate xmlns="
> http://midpoint.evolveum.com/xml/ns/public/common/common-3"
>                 xmlns:icfs="
> http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/resource-schema-3
> "
>                 xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3"
>                 xmlns:c="
> http://midpoint.evolveum.com/xml/ns/public/common/common-3"
>                 xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
>                 xmlns:ri="
> http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
>                 oid="10000000-0000-0000-0000-000000000223"
>                 version="0">
>    <name>User Object Template for  Mandatory Fields</name>
>    <metadata>
>       <createTimestamp>2015-08-07T09:43:38.605Z</createTimestamp>
>       <creatorRef oid="00000000-0000-0000-0000-000000000002"
> type="c:UserType"><!-- administrator --></creatorRef>
>       <createChannel>
> http://midpoint.evolveum.com/xml/ns/public/model/channels-3#objectImport
> </createChannel>
>    </metadata>
>    <item>
>       <c:ref>c:givenName</c:ref>
>       <limitations>
>          <layer>presentation</layer>
>          <minOccurs>1</minOccurs>
>       </limitations>
>    </item>
>    <item>
>       <c:ref>c:familyName</c:ref>
>       <limitations>
>          <layer>presentation</layer>
>          <minOccurs>1</minOccurs>
>       </limitations>
>    </item>
>    <item>
>       <c:ref>c:fullName</c:ref>
>       <limitations>
>          <layer>presentation</layer>
>          <minOccurs>1</minOccurs>
>       </limitations>
>    </item>
>    <item>
>       <c:ref>c:emailAddress</c:ref>
>       <limitations>
>          <layer>presentation</layer>
>          <minOccurs>1</minOccurs>
>       </limitations>
>    </item>
>    <mapping/>
> </objectTemplate>
>
>
> čt 6. 8. 2015 v 15:16 odesílatel Katarina Valalikova <
> k.valalikova at evolveum.com> napsal:
>
>> Hi Peter,
>>
>> 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:
>>
>> <objectTemplate xmlns=
>> "http://midpoint.evolveum.com/xml/ns/public/common/common-3"
>> <http://midpoint.evolveum.com/xml/ns/public/common/common-3>
>>                 xmlns:c=
>> "http://midpoint.evolveum.com/xml/ns/public/common/common-3"
>> <http://midpoint.evolveum.com/xml/ns/public/common/common-3>
>>                 oid="10000000-0000-0000-0000-000000000000">
>>    <name>User Template</name>
>>    <mapping>
>>                 <!-- this is a section where you can have your mappings
>> -->
>>    </mapping>
>>
>> <!-- here start the section for 'schema override' -->
>>  <item>
>>         <ref>c:additionalName</ref>                    <!-- the name of
>> the schema attribute you want to modify -->
>>         <limitations>
>>             *<layer>presentation</layer>                  * <!-- layer
>> has to be set to presentation - this will provide checks on the GUI layer
>> -->
>> *            <ignore>true</ignore>*                             <!--
>> completely hides this attribute in GUI -->
>>         </limitations>
>>    </item>
>>
>> <item>
>>         <ref>c:name</ref>
>>         <limitations>
>>             *<layer>presentation</layer>*
>> *            <minOccurs>1</minOccurs>*               <!-- this makes the
>> field mandatory -->
>>         </limitations>
>>    </item>
>>
>> <!-- end of the 'schema override' section -->
>>
>>
>> Hope this helps you.
>>
>> Best Regards,
>> Katarina Valalikova
>>
>>
>> Dňa 6. 8. 2015 o 14:43 Petr Gašparík napísal(a):
>>
>> Hi,
>> I customized common-3.xsd - minOccurs="1" in scheme jar to make
>> attributes mandatory.
>>
>> Now, input fields has red asterisk but midPoint is not taking care about
>> that and allows empty values.
>>
>> What I am missing? Thanks!
>> Any answer is appreciated, we run PoC right now..
>>
>> beste regards, Petr G.
>> --
>> --
>> Petr G.
>>
>>
>> _______________________________________________
>> midPoint mailing listmidPoint at lists.evolveum.comhttp://lists.evolveum.com/mailman/listinfo/midpoint
>>
>>
>> _______________________________________________
>> midPoint mailing list
>> midPoint at lists.evolveum.com
>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
> --
> --
> Petr G.
>
>
> _______________________________________________
> midPoint mailing listmidPoint at lists.evolveum.comhttp://lists.evolveum.com/mailman/listinfo/midpoint
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
-- 
--
Petr G.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150807/eccc9b64/attachment.htm>


More information about the midPoint mailing list