[midPoint] uniqueness on fullName

Wojciech Staszewski wojciech.staszewski at diagnostyka.pl
Wed Nov 15 13:37:53 CET 2017


I just want to say that it works perfect now. Thank you for your help!
The midpoint.isUniqueAccountValue() method is priceless.

Now it works like that:
I have two laboratories: LAB_A and LAB_B. Both labs works remotely on the same database instance, in midPoint one resource is configured.
I have two users: John Doe and Eva Smith
John works in LAB_A but sometimes he works in LAB_B.
Eva works in LAB_B but sometimes she works in LAB_A.

So I have two intents defined: LAB_A and LAB_B.
User login construction must not be based on simple static prefixes for each intent, because the main lab to each user is different, so the iteration works like this:
Base account for John Doe in LAB_A will be: jdoe
Base account for Eva Smith in LAB_B will be: esmith
Additional account for John Doe in LAB_B will be jdoeB(+iteration)
Additional account for Eva Smith in LAB_A will be esmithA(+iteration)

Uniqueness for fullName is made by the same iteration.

Regards,
WS

W dniu 08.11.2017 o 11:50, Wojciech Staszewski pisze:
> OK, thanks, I'll try it.
> Best regards,
> WS
> 
> W dniu 08.11.2017 o 11:15, Ivan Noris pisze:
>> Hi Wojciech,
>>
>> there is only one iterator which you can use.
>>
>> But you can use midpoint.isUniqueAccountValue() method as described in
>> the <postIterationCondition> here:
>> https://wiki.evolveum.com/display/midPoint/Unique+Account+Username+HOWTO
>> ("Iteration Conditions" part).
>>
>> If you can re-use the same iterationToken value which you use in login
>> name also in full name, it could do the trick. I.e. if you login would
>> be "jsmithX10" and your full name "John Smith X10".
>>
>> Future work for uniqueness is tracked here:
>> https://jira.evolveum.com/browse/MID-1629, so you have the usual
>> options: https://wiki.evolveum.com/display/midPoint/I+Need+New+Feature
>>
>> Best regards,
>>
>> Ivan
>>
>>
>> On 08.11.2017 09:50, Wojciech Staszewski wrote:
>>> Hello!
>>> I know this is ridiculous and stupid, but one of our system has uniqueness on... fullName.
>>> Yes, we cannot have two persons hired with the same first name and last name. :(
>>>
>>> "DB error: java.sql.SQLException(ORA-20010: User with this first name and last name already exists!)"
>>>
>>> I must handle this situation in midPoint somehow.
>>>
>>> I have one iteration already in login outbound mapping.
>>> One system can work in several laboratories, so one user can have several accounts
>>> as there are "roaming" users that work eg.: mon-wed in lab1 and thu-fri in lab2
>>> and one login can be assigned to one lab only:
>>>
>>> iteration=0: login,
>>> iteration=1: login + lab_prefix
>>> iteration>1: login + lab_prefix + (iteration-1).
>>>
>>> I need second iteration for last name (familyName + iteration).
>>>
>>> 1. Can I have two different iterations in one schema handling?
>>> 2. How to make midPoint to know which uniqueness is violated during account creation (login or fullname)?
>>> 3. Is this possible at all?
>>>
>>> I must admit I'm stuck here. Maybe I will apply this logic to CreateScript.groovy...
>>> Thanks for any advice.
>>> Best regards,
>>> WS
>>> _______________________________________________
>>> midPoint mailing list
>>> midPoint at lists.evolveum.com
>>> http://lists.evolveum.com/mailman/listinfo/midpoint
>>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>



More information about the midPoint mailing list