Symptoms
Cannot Import a package into another K2 Server.
Diagnoses
Package and deployment fails when trying to deploy to a new server. The follow error from the Host server log was returned: System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'PK__#B6432DF__3214EC26F9C5D8D6'. Cannot insert duplicate key in object 'dbo.@ActionInstance'. The duplicate key value is (851be612-d3e7-4acf-9d33-8fa5bed53abd). The data for table-valued parameter "@ActionInstance" doesn't conform to the table type of the parameter. The statement has been terminated. at SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection.RemoteCall(String TypeName, String MethodName, Objectb] Parameters, Booleano] NullList, MarshalMessageType CallType) at SourceCode.Hosting.Client.BaseAPI.BaseAPI.RemoteSessionCall(String TypeName, String MethodName, Objectb] Parameters, Booleano] NullList) at SourceCode.Forms.Management.FormsManager.DoSessionCall(String method, Objectb] parameters, Booleano] nullList) at SourceCode.Forms.Management.FormsManager.Deploy(String definition, String category, Boolean checkIn) at SourceCode.Runtime.Services.Forms.FormsSessionData.DeployView(View view, Boolean checkIn) at SourceCode.Runtime.Services.Forms.Services.BaseFormViewService`3.Deploy(IDeploymentContext context) ClientConnectionId:11712b12-6224-4eb5-b642-3ec81a7beccb
Resolution
Please check to see if there missing references within the form rules as this could usually be the case here. If there are missing mappings its is advisable to go through the config wizards.
Once this has been done, please try and recreate the package and deploy once again.