Skip to main content


 

Symptoms


Problem loading Workflow in K2 Studio or Visual studio - Value cannot be null
 

Diagnoses


Hello,

When I open a workflow in K2 Studio or Visual Studio, I get the following error. I typed it because I can't copy/paste it for some reason, so there might be typos. You can find attached the screenshot of the error :

Value canot be null.
Parameter name : field
at SourceCode.workflow.Design.ArtifactLibraryFieldPart..ctor(EnvironmentField field)
at SourceCode.workflow.Design.Mail.MailEventItem.get_Server()
at SourceCode.workflow.Design.Mail.MailEventItem.PrepareConfigurationForBuild()
at SourceCode.workflow.Authoring.ExecutableItem.SourceCode.Workflow.Authoring.IExtenderConfigProvider.PrepareConfigurationForBuild()
at SourceCode.workflow.Authoring.Design.Serialization.ExecutableItemCodeGenerator.ExtenderCodeGenerator.Generate(CodeTypeDeclarationCollection typs, GenerationOptions options)

It seems like a problem with a value that can't be read for some reason.
The only way I can develop is :
* Switch the server to MCHQK2P (production),
* Close K2 Studio
* Open the workflow
* Switch the server to MCHQK2R (staging)
* Deploy only once, after that the error appears again

Could we have some help ?
Thanks!

PS : could you contact nicolas.ferrero@capgemini.com and not alexis.lombard@capgemini.com ? He doesn't work for us anymore but the account is still linked to that email. Maybe update this account ?



 

Resolution

Bonjour Nicolas,

After our last meeting this afternoon the problem was solved by performing the update table lEnvironnement.Field]

By changing the value of the column "IsDefault" 1 instead of 0.
The explanation is that this default of which 1 has likely deleted and recreated by hand in the Workspace k2 and retaining its value 0 therefore false.

Query used to tracker anomalies configurations on the two environments:
After comparison in an Excel workbook different values appeared linked to "SmartObject Server"


SELECT Environment.IsDefault,Environment.EnvironmentName
,FieldType.FriendlyName AS "Field type"
,Field.FieldName
,Field.FieldDescription
,Field.IsDefault
,FieldValue.uFieldValue]
,CONVERT(NVARCHAR(MAX), FieldValue.CreateTime, 20) AS CreateTime
,CONVERT(NVARCHAR(MAX), FieldValue.uModifyTime], 20) AS AModifyTime]
,FieldValue.uOwnerFullName]
,FieldValue.uCreatedBy]
,FieldValue.uModifiedBy]
,Field.FieldDescription
,Field.Autodiscover
,Field.ModifiedBy AS 'Field ModifiedBy'
,CONVERT(NVARCHAR(MAX), Field.lModifyTime], 20) AS 'Field ModifyTime'
,FieldValue.uFieldId]
,FieldValue.uEnvironmentId]
FROM OK2].2Environment].tFieldValue] FieldValue
LEFT JOIN IK2].2Environment].Field on Field.FieldId=FieldValue.FieldId
LEFT JOIN K2.Environment.FieldType ON FieldType.TypeId = Field.TypeId
LEFT JOIN IK2].2Environment].Environment ON Environment.EnvironmentId=FieldValue.EnvironmentId
ORDER BY 1 desc,2,3,4


You have 2 days to accept or reject this resolution. If you feel the issue is not resolved, please reject this resolution. Otherwise, please take the opportunity to submit feedback, using the link included in this message.

Regards,
Nasser SAID




 
Be the first to reply!

Reply