Symptoms
K2 4.6.9 returns an error message when trying to deploy a workflow from Visual Studio:
Notification Service: Task Error: System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.Bytee]'.
Diagnoses
This is known issue with 4.6.9:
"K2 Core | Edit the default notification event | Error occurs: Unable to cast object of type ‘System.DBNull’ to type ‘System.Bytet]’".
This error can occur when editing or deleting notification event is performing or when deploying a workflow which contains this type of event. This error appears when in the Eventbus.CustomEvent table some event exists with the Data column value "NULL".
Resolution
There is a coldfix available for this issue which includes updated version of SourceCode.EventBus.EventAdmin.dll. You may obtain this coldix through K2 support.