Thursday, October 20, 2011

Automatically Create Sametime Rename Request

Instant's Buddy List Administrator is a Lotus Domino based application that manages Sametime contact lists at a server level.  The Buddy List Administrator has the ability to perform a variety of functions against any contact list on the Sametime server.  For example, the application can:
  • Rename a user within Sametime and automatically update all contacts list that reference the user
  • Delete a user across all Sametime contact lists
  • Add a public or private group to a user's contact list
All of the configuration and activity records for the Buddy List Administrator (BLA) are maintained as unique Lotus Notes documents within the BLA activity database.

Some customer have created systems to automatically populate activity records in order to integrate the BLA with their internal environment.  For instance, to automatically create activity requests to pro-populate a Sametime buddy list whenever a new employee is provisioned with Sametime. 

Instant has also developed integration with AdminP in order to automatically create certain Sametime buddy list activities based on requests with AdminP (i.e. rename requests or user deletion requests)

It is possible to automatically create these BLA activity records (i.e. a Lotus Sametime user rename request) by creating a new document and populating document fields.

 ' The client UI agent will create a new activity document with a type ‘Rename a User’
 Set newDoc = g_db.CreateDocument
 Set item = newDoc.AppendItemValue("mapping_ActivityType", "6") ' 6 = "Rename a user
 newDoc.appendItemValue "Form", "ConversionMapping"

 ' let's give the document a name
 newdoc.AppendItemValue "mapping_DocumentName", "Rename a ST user  " + STUserName + " to LCS " + LCSUserURI

 newDoc.AppendItemValue "mapping_Comments", "Created by automated remapping facility"
 newDoc.AppendItemValue "Mapping_rename_OldName", STUserName
 newDoc.AppendItemValue  "Mapping_rename_NewName", LCSUserURI

 ' Make this newly renamed user as an external user
 newDoc.AppendItemValue "Mapping_Rename_IsMarkAsExternal", "1"

 ' Specify that we should search the buddy lists index database
 If Len(searchFieldString) <1 Then
  newDoc.AppendItemValue "Mapping_SearchFilter_Custom", STUserName
  newDoc.AppendItemValue "Mapping_SearchFilter_Custom", searchFieldString
 End If

 newDoc.AppendItemValue "mapping_userTypeSelection", "6"

 ' write out the activity as string value so we can tell from various views the type of activity
 newDoc.AppendItemValue "mapping_ActivityAsString", "Rename a user"

 Call newDoc.ComputeWithForm(False,False)

No comments: