Adding owner to an IBM Connections Activity

I had the issue, that a user on a customer´s site left the company and his activities had to be switched to another user due to inactivation of this user. A great help was the IBM CNX Wiki.

Here are the steps I did and they worked fine for me:

Access the Activities environment via the WSADMIN platform

Change to the “bin” directory of your Deployment Manager and execute the following statements:

wsadmin -lang jython -user wasadmin -password Passw0rd -port 8879
execfile(“activitiesAdmin.py”)

Get the ID of the activity
wsadmin>ActivityService.fetchActivities()

[{createdBy=Rainer Brandl, name=Demo_Transfer, activityId=7eee84c2-080e-44b0-b7ec-27d51e52cbd3, modifiedBy=Rainer Brandl, isCompleted=false, flags=0, modifiedDate=09. November 2015 07:45:55 CET, isTemplate=false, isDeleted=false, isInternal
=true, createdDate=09. November 2015 07:45:55 CET},…..

In this list you only have to check the name of the activity and the field “activityId” and put this ID into a variable ( I used “ex_employee_activities” )

ex_employee_activities=ActivityService.fetchActivityById(“7eee84c2-080e-44b0-b7ec-27d51e52cbd3“)

Then you just put the additional owner´s mail address of the activity in a variable
newmember=ActivitiesMemberService.fetchMemberByEmail(“firstname.lastname@company.com”)

Now you have to do some vector actions to add the new owner into the activity
 
from java.util import Vector
newmembervec=Vector()
>> this entry creates a new vector for the additional owner
newmembervec.add(newmember)
>> this entry puts the entry from the variable “newmember” to this vector
actvec = Vector()
>> this entry creates a new vector inside the variable
actvec.add(ex_employee_activities)
>> this entry puts the selected activity into this vector

Add the new owner to the activity
AccessControlService.setOwnersAccess(actvec,newmembervec)

Finished

Advertisements