Sharepoint Event Handler Migration from DEV to QA

  • 10 December 2005
  • 1 reply
  • 0 views

Badge +1
I have developed a process that is kicked off when a user inserts a new document into a Sharepoint Document Library. Setting up the integration between Sharepoint and K2 was simple to do with the Sharepoint Process Wizard, however I would now like to take this application from the development environment where I ran the wizard and migrate it to the QA environment.

Is there a way (aside from the wizard) to enable a document library to kick off a process? I tried manually copying the event handler details, but of course that doesn't have the process name.

Any help is appreciated!

1 reply

Badge +2
Hi

This can be done manually by:
1. Setting the Event Handler properties of the document library.
2. Creating a K2.net Events lists.
3. Populating the K2.net Events list.


Setting Event Handler Properties
Browse to Dev document library, copy event handler details to QA making sure to change the K2ServerName and K2WebServiceUrl if required.

Create a K2.net Events list
The easiest way is to use the K2.net web service. The web service is located at http://MyServer/_vti_bin/K2Spslist.asmx, call the CreateK2EventList method.

VB Sample code:

Add reference to K2Utilities.dll and a web reference to http://MyServer:121/_vti_bin/K2Spslist.asmx"

Dim ServerURL as String = http://MyServer:121/
Dim ErrMess as String
Dim SPS2 As New K2SpsWs.K2SPSList
SPS2.Url = ServerURL & "_vti_bin/K2Spslist.asmx"
SPS2.Credentials = SourceCode.K2Utilities.GeneralMod.GetCredentials(ServerURL)

SPS.Credentials = myCredentials
If Not SPS.CreateK2EventList( sites/MySite , ErrMess) Then
Throw New Exception("Unable to create K2.net Events list." & vbCrLf & ErrMess)
End If



Populating the K2.net Events list
Add all the items in the Dev K2.net Events list to the QA list.

Reply