Sharepoint Events in K2.net


Badge +2
Hi there,

I have been unable to hook up to events raised in a document library from within K2. I am trying to track when a document has been inserted and I have created a sharepoint process to monitor the document library, but the process never gets fired. I have made sure that the event handling is enabled within sharepoint.

Does anyone have any ideas to try

Cheers

Cammie

23 replies

Badge +9
Hi Cammie,

For debugging purposes,

Firstly start K2.net Server up in console mode. Attempt to trigger new workflow, does K2.net Server report any errors?
Secondly have a look at the event log for possible errors/warning created by our SPS components.

Please let me know.
Badge +8
Hi,

The usual culprit in these occurrences is that the Anonymous user needs to have Start rights on the SPS Process. You will see the error (Anonymous does not have rights to start the process) in the event logs as well as mentioned by Renier.

Here's another thread that you may find useful. It describes how to capture the identity of the user who uploaded the document:
http://forum.k2workflow.com/viewtopic.php?t=51

HTH
Badge +2
Hi Renier,

I started up K2.net server in console mode, but nothing seems to be getting logged when I add a document to the library. The event log shows nothing either. This does seem to point more toward sharepoint but I've double checked and the event handling is enabled. K2.net and sharepoint are on seperate W2K3 boxes, should this make a difference?

Cammie
Badge +9
Hi,

No the fact that the components is distributed will not have an effect on the Start of new process instances, the only thing that this can introduce is the need to implement Kerberos.

Did you make use of the K2.net SPS Process template to configure the SPS Library?
Badge +2
Yes, I used the template wizard.
Badge +2
Hi there,

I may have stumbled across something here. I have looked at the advanced properties of the Document Library and saw the actual event handler properties:

Assembly Name
Class Name
Properties

The assembly name entry has a refence to 'K2SPS2Event'. This is not installed on this machine, and I noticed it is installed on the k2 server. Could this be the problem and what to I need to install on the sharepoint server?

Cammie
Badge +9
Hi,

That is the problem, you need to install the " K2.net® 2003 SharePoint Server Web Service" components on the SPS Server. These components can be installed from the K2.net Installation.
Badge +2
Hi there,

I was wrong the Web Services were installed on the sharepoint server and on a closer look in the GAC, I found the 'K2SPS2Event'. Sorry for misleading you, the problem still exists.

Cammie
Badge +9
During the process configuration, what Event did you select? E.g. Insert, Delete
Badge +2
The 'Insert' event.....Bound to another process (which should simply send me an email).
Badge +9
Hi Cammie,

Please open an official support ticket http://portal.k2workflow.com for this issue to insure that we get the issue resolved in a timely manner.
Badge +4
did this ever get resolved? we are currently experiencing something very similar where we are getting an error log entry on the web server where sharepoint is installed that says "Error in OnEvent" & "Cannot complete this action". This appears after another entry that details the event that was fired & the document that was inserted.
Badge +9
Have a look in the Event Viewer , any useful error descriptions available?
Badge +4
icon-quote.gifRĂ©nier:
Have a look in the Event Viewer , any useful error descriptions available?


sorry Renier, i should have been clearer. The error message we receive is in the Event Viewer (see attachment)

No process instance gets started & no errors appear in the K2 Error Log nor is there anything in a K2error.txt file in the K2 directory.

If i manually try and test the StartK2Process webmethod in the k2v3/sharepointprocessservice/k2process.asmx web service (which i'm assuming the K2 Sharepoint event handler assembly is also doing) then i get a 'HTTP 500 - Internal server error' on the web page and nothing appears in any of the error logs or event viewers, etc.

many thanks,

Wes
Badge +11
Maybe a long-shot... but 'Internal Server' errors are ussually caused by Application Pool problems. Try to change the AppPoolID for the K2V3 and sub-sites to another account. Remember to do an 'iisreset' afterwards.

Hope this helps,
Ockert
Badge +4
icon-quote.gifOckert:
Maybe a long-shot... but 'Internal Server' errors are ussually caused by Application Pool problems. Try to change the AppPoolID for the K2V3 and sub-sites to another account. Remember to do an 'iisreset' afterwards.

Hope this helps,
Ockert


thanks for the reply Ockert,

tried this and nothing changes :(

if i try to test the StartK2Process webmethod, this is where i get the Internal server error.

After some more digging & console app coding trying to call the web service methods through the K2StartProcess and K2StartProcessWs dlls, using some try, catch statements i managed to catch an exception that says "Error in GetEventProcesses
Value cannot be null.
Parameter name: str"

So, i tried the GetEventProcesses webmethod and it seems that i am getting an empty ArrayOfString return value. I wondered if this could be where the Internal server error is coming from which is actually what is reporting the Event Viewer error when i try the SharePoint event?

cheers,

Wes
Badge +9
Hi W,

Please open an official support ticket http://portal.k2workflow.com for this issue to insure that we get the issue resolved in a timely manner.

Post the actual support ticket number, that allows me to track an follow the status of the issue. Makes it easy to post the results at the end.
Badge +4
icon-quote.gifRĂ©nier:
Hi W,

Please open an official support ticket http://portal.k2workflow.com for this issue to insure that we get the issue resolved in a timely manner.

Post the actual support ticket number, that allows me to track an follow the status of the issue. Makes it easy to post the results at the end.


hi Renier,

thanks for your interest & assistance

My support ticket number is #3457 and was yesterday handed over to you guys in SA, i believe.

current possibilities are that Windows SharePoint Services SP2 could be the problem, but this isn't confirmed.

cheers,

Wes
Badge +9
Hi Wez,

By the looks of things you are running SPS with SP2, we have identified an issue with a change made on the SPS object model causing some of K2.net functionality to break. We will continue investigation on this and will work SPS SP2 support into the next Service Pack/Hotfix.
Badge +1
I am running into the same problem identified in this post. Is there any timeframe as to when a fix can be expected?

Are there any workarounds you suggest so that I can kick off a process via a document library update?

Thanks
Badge +11
As far as I know, the fix is in BETA - will be released shortly. Please contact your local K2Workflow support office.

Regards,
Ockert
Badge +4
Sharepoint SP2 causes k2 to fail when listening for a sharepoint event

need k2 hotfix - which is available on the k2 downloads page


looking for an answer to this to send a customer - couldn't find any documentation - other than this post

how about a kb :idea:
Badge +11
Please have a look at:
http://support.microsoft.com/default.aspx?scid=kb;en-us;909455

You can also download the installation documentation from the Partner and Customer portal which explains the problem.

About a KB article - we'll see what we can do.

Regards,
Ockert

Reply