Symptoms
When appifying a list and selecting the option to generate a workflow based on this list or library we get the following error:
The SmartObject SharePoint_Integration_Settings_Events or one of its components could not be resolved.
Error Details: SmartObject d1f469a7-15ef-4fb4-aabbc-08795ca78ab6] could not be found
Diagnoses
This smartobject is usually installed when K2 for SharePoint is installed. This is a part of the SharePoint integration smartobjects in the Systems folder.
We could not find these smartobjects on the K2 Server. These system smartobjects are added through deploying a K2 for SharePoint package so we attempted to manually add these smartobjects in by deploying that package. It was noted that it was strange that only a few of the smartobjects weren't deployed successfully. This package is located at C:Program Files (x86)K2 blackpearlK2 for SharePoint 2013 SetupK2 for SharePoint 2013.kspx.
When we tried to manually deploy these smartobjects using K2 PandD tool we got an error on both of these smartobjects:
"RuntimeService has encountered an error. Object Reference not set to an instance of an object."
We had no options in PandD to get past these errors. We resorted to then running through repair in order to get these smartobjects added and got the following errors in the installer trace:
DeployPackage.Execute: 16:48:44:>> Logged Error: Deployment Error: Could not publish SmartObject Definition to server: Authorization Failed. SmartObject: :SharePoint Integration Workflows Events]
15:85: DeployPackage.Execute: 16:48:44:>> Logged Error: Deployment Error: Could not publish SmartObject Definition to server: Authorization Failed. SmartObject: :SharePoint Integration Settings Events]
We then double checked the permissions for the installer account we were using. In this case it happened to be the K2 Service account. SQL permissions, SmartObject Administration, Local Admin, etc.
Resolution
It turns out that these two specific SmartObjects are actually SmartBox SmartObjects. We also saw that upon adding the K2 Service Account (installer account in this scenario) to SmartBox Administration in K2 Workspace, that we could now successfully deploy the smartobjects that previously were not deploying. In this case we had another account in the SmartBox Administration. Meaning that all other accounts, specifically that K2 Service account, would not have the ability to publish smartobjects. The SmartBox Admin permissions were the limiting permissions in this scenario. In the future it is recommended that the installer account is at least added to both SmartObject and SmartBox Administration in workspace.