Code Fix: Attempting to deploy a K2 package where the environment contains two or more SmartObject Server types results in an error
KB001841
PRODUCTIssue Description
When adding another SmartObject Server type to the default environment library in K2 Workspace> Management Console> Environment Library, and attempting to deploy a workflow package using K2 Package and Deployment, an error occurs.
Error Message
Error message states: “Missing environment variable”.
Cause
The SmartObjectFields DisplayName was used instead of the FieldName, which caused a string with "(Default)" at the end to be passed in.
Repro Steps
- Create a workflow containing a SmartObject event.
- Deploy the workflow.
- Create a K2 package using K2 Package and Deployment.
- Browse to K2 Workspace> Management Console> Environment Library and add another SmartObject Server type.
- Try and deploy the package you created (make sure under the selected workflow you select create new version).
Resolution
- Ensure you have K2 4.7 installed.
- Install the K2 4.7 February 2017 Cumulative Update.
- Get the K2 4.7 February Cumulative Update FP5 from Regional Support.
- Install the K2 4.7 February Cumulative Update FP5 to apply the fix.