Friday, January 6, 2012

IBM Connections - add Tim Self-Service edit TAB alongside with the "Contact Information" tab

This is a customer scenario that is currently a work in progress.

A customer who I performed the IBM Connections 3.0.1 installation for also had Tivoli Identity Manager (TIM) where all the extended employee information was stored.
So after manually setting up the TDI assemblyjob to iterate through a LDAP search, I did a side-lookup to get the fields from the TIM TDS server, which is TIMs LDAP server. The fields fetched were things like mobile phone number, officephone, manager, country, department etc etc.

And after this, we disabled the same fields from beeing edited in the profiles-config.xml file for IBM Connections.

And then to the "tricky" part:

TIM offers a "Self-Service" page where the users them selves can go in and edit their information. And the customer wanted to have this integrated into IBM Connections. But they also wanted to edit some of the fields that are "Connections only" such as Secretary, Alternate e-mail and Building.

So the solution, so far, was to leave the Connections fields editable in the profiles-config.xml file, and then I added a TAB for the TIM Self-Service page.

So now it looks like this:
As you can see, the "Contact Information" Tab is still there, with some of the "Connections only" fields, and as you can also see; There's a new Tab called "Corporate Information".

When users click on this, for now, it only opens up a popup-window to the TIM Self-Service page, but eventually I want to create an iFrame inside of Connections so that it looks lite it's seemless. But I'm not quite there yet.... Any tips will be greatly appreceated.

To be able to create this new Tab, I search a lot of the Connections config-files, used a lot of firebug and finally came up with this file which defines the Tabs in the "Edit my profile" section:

D:\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\CELLNAME\Profiles.ear\lc.profiles.app.war\WEB-INF\tags\editProfileTabs.tag

This file is located on each of the Nodes which hosts the Profiles Application. So if you have a Cluster of servers, then the file has to be edited on each of the nodes.

When opening up this file in a text-editor, you see this code:

So I copied the first "li" code, and pasted it in before the next "li" section, just so that the position is set as number 2 of the other tabs.

Then I edited the code to open up a popupwindow with the following code:

    <li id="editTabContactInfoTIM">
       <a id="aEditTabContactInfoIM" href='#' onclick="javascript:window.open('https://TIM_SERVERNAME.COMPANY.COM/itim/self/ViewChangeProfile.do','popup','width=800,height=800,location=0,status=1,scrollbars=1');" role="button">Corporate Information</a>
   </li>

This opens up a popup window with widt 800 and height 800 pixels. The code is pretty much self-explanatory.

So now, the file looks like this:

As I said, do this on all Node-servers.

And then you have to "touch" the file on all the Node-servers aswell:

D:\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\CELLNAME\Profiles.ear\lc.profiles.app.war\WEB-INF\jsps\html\scenes\editProfile\editProfile.jsp

By "touch" I mean, open it up in a text-editor, on both nodes, and just save the file. This somehow makes the servers be aware that there are changes made, by "touching" the file that has the "editProfileTabs.tag" file included.

Then restart the Connections Servers that has the Profile application installed.

Heads-up #1: There's some caching involved here. I have tried just to restart the Profiles application, but this does not do the trick for me to see the changes made. If I haven't been accessing the "edit my profile" page before, then It's sufficent just to restart the profiles application. But a restart of the servers is the best thing to do each time you do a change in the files. And remember the "touching"...

Heads-up #2:
If you install any fixes for Profiles, or a Fixpack for Connections, these changes most probably will be overwritten. So then you have to do the whole thing again :-)

2 comments:

suyash said...

Hi I want to customize landing page of connections.
I have created new tab on home page and now trying to add widgets on it.
I have map this tab to a custom jspf created by me.
But now it seems that we can not add widgets to jspf.
Is there any way to do so or can I add new tab in profiles and then go ahead.
As per my knowledge , to customize widgets on page we require page ID and its location.
Plz help on it

Robert Farstad said...

Hi there.

I´m guessing you´ve followed this guide for adding the tab?
http://www-10.lotus.com/ldd/lcwiki.nsf/dx/3.2_Adding_a_tab_to_the_IBM_Connections_Home_page