Code Fix: An error occurs when editing a workflow deployed from a K2 Package when the workflow has a field referencing a SmartObject
KB002229
PRODUCT
Issue Description
When a workflow field part contains a context browser object such as SmartObject > UMUser > GetUserDetails > DisplayName, attempting to load this workflow after deploying it to an environment via K2 Package and Deployment results in an error.
Error Message
The error message states: “Internal Server Error 500: Object reference not set to an instance of an object.”
Resolution
- Ensure you have K2 Five RTM installed.
- Get the K2 Five RTM FP10 from Regional Support.
- Install the K2 Five RTM FP10 to apply the fix.
- Re-deploy the original workflow.
- Create a new package containing this workflow with K2 Package and Deployment.
- Deploy the package on the target environment. The workflow will now load successfully.
Considerations
If the original workflow packaged via K2 Package and Deployment, followed these steps below in this order, the smartobjectFieldParts needs to be reconfigured. This can be achieved by removing and re-adding the field parts and deploying the workflow again to the K2 server. A new package can then be created via K2 Package and Deployment.
- Workflow is created
- Workflow is deployed to K2 server
- Workflow is deleted
- Workflow is loaded from deployed version KPRX
- Workflow loaded is deployed to K2 server
If you are unsure if these steps applies to your scenario, contact Regional Support.