Issue 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

  1. Create a workflow containing a SmartObject event.
  2. Deploy the workflow.
  3. Create a K2 package using K2 Package and Deployment.
  4. Browse to K2 Workspace> Management Console> Environment Library and add another SmartObject Server type.
  5. Try and deploy the package you created (make sure under the selected workflow you select create new version).

Resolution

  1. Ensure you have K2 4.7 installed.
  2. Install the K2 4.7 February 2017 Cumulative Update.
  3. Get the K2 4.7 February Cumulative Update FP5 from Regional Support.
  4. Install the K2 4.7 February Cumulative Update FP5 to apply the fix.