SharePoint SmartObject fails when opening Form, server must be restarted
KBS100144
PRODUCTIssue
When opening a Form that contains a SharePoint Integrated SmartObject, an error appears:
"SmartObject property ID is a required property for selected method GetListItem.Value must be set."
This issue occurs intermittently and can be resolved by restarting the K2 Server. However, the issue will occur again in a couple of days with the same symptoms.
Symptoms
There aren't many symptoms of this issue besides the error. However, you can confirm that this is your issue if you go to the Database to check if you have any orphaned Workflow Instances.
The issue occurs because workflows exist in the ServerLog.ProcInst and Server.ProcInst table but do exist in the Server.Log table.
Troubleshooting Steps
1. Confirm that your issue is the orphaned workflows not being moved through the other tables successfully.
Run the following query:
SELECT DISTINCT [PI].[ExecutingProcID] AS [ExecProcID], [P].[ID] AS [ProcID] FROM [ServerLog].[ProcInst] [PI] WITH (NOLOCK)
FULL JOIN [ServerLog].[Proc] [P] ON [PI].[ExecutingProcID] = [P].[ID]
WHERE [PI].[ID] IN (SELECT [ProcInstID] FROM [Server].[Log]) AND [P].[ID] IS NULL
This query will return ProcInstIDs from the Server.Log table where there is not a corresponding ServerLog.Proc record. This will confirm if there's any orphaned workflows.
2. Copy the Workflow ProcInstID's that returns from this query. These are the "problem" Workflows. Now you need to run the following query to check if these exist in the Server.ProcInst table:
Run the following query:
SELECT From Server.ProcInst
Where ProcInstID = [Orphaned Process Instance ID]
If these do not return, and these instances are no longer running or are in error, you can go ahead and delete them from the Server.Log table.
3. Delete the instances you found to be orphaned from the Server.Log table.
Delete from Server.Log
Where ProcInstID = [Orphaned Process Instance ID]
This will delete these instances, test and see if the issue occurs again.