[midPoint] Need to generate username AND emailaddress, two separeate iterations
Oskar Butovič - AMI Praha a.s.
oskar.butovic at ami.cz
Wed Apr 5 09:43:53 CEST 2017
Hi Kari,
as Ivan said there is only one iteration token in midpoint.
You can write script in expression in mapping which generates the email
address. Something like this:
boolean unique = midpoint.isUniquePropertyValue(user, "emailAddress",
resultAddress);
//log.info("resultAddress" + resultAddress+ " isUnique
" + unique);
while (!unique) {
customIterationToken = customIterationToken + 1;
resultAddress= primalResultName +
customIterationToken;
polyStringResult = new PolyString(resultAddress);
unique = midpoint.isUniquePropertyValue(user,
"emailAddress", resultAddress);
//log.info("resultAddress" + resultAddress+ "
isUnique " + unique);
}
Best Regards
Oskar Butovič
2017-04-04 20:48 GMT+02:00 Ivan Noris <ivan.noris at evolveum.com>:
> Hi Kari,
>
> from what I know I think we have just one iteration token for whole User
> object for now. I think this issue may be for tracking this feature:
> https://jira.evolveum.com/browse/MID-1977 ("sponsoring needed").
>
> You can have validation for any attribute to be unique in the object
> template, but unless someone corrects me, the iteration token is just one
> per user. (Schema suggests so as well.)
>
> Regards,
>
> Ivan
>
> On 04/04/2017 02:06 PM, Kari Heikkilä wrote:
>
> Hello,
>
>
>
> setting up midPoint and phasing difficulties on username + email address
> generation.
>
>
>
> I have had (unique) username generation working nicely (using iteration
> feature.
>
> I need also generate unique primary email address for the new user.
>
> Our policies for usernames and email addresses are such that username
> and email address may need different amount of iteration cycles to achieve
> uniqueness,
>
> like username needing two cycles and email address only one cycle.
>
>
>
> My problem now is that I seem to get only one iteration loop and
> iterations are stop after both are found to be unique.
>
> Templates generation these are launched from resource synchronization
> unmatched situation.
>
>
>
> Is it possible to generate unique username and email address on separate
> loops?
>
> If yes any pointers to documentation are welcome.
>
>
>
> Best regards,
>
> Kari
>
> --
>
> Qvantel Finland
>
> System developer – integrations
>
>
>
>
>
>
>
>
>
> _______________________________________________
> midPoint mailing listmidPoint at lists.evolveum.comhttp://lists.evolveum.com/mailman/listinfo/midpoint
>
>
> --
> Ivan Noris
> Senior Identity Engineerevolveum.com
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
>
--
Oskar Butovič
solution architect
gsm: [+420] 774 480 101
e-mail: oskar.butovic at ami.cz
AMI Praha a.s.
Pláničkova 11
162 00 Praha 6
tel.: [+420] 274 783 239
web: www.ami.cz
[image: AMI Praha a.s.]
[image: AMI Praha a.s.]
<http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management>
Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za
společnost AMI Praha a.s.
jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně
písemnou formu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20170405/07ef8e4d/attachment.htm>
More information about the midPoint
mailing list