[midPoint] ValidFrom and ValidTo

Jan Kaspar Caspi at seznam.cz
Tue Jan 2 14:37:17 CET 2018


Hi again,
So now conversion is not giving me an error anymore. But I am still not able
to populate validFrom and validTo in midpoint.

Used CSV is in attachment. So for me important attributes are validFrom 
(StartDate), validTo (EndDate), and AdministartiveStatus (Status).




In resource configuration i tryed to add following definition in schema 
handling: 






         <attribute id="12">

            <c:ref>ri:StartDate</c:ref>

            <tolerant>true</tolerant>

            <exclusiveStrong>false</exclusiveStrong>

            <inbound id="17">

               <authoritative>true</authoritative>

               <exclusive>false</exclusive>

               <strength>normal</strength>

               <expression>

                  <script xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance"

                          xsi:type="c:ScriptExpressionEvaluatorType">

                          <code>

                            import java.text.SimpleDateFormat;

                            import java.text.DateFormat;

                            import java.util.Locale; 

                            DateFormat df = new SimpleDateFormat("mm/dd/yyyy
HH:mm:ss a", , Locale.ENGLISH); 

                            if (input!=null) {

                              Date convertedValidFrom = df.parse(input);

                              log.info ("convertedValidFrom = " + 
convertedValidFrom);

                              return  com.evolveum.midpoint.util.MiscUtil.
asXMLGregorianCalendar (convertedValidFrom);

                            }

                            else {

                              return null;

                            }

                          </code>

                  </script>

               </expression>

               <target>

                  <c:path>$focus/activation/validFrom</c:path>

               </target>

            </inbound>

         </attribute>




Bud it doesnt work, How it shoudl be defined? Can some help me?




Regards




Jan




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180102/65ca6a45/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: users1.csv
Type: application/vnd.ms-excel
Size: 495 bytes
Desc: not available
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180102/65ca6a45/attachment.xlb>


More information about the midPoint mailing list