Skip to main content

Hi All,

   First thanks in advanced for reading this 😉 any help is apreciated.


    I result of the process problems i have implemented code in K2 / Visual Studing that send's a email to some users when the process execution run's into a problem.

 I have two problems with this:

Problem 1. the most critical one is that the generic k2 process exception does not appear to always work... by example if something blows up on a my c# code inside any activity it works, the exception is started and the email is sent, but if the process blows up on code defined by K2 (example a infopath activity without a run user defined) then the process fails, the error is showed on the k2 console but the exception is never run and the email is never sent.

Does anyone now why does this appends ? why does the process exeption is executed on some events and not on anothers ? i would have hoped that it would work similiar to a try catch but it doesn't.

 

Problem 2. When ever a process error occures on a process execution a message is show in the k2 console, i would like to get this message into the email i send, does anyone know how to get the error msg produced into a string ?

 

 Miguel Angelo

 

For point 1, I have seen similar behaviour for the Destination Rule, I guess this is something that should be enhanced. 

For  point 2, the object that you are looking for is K2.ExceptionObject. This contains the exception object and in my case, using the K2.ExceptionObject.ToString() method printed out the whole stack trace. 


Reply