Skip to main content


 

Symptoms

 


You running older than 4.7 version of K2 and receiving exceptions:

 

"Assembly 'SourceCode.Workflow.Functions' could not be found"

 

 

 

from workflows which are using functions, e.g. date calculation functions such as now() or AddDays().
 

 

Diagnoses

 


This is known issue which may appear in K2 versions older than 4.7 when SourceCode.Workflow.Resolver.Data.dll is erroneously registered in .NET v2 GAC.

 

 

 

This is happening because when K2 uses date calculation functions such as now() or AddDays() K2 code first calls SourceCode.Workflow.Resolver.Data.dll, which, in turn, supposed to call SourceCode.Workflow.Functions.dll.

 

 

 

Both of those DLLs are exist in K2 installation directory, so one can find another in current directory. As soon as SourceCode.Workflow.Resolver.Data.dll appears in GAC location this location takes precedence and this file being loaded from the GAC, once loaded from GAC it searches for SourceCode.Workflow.Functions.dll in current directory (not even in GAC, but in current directory within GAC folder structure) which obviously fails.

 

 

 

It is a bit difficult to troubleshoot this problem in old (older than 4.7 versions of K2) as error message does not mention SourceCode.Workflow.Resolver.Data.dll, though you can use Fusion logs which will indicate root cause but not in a very obvious way.

 

 

 

There was a request for improved error message for this issue which has been implemented in K2 4.7 release, so what we have now for this error is the following:

 

 

 

A) On versions prior to 4.7 workflow will enter into Error state with the following error logged in Error profiles: Assembly 'SourceCode.Workflow.Functions' could not be found.

 

 

 

B) On 4.7 workflow will enter into Error state with more actionable error message: "Please remove SourceCode.Workflow.Data.Resolvers from the Global Assembly Cache."
 

 

Resolution

Remove SourceCode.Workflow.Resolver.Data.dll from GAC.

 

 



 
Be the first to reply!

Reply