Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Keng Super Contributor.
Super Contributor.
388 views

Update First Name and Last Name from Full Name

Hi,

My Identity Vault consist of 5000+ user objects with Full Name (User's Full Name) and Last Name (fixed : Novell).

What's the best way to perform the following:-

(1) Loop all the users

(2) Read Full Name

(3) Split Full Name and write back to Given Name and Last Name

Which driver I should use ? 

(i) Loopback

(ii) NULL

(iii) Workorder

 

Regards,

Keng

 

 

 

Labels (1)
0 Likes
14 Replies
Knowledge Partner
Knowledge Partner

Re: Update First Name and Last Name from Full Name

I would use the null driver.
Easiest would be to act on a migrate but you could use a job as an alternative.

Good luck
0 Likes
Knowledge Partner
Knowledge Partner

Re: Update First Name and Last Name from Full Name

I would use the null driver.
Easiest would be to act on a migrate but you could use a job as an alternative.

Good luck
0 Likes
Knowledge Partner
Knowledge Partner

Re: Update First Name and Last Name from Full Name

My personal preference is to do what I call  a Toolkit rule in a Null driver.

 

I wrote about this approach a fair bit.

http://www.novell.com/communities/node/6308/toolkit-rules-identity-manager-part-1
http://www.novell.com/communities/node/6310/toolkit-rules-identity-manager-part-2
http://www.novell.com/communities/node/6316/toolkit-rules-identity-manager-part-3
http://www.novell.com/communities/node/6440/toolkit-rules-identity-manager-part-4

(Those are the old URL's they should autoredirect to the new Community based links)

Basically some trigger (I like description in existing drivers, or floor in new drivers) with a specific value calls for an action.  Pick apart the value to set a target, so I would use 42rgeoffc  in my trigger attribute, where 42 means do this name splitting task.  r means report (so do the calc, trace it out to trace or file) and geoffc is the target object. (Then 42d* would be do it to * (everyone)).

 

This way I have fine tuned control and could do a* b* ad so on to break it up and redo it on a user if needed, and report on all those to see if there are some crazy exceptions I should worry about..

0 Likes
Satz Respected Contributor.
Respected Contributor.

Re: Update First Name and Last Name from Full Name

Go with loop back driver to iterate and adding the attributes..
Else prepare a ldif and import it which will be simple..
0 Likes
Knowledge Partner
Knowledge Partner

Re: Update First Name and Last Name from Full Name

You are going to hit a moderate amount of edge cases, surnames that are two ore more words like De Silva or the various dutch variants like Van de Berg / van den Berg / van der Berg. 

If you go with the strictest definition of surname being only one word, you might irritate a number of users.

Another irritating gotcha. Full Name is max 128 chars yet Given Name is only 32 chars (often way to few if you choose to go with the strict rule, just last word is surname). Surname is a more helpful 64 characters long.

To answer your question, Null is far the easiest driver to get started with. You could use a job, or you could just abuse an unused attribute (check it is not used anywhere else in the solution). Add that attribute to the Null driver filter and use a LDAP tool to set it to a value on all users. Then construct your logic to split the full name.

As for splitting the full name, possibly the easiest way is to:
1. Set a local variable (name vFnSplitNS, scope policy, type nodeset) to split (delimiter space or maybe /s - as delimiters can be regex) on token-attribute Full Name

2. Set a local variable (name vSurname, scope policy, type string) xpath to select $vFnSplitNS[last()]
- that is your surname
3. There are several ways to get the remainder (the given name) - will leave you to work that out.

Alex McHugh - Knowledge Partner - Stavanger, Norway
Who are the Knowledge Partners
If you appreciate my comments, please click the Like button.
If I have resolved your issue, please click the Accept as Solution button.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Update First Name and Last Name from Full Name

I use, in similar cases, a null driver with a specific job, that generated trigger event (like Geoffrey suggested).

>My Identity Vault consist of 5000+ user objects with Full Name (User's Full Name) and Last Name (fixed : Novell).

From the beginning, I think, that you can use your current LastName info for slittingFullName info to Fist and Last name portions, but when I read your message carefully, I understood that you don't really have valid LastName info (fixed: Novell).

Do you have any reliable splitter in your FullName info?

(For example, "old" PeopleSoft systems didn't have separate fields for First/Last Names, but in a number of implementations, I saw, that they use comma (,) as a separator. (FirstName, LastName).

Otherwise, you will need to create special logic based on the number of words in the "Full Name".

2 words - FirstName, LastName

3 words - FirstName, MiddleName, LastName

0 Likes
Keng Super Contributor.
Super Contributor.

Re: Update First Name and Last Name from Full Name

Well, in my case the Full Name is based on a Malay's naming such as Mohd Kassim Bin/Binti Kamad. So my separator would Bin or Binti.

I had done using online Regex to split the Fullname to Given Name and Last Name, but wonder how to do it in IDM Policies.

var reName = /([a-zA-z\s]*)\s[Bin|bin|Binti|binti|bt.]*\s([a-zA-z\s]*)/;

var fullName = prompt("Full name #1:", "Muhammad Syafwan bin Gustaf");
var matches = fullName.match(reName);
var firstName = matches[1];
var lastName = matches[2];

Regards,

Keng

0 Likes
Knowledge Partner
Knowledge Partner

Re: Update First Name and Last Name from Full Name

Great, you have "online" code that does this magic.

Next step is to create ECMA function with this functionality and call it from your policy. 🙂

0 Likes
Keng Super Contributor.
Super Contributor.

Re: Update First Name and Last Name from Full Name

Hi,

I had managed to get the result via NULL Driver with trigger attribute as suggeste for a start.

Then I started to add condition for trigger using a Job which run manually.

<if-operation mode="nocase" op="equal">trigger</if-operation>

<if-op-property mode="nocase" name="source" op="equal">FixITJob</if-op-property>

Screenshot 2019-08-27 at 8.34.52 AM.png

Created a job under Null Driver called FixITJob will the following configuration.

Screenshot 2019-08-27 at 8.35.24 AM.png

Screenshot 2019-08-27 at 8.40.12 AM.pngScreenshot 2019-08-27 at 8.39.56 AM.png

 

However if I manually run the Job in IManager, I didn't see any event in dstrace at all. I am not familiar with job at all, any insights ?

 

0 Likes
Knowledge Partner
Knowledge Partner

Re: Update First Name and Last Name from Full Name

YOu have "Submit a trigger document for objects without an association"  as false, but it is unlikely that any of your objects are associated to this new Loopback driver.

Also, I would not send a trigger for every child object I would send but a single Trigger doc especially if you use my approach (code42 I see) since that is not about the object with the evennt, rather it is an event that causes pre-set stuff to happen.

 

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: Update First Name and Last Name from Full Name

Did you provide access rights?

Write permission with inheritance to the DirXML-AccessSubmitCommand attribute of the Driver Set object

0 Likes
Keng Super Contributor.
Super Contributor.

Re: Update First Name and Last Name from Full Name

Yes.

Rights equivalent to admin user.

0 Likes
Knowledge Partner
Knowledge Partner

Re: Update First Name and Last Name from Full Name

This is not about your admin user.

This is right from Job Object to Driver object (ability to submit trigger event to your driver) 

The Job Status dialog box displays any configuration errors. Because the job requires write rights to the DirXML-AccessSubmitCommand attribute of the driver object and those rights have not yet been granted, you see an Insufficient rights to driver object error.

 

 

0 Likes
Keng Super Contributor.
Super Contributor.

Re: Update First Name and Last Name from Full Name

Geoffry,

What you meant is 

(i) The trigger attribute is not set on every user, but set on say a Driver Description attribute

(ii) Set my filter and my condition based on this trigger attribute (changing to code42)

(iii) If true, it will fire up my policy.

My policy have to build upon by looping through a User Node-set to process right ? 

Regards,

Keng

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.