Email notification of error profiles entries


Badge +3

Hey I'm getting tired of checking the error profiles of the K2 server to make sure everything is running smoothly.  Is there a way to be notified via email that something has triggered an error in the error profile without having to code something in each workflow?


 Scott


6 replies

Badge +13

If it's not built in, through the API one could write an utility to check for entries in ErrorProfile and email.   It could be built as a service and polls periodically.

 For us we did built general exception to email Workflow Admin for each process.
 

Badge +9

Scott,


In regards to Peter's suggestion, the API you would use is SourceCode.Workflow.Management.


In addition to that suggestion, you can build a custom BlackPearl logger to email any and all errors that happen in K2 (not just Workflow).  If this is of interest, I'd recommend taking a look at:


   http://k2underground.com/blogs/fromthebench/archive/2008/03/03/logging-framework.aspx


This blog contains a document and reference to sample code showing you how to build and plug in custom logger.  I believe the example is an emailer.


HTH

Badge +3

Sorry, still pretty new to K2, is this still the case?  A global exception handler would be great...I'm also quickly growing tired of having to manually check for errors.  It would be great if this was a setting in the K2 workspace or something. I read that there was some global exception handling built into 2003 that came back with BlackPearl (here: http://k2distillery.blogspot.com/2007/12/k2-blackpearl-sp1-released.html).  Does anybody know about that, or is that what this thread is referring to?


Even better, it would be great for the users after this project is done.  They definitely have no idea about checking the workspace for errors, all they know is that tasks seem to magically disappear if something goes wrong.

Badge +1

At least in 0807, this doesn't work to log error profile errors, either to the out of the box file logger extension, or to the custom email notification logger extension.  Any warnings, errors, etc., that get logged via code

K2.ProcessInstance.Logger.LogErrorMessage("Test Error Message", "Test Error Message text..........."); 

will work, but exceptions in the workflow, which will show up in the error profiles, never make it into any of the logs.  Anyone have any ideas what might be going on?  I have checked and rechecked my configuration file and code, and all match the example on k2blackmarket on how to build the custom email logger extension.

Badge +9
I have not experienced this before.  Can you provide some example errors that are in your Error Profile, but not being logged?  I'd like to see if I can replicate.
Badge +1

Sorry, I was out all last week on vacation. 

Here are some examples:

28006 Datafield FakeField not found

SmartObject property AssignedUser is a required property for selected method Resolve_Destination_User. Value must be set.

Property set method not found.

The specified string is not in the form required for an e-mail address. 

Reply