Symptoms
Workflow failure - SmartObject is empty error
Diagnoses
We recently changed the field type for one of our smart objects and deployed. This was done on all environments (dev,uat and prod). Since then we have noticed a problem with one of the forms in UAT where the workflow fails. Below are the steps that we have followed in troubleshooting so far:
1. We checked the Flow diagram from Process View Flow Page on K2 Workspace Portal to navigate the Error Node on the Workflow diagram
2. We found that on SmartObject i.e. LoadRequestData.Load method is throwing Error “SmartObject is Empty”
3. The workflow stops here and throws an error as attached screenshot.
Resolution
The SmartObject is Empty error occurs when an SMO Read Method is called and a null value/or a value that wont return a valid result is specified for the input value . Please check where the SMO Load is deriving it's Input Parameters from during Runtime and make sure that
a)Those values are correct
b)Providing those Values to the Read method of the SMO will get back a result
If you have a situation where there might be instances that no results get's returned under normal circumstance, I would suggest using a GetList Input Property/Filter instead of Read method . If a GetList's can return empty values without an error occurring