Bob, just attaching this to your thread because it seems related:
Nothing too crazy here, just a thread we were on today that might be helpful to others.
If you’re dealing with errors in K2.net 2003 and just want to ignore them and move on, you’ll use the Exception blocks.
My understanding is that there are 4 levels, Event, Activity, Process and Server. Not sure how to catch at the server level, but the other 3 are accessible in the appropriate properties panel, as everyone probably knows.
The question was: if we catch an exception, say at the process level, will execution go right back to where it failed?
Turns out it does, and everything is sunny and cake.
To handle the exception, continue from the point of failure, and just enjoy the day, you need 4 lines of code.
### C# or VB.net method signature as per the docs ###
K2.AddToErrorLog = false
K2.AddToServerLog = false
### end method block ###
This isn’t VB or C#, it’s just enough to make it clear, either way.
VB.net method sig; Sub Main (ByVal K2 As ExceptionContext) … End Sub
C# method sig: public void Main (ExceptionContext K2) { … }
That’s it. Put that at the process level and all errors will be ignored.
If you want to filter on only certain errors, like emails that fail because users have left the org but are still members of a distribution group or whatever, just filter on that text using the ExceptionObject reference like this:
### method sig (same as above) ###
### C# or VB.net – IF – block: if K2.ExceptionObject.ToString().IndexOf(“email address not found”) ###
K2.AddToErrorLog = false
K2.AddToServerLog = false
### end if block ###
### end method block ###
Pretty straightforward. And you can use this at the Event, Activity or Process level.
Hope that helps.
The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.