Code Fix: When opening a workflow an XML error occurs after an Activity Outcome rule is changed
KB001829
PRODUCTIssue Description
When changing an Activity Outcome rule in a workflow by removing an inline method, deploying the workflow and attempting to open it again, an XML error occurs.
Error Message
An error has occurred while parsing the workflow XML.
Cause
K2 did not clear the ValuePluginInput when a plugin (inline method) was removed, it was kept in the ProcessDefinitionXML which caused the XML error.
Repro Steps
- Create a Form in the K2 Designer.
- Add a Button control with the rule "if button is clicked, show message".
- Save the Form.
- Create a Workflow.
- Add a decimal data field.
- Configure the Outcome rule with: If Data Field = Inline function "Absolute [-1].
- Add a Placeholder in the outcome activity.
- Deploy the workflow.
- Change the Outcome rule to: if Data Field = 0.
- Re-deploy the workflow.
- Close the workflow.
- When re-opening the workflow, the XML error occurs.
Resolution
- Ensure you have K2 4.7 installed.
- Install the K2 4.7 February 2017 Cumulative Update.
- Get the K2 4.7 February 2017 Cumulative Update FP3 from Regional Support.
- Install the K2 4.7 February 2017 Cumulative Update FP3 to apply the fix.
- Clear the Browser Cache.