Symptoms
Cannot open workflow event in existing workflow after upgrade to 4.6.8 in Visual Studio/K2 Studio/K2 Designer. When clicking on event following error message is being presented:
An error has occured.
Value cannot be null.
Parameter name: wizard.
Additional Info
at SourceCode.Configuration.ConfigurationManager.CreateInstance(WizardElementRegisteredWizard)
at SourceCode.Framework.WizardDefinition.CreateInstance()
at
SourceCode.Workflow.VisualDesigners.ProcessEventDesigner._runWizardButton_MouseLeftButtonDonw(Object sender, MouseButtonEventArgs e)
Diagnoses
This is known issue when after repairing K2 blackpearl (or upgrade) and attempting to run a SmartForms Wizard in K2 Studio or K2 Designer for Visual Studio, an error occurs stating: “Value cannot be null. Parameter name: wizard”. Issue is covered by KB001382 "Known Issue: An error occurs when attempting to add or edit a SmartForms Wizard after repairing K2 blackpearl" in K2 Knowledge Center.
Resolution
Issue and resolution covered in K2 Knowledge Center KB001382: http://help.k2.com/kb001382
You need to edit .kprx file as described in KB to fix this error.
Resolution for processes already in error
Open the .kprx in an XML editor of choice.
Search for “SourceCode.Workflow.Design.Forms.ProcessPropertyWizardDefinition”.
Search for the last node in the “PropertyWizardDefinition” node.
Ensure that the “<RegisteredItem>Forms Process Property Wizard</RegisteredItem>” node exists.
If the node does not exist, add it manually.
Search for “SourceCode.Workflow.Design.Forms.ClientEventWizardDefinition”.
Search for the last node in the “WizardDefinition” node.
Ensure that the “<RegisteredItem>Forms Client Event Wizard</RegisteredItem>” node exist.
If the node does not exist, add it manually.
Search for “SourceCode.Workflow.Design.Forms.ClientEventPropertyWizardDefinition”.
Search for the last node in the “PropertyWizardDefinition” node.
Ensure that the “<RegisteredItem>Forms Client Event Property Wizard</RegisteredItem>” node exist.
If the node does not exist, add it manually.
Workaround to prevent the error
After repairing/upgrade of K2 blackpearl, ensure to re-configure K2 smartforms. This will prevent the error from occurring when adding or editing a SmartForms Wizard to either K2 Designer for Visual Studio or K2 Studio.