[midPoint] 3.1 SNAPSHOT, Username Generation

Ivan Noris ivan.noris at evolveum.com
Wed Dec 10 16:46:00 CET 2014


Jason,

I believe I have seen this couple of weeks ago when debugging the
iterator problem... seems that I've forgotten about this.

But as far I can remember, it has worked when the mapping was in global
system template instead of the resource-referenced.

If you can temporarily disable using of the template in resource and set
the same template in System Configuration for UserType objects, can you
please test the behaviour?

Anyway it seems to be a bug, so after you could confirm the behaviour,
I'd create a new issue.

Thanks,
I.

On 12/10/2014 04:32 PM, Jason Everling wrote:
> Since I upgraded to 3.1 and I am not sure if this is related to the
> other CSV Resource issue.
>
> Here is the mapping for the template, it worked fine in 3.0.1 so I do
> not know if anything changed, the email address is built using name +
> '@domain.com <http://domain.com>' but when the user is created I get
> null at domain.com <mailto:null at domain.com>, like it is not picking up
> the username from the first mapping
>
>     <mapping>
>         <name>Generate Username for CSV</name>
>         <source>
>             <name>tmpGivenName</name>
>             <path>givenName</path>
>         </source>
>         <source>
>             <name>tmpFamilyName</name>
>             <path>familyName</path>
>         </source>
>         <!-- Will generate username in the filastname format with
> iterator,
>               filastname
>               filastname2
>         -->
>         <expression>
>             <script>
>                 <code>
>                     tmpGivenNameInitial =
> basic.stringify(tmpGivenName)?.size() > 0 ?
>                     (basic.stringify(tmpGivenName)).substring(0,2) : ''
>                     if (iteration == 0) {
>                     basic.norm(basic.stringify(tmpGivenNameInitial +
> tmpFamilyName))
>                     }
>                     else {
>                     basic.norm(basic.stringify(tmpGivenNameInitial +
> tmpFamilyName)) + iterationToken
>                     }
>                 </code>
>             </script>
>         </expression>
>         <target>
>             <path>name</path>
>         </target>
>     </mapping>
>
>     <iteration>
>         <maxIterations>25</maxIterations>
>         <tokenExpression>
>             <script>
>                 <code>
>                     if (iteration == 0) {
>                     return "";
>                     } else {
>                     return "" + (iteration+1)
>                     }
>                 </code>
>             </script>
>         </tokenExpression>
>     </iteration>
>
>     <mapping>
>         <source>
>             <path>$user/name</path>
>         </source>
>         <expression>
>             <script>
>                
> <language>http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy</language>
>                 <code>name + '@domain.com <http://domain.com>'</code>
>             </script>
>         </expression>
>         <target>
>             <path>emailAddress</path>
>         </target>
>     </mapping>
>
>
>
>
> CONFIDENTIALITY NOTICE:
> This e-mail together with any attachments is proprietary and
> confidential; intended for only the recipient(s) named above and may
> contain information that is privileged. You should not retain, copy or
> use this e-mail or any attachments for any purpose, or disclose all or
> any part of the contents to any person. Any views or opinions
> expressed in this e-mail are those of the author and do not represent
> those of the Baptist School of Health Professions. If you have
> received this e-mail in error, or are not the named recipient(s), you
> are hereby notified that any review, dissemination, distribution or
> copying of this communication is prohibited by the sender and to do so
> might constitute a violation of the Electronic Communications Privacy
> Act, 18 U.S.C. section 2510-2521. Please immediately notify the sender
> and delete this e-mail and any attachments from your computer.
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint

-- 
  Ing. Ivan Noris
  Senior Identity Management Engineer
  evolveum.com     evolveum.com/blog/
  _____________________________________________
  "Semper Id(e)M Vix."

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20141210/d20d2efa/attachment.htm>


More information about the midPoint mailing list