Symptoms
After upgrade from 4.6.x to 4.6.11 the following error is being deployment when trying to deploy workflow created prior to upgrade:
"Unable to determine the container for the workflow user context part'' used in 'SourceCode.Workflow.Authoring.K2Field'
Error can be seen during deployment from Visual Studio/K2 Studio or Package and Deployment Tool and occur for all workflows which were created prior to upgrade. At the same time brand new workflows that are created in Visual Studio can be successfully deployed without errors.
Diagnoses
This is known issue in K2 4.6.11 with coldfix available upon request from K2 support (internal ID 621530). This issue is resolved in K2 4.7.
SourceCode.Workflow.Authoring.K2Field error can also point to the environment library and similar error can also be caused by blank or missing values in the default Workspace Environment Library or in workflow events.
Resolution
Contact K2 support to obtain coldfix for K2 4.6.11 (internal ID 621530) or consider upgrading to 4.7 where this issue is resolved.