Skip to main content


 

Symptoms

 


How to troubleshoot situation with task notifications not being sent based on error logged in EventBus.ClientRecorderError table?

 

Sometimes it may happen that workflow did not send email to users when task was assigned to user. Task assigned, but email did not sent. Sample scenario: Suppose you are using email inline function in default client event to get email template from SharePoint, populate it with data and send to user when user get a task. Email not being sent. There are no errors in Workspace. But EventBus.ClientRecorderError table in K2 database contains some errors (see the sample error message below).

 

 

 

Sample error from EventBus.ClientRecorderError table:

 

 

 

CustomEventID: 267  CustomEventLogID: 5033  System.Exception: Unable to resolve a value for the following field '' using provider '' with provider data ''. 'SourceCode.Framework.Data.GetValueException: An unexpected error has occured while trying to resolve a value for Resolver ID %SOME_GUID%. ---> SourceCode.Framework.Data.GetValueException: An unexpected error has occured while trying to resolve a value for Resolver ID %SOME_GUID% . ---> SourceCode.Framework.Data.GetValueException: An unexpected error has occured while trying to resolve a value for Resolver ID %SOME_GUID% . ---> SourceCode.Framework.Data.GetValueException: An unexpected error has occured while trying to resolve a value for Resolver ID %SOME_GUID%  ---> SourceCode.Framework.Data.GetValueException: An unexpected error has occured while trying to resolve a value for Resolver ID %SOME_GUID% . ---> System.Exception: Message: The request failed with HTTP status 401: Unauthorized.; ServiceName: %SERVICE_NAME%; ServiceGuid: %SOME_GUID% ; InnerExceptionMessage: ;       at SourceCode.Workflow.Data.Resolvers.SmartObjectFieldPartResolver.OnGetValue(String data)     at SourceCode.Framework.Data.ResolverManager.GetValue(String runtimeData)     --- End of inner exception stack trace ---     at SourceCode.Framework.Data.ResolverManager.GetValue(String runtimeData)     at SourceCode.Workflow.Data.Resolvers.FunctionFieldPartResolver.OnGetValue(String data)     at SourceCode.Framework.Data.ResolverManager.GetValue(String runtimeData)     --- End of inner exception stack trace ---     at SourceCode.Framework.Data.ResolverManager.GetValue(String runtimeData)     at SourceCode.Workflow.Data.Resolvers.FunctionFieldPartResolver.OnGetValue(String data)     at SourceCode.Framework.Data.ResolverManager.GetValue(String runtimeData)     --- End of inner exception

 

 

 

Additional questions: Why when K2 gets an error from SharePoint it did not interrupt workflow with error? How we can monitor such errors on K2 side? How we can retry such errors? Why K2 does not show these errors in workspace?
 

 

Diagnoses

 


Troubleshooting approach/further steps heavily depend on exact error message logged in EventBus.ClientRecorderError table. See Resolution section below for general troubleshooting approach.
 

 

Resolution

Why K2 does not show these errors in workspace?

 

 

 

Email event is processed within the workflow engine, and that needs to go through SMTP or EWS, consequently if it fails the process will go into error state.

 

By contrast, client notification is being processed within the Message Queuing service (outside of the process) and if it fails there, the process will continue.

 

In other words the workflow will not fail when a notification email fails, it will log the error in the EventBus.ClientRecorderError table. The workflow will fail when an Email Event (as a default client event) fails because that is a necessary step of the workflow. Notifications are not essential to the workflow because users can check the K2 Workspace whether or not they have tasks on their task list.

 

 

 

For particular error message mentioned in this case it says:

 

 

 

"SourceCode.Framework.Data.GetValueException: An unexpected error has occured while trying to resolve a value for Resolver ID %SOME_GUID%"

 

 

 

Value which follows after Resolver ID is a SmartObject GUID and it is possible to look up in oK2]. SmartBroker].OSmartObject] to define which SmartObject exactly it is and troubleshoot it further (maybe by enabling SmartObjects logging and checking those logs).

 

 

 

Also, it does not make sense for K2 to put a process instance in error state because an email was not sent. It is possible that, for example, a single user in a destination set has left the company and the email to their old address fails. It would be impractical for the process instance to become unavailable to all other destination users simply because one address is invalid. This is how it applies to client events ? you will notice that a failure on an email event should put the process in an error state.

 

 

 

Why when K2 gets an error from SharePoint it did not interrupt workflow with error?

 

 

 

If this error happens outside of process when client notification is processed by MSMQ it will not interrupt the workflow with error as it is being processed outside of it (see previous answer). As you are using Email Template Inline Function which is community project not supported by K2 support team I can only recommend getting the example in the documentation working first and then adjust the template according to your needs (I believe you already did this). In terms of troubleshooting, you debug the solution files to see where the error is and you can also add Debug] to your template. Then check the windows event log. A failure with an email event within a client event unfortunately will never stop the process as the message is placed on the event bus and so cannot be caught within the actual process.

 

 

 

How we can monitor such errors on K2 side? / How we can retry such errors?

 

 

 

As these errors happen on MSMQ side it is necessary to monitor them and investigate possibilities of retry from that side. You already noted that you see errors logged in EventBus.ClientRecorderError from K2 side and you main use scripting or leverage monitoring system of your choice to monitor errors in this table as normally it should not contain any errors.

 

 



 
Be the first to reply!

Reply