< class="prominent-subhead ">

REST Service Instance Not Deployed

This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.


When deploying a workflow containing a SmartObject used by a REST endpoint service instance the package deployment does not create the REST service instance onto the target environment.


Receiving an error during deployment stating that the service instance and SmartObject cannot be located on the target environment.


According to the K2 documentation "Package and Deployment Considerations Documentation" this is expected behaviour as K2 will attempt to do a “best guess” as to all of the K2 artifacts required for your application therefore you can assume that anything not explicitly listed as included in the below table will not be included in the deployment package and may need to be migrated from the source environment to the target environment separately using the appropriate tools or interfaces for that component. As the actual artifacts included in the package are based on selections used when the package is created, and you may need to manually add or remove selected items from the package depending on the artifacts used in your application. 

K2 ArtifactIncluded in P and D Package?Notes
Data - SmartObjects Yes Even SmartObjects used by the workflow will be included.
Workflows Yes When workflows are created outside of the SharePoint application designer environment (for example with K2 Designer or K2 Studio), you may need to select those workflows manually for inclusion in the package. If they are referenced, P and D will discover the dependency and auto-include them.
Forms and Views Yes Only SmartForms forms and views are included in the package. Custom user interfaces created with another technology are not included.
Custom SmartForms Controls Yes Custom controls are included in the package. K2 Server Administration rights are required when deploying custom controls.
Reports Yes Only the generated reports for the application are included by default. If you have created custom forms and views for reporting purposes, you may need to select those items manually. Any custom reports created with another technology (such as SSRS) will not be included in the K2 package.
SmartBox SmartObject Data User Configurable SmartBox SmartObject data is excluded by default. This can be manually configured during package creation. Packaged data can then be included or excluded when deploying the package.
Roles Yes Roles are deployed as empty. You will need to add role members after deployment.
Service Objects Yes
Categories Yes
Service Instances Yes* Some service instances, like the SharePoint, SAP, and SalesForce service instances, are included by reference only. The package contains the GUID or system name of the service instances required by the SmartObjects in the package. If a service instance is found on the target that matches by service instance name or GUID, it is automatically selected and you cannot select a different service instance. If no matching service instance is found, it will show up as a missing reference.
Custom Service Instances Yes Only custom service instances built using the SmartObject Service SDK can be included in the package.
Service Types and Service Brokers By Reference Only* Service types and the associated brokers must already exist in the target environment.
Environment Library Fields By Reference Only* Environment fields other than miscellaneous (Misc) need to exist on the target. Miscellaneous fields are included in the package.
Workflow Permissions No The deploying user account automatically gains admin rights on the workflow. After a workflow is deployed, use the K2 Management site or K2 Workspace to set workflow permissions for the deployed workflow definition. This only needs to happen the first time a workflow is deployed since workflow permissions are version-agnostic.
Custom Service Brokers No Any customizations must be copied over and installed on the target K2 environment using the appropriate deployment mechanisms for those customizations.
Custom SmartForm Themes By Reference Only* Any customizations must be copied over and installed on the target K2 environment using the appropriate deployment mechanisms for those customizations.
Custom Workflow Wizards No Any customizations must be copied over and installed on the target K2 environment using the appropriate deployment mechanisms for those customizations.