Introduction

After repairing K2 blackpearl 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”.  The error will occur either when adding a new SmartForms Client Event or SmartForms Integration Wizard to an existing or new process; or when attempting to edit an existing SmartForms Client Event or SmartForms Integration Wizard on an existing process in both K2 Designer for Visual Studio and K2 Studio.

Error Scenario

1.    New Process with SmartForms Wizard

 

  1. Repair K2 blackpearl.
  2. Open either K2 Designer for Visual Studio or K2 Studio.
  3. Design a new process.
  4. Drag either the SmartForms Integration Wizard or SmartForms Client Event to the Design Canvas.
  5. Error occurs.

 

2.    Existing Process with existing SmartForms Wizard

 

  1. Repair K2 blackpearl.
  2. Open either K2 Designer for Visual Studio or K2 Studio.
  3. Open the existing process.
  4. Attempt to rerun either the SmartForms Integration Wizard or SmartForms Client Event.
  5. Error occurs.

 

3.    Existing Process with new SmartForms Wizard
  1. Repair K2 blackpearl.
  2. Open either K2 Designer for Visual Studio or K2 Studio.
  3. Open the existing process.
  4. Drag either the SmartForms Integration Wizard or SmartForms Client Event to the Design Canvas.
  5. Error occurs.

Error Message

The error message can either state “Value cannot be null. Parameter name: wizard” or “Value cannot be null. Parameter name: propertywizard” depending on the SmartForms Wizard used in the process.  See image below for example.

Image

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.
  • See image below.

Image

  • 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.
  • See image below.
Image

  • 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.
  • See image below.
Image

Workaround to prevent the error

After repairing 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.