Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am new to SharePoint and .Net development, sorry if answer for my question is obvious.

I've created a solution, pack it to the WSP package and deploy. It deploys without errors, creates all lists, but I can't see my workflows. When I deploying it from VS2010 all works fine. Log contains many rows, but it seems that there is no suspicious, may be except:

System.Data.SqlClient.SqlException: Cannot insert duplicate key row in object 'dbo.AllDocs' with unique index 'AllDocs_Url'.  The statement has been terminated.     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)     at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()     at System.Data.SqlClient.SqlDataReader.get_MetaData()     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)     at... a24942cc-743e-4d97-b534-e5aaf47133aa
03/12/2012 15:58:36.32* w3wp.exe (0x1910)                           0x1074  SharePoint Foundation           Database                        880i    High        ... System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)     at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)     at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)     at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)     at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand command, CommandBehavior behavior, SqlQueryData monitoringData, Boolean retryForDeadLock...  a24942cc-743e-4d97-b534-e5aaf47133aa
03/12/2012 15:58:36.32* w3wp.exe (0x1910)                           0x1074  SharePoint Foundation           Database                        880i    High        ...)    a24942cc-743e-4d97-b534-e5aaf47133aa
03/12/2012 15:58:36.32  w3wp.exe (0x1910)                           0x1074  SharePoint Foundation           Database                        880k    High           at Microsoft.SharePoint.SPSqlClient.ExecuteQueryInternal(Boolean retryfordeadlock)     at Microsoft.SharePoint.SPSqlClient.ExecuteQuery(Boolean retryfordeadlock)     at Microsoft.SharePoint.Library.SPRequestInternalClass.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext)     at Microsoft.SharePoint.Library.SPRequest.EnableModuleFromXml(String bstrSetupDirectory, String bstrFeatureDirectory, String bstrUrl, String bstrXML, Boolean fForceUnghost, ISPEnableModuleCallback pModuleContext)     at Microsoft.SharePoint.SPModule.ActivateFromFeature(SPFeatureDefinition featdef, XmlNode xnModule, SPWeb web)     at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.... a24942cc-743e-4d97-b534-e5aaf47133aa
03/12/2012 15:58:36.32* w3wp.exe (0x1910)                           0x1074  SharePoint Foundation           Database                        880k    High        ...ProvisionModules(SPFeaturePropertyCollection props, SPSite site, SPWeb web, Boolean fForce)     at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce)     at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)     at Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly)     at Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, String featureName, Version version, SPFeaturePropertyCollection properties, Boolean force, Boolean fMarkOnly, SPFeatur...  a24942cc-743e-4d97-b534-e5aaf47133aa
03/12/2012 15:58:36.32* w3wp.exe (0x1910)                           0x1074  SharePoint Foundation           Database                        880k    High        ...eDefinitionScope featdefScope)     at Microsoft.SharePoint.SPUserSolutionCollection.EnsureSiteCollectionFeaturesActivated(SPUserSolution solution)     at Microsoft.SharePoint.WebControls.SolutionItemButton.ActivateItem()     at Microsoft.SharePoint.WebControls.SPLinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context) ...  a24942cc-743e-4d97-b534-e5aaf47133aa
03/12/2012 15:58:36.32* w3wp.exe (0x1910)                           0x1074  SharePoint Foundation           Database                        880k    High        ...    at ASP.ACTIVATE_ASPX__420317546.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNot...  a24942cc-743e-4d97-b534-e5aaf47133aa
03/12/2012 15:58:36.32* w3wp.exe (0x1910)                           0x1074  SharePoint Foundation           Database                        880k    High        ...ification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)    a24942cc-743e-4d97-b534-e5aaf47133aa
03/12/2012 15:58:36.32  w3wp.exe (0x1910)                           0x1074  SharePoint Foundation           Database                        880j    High        SqlError: 'Cannot insert duplicate key row in object 'dbo.AllDocs' with unique index 'AllDocs_Url'.'    Source: '.Net SqlClient Data Provider' Number: 2601 State: 1 Class: 14 Procedure: 'proc_AddDocument' LineNumber: 185 Server: 'CH02SP01' a24942cc-743e-4d97-b534-e5aaf47133aa
03/12/2012 15:58:36.32  w3wp.exe (0x1910)                           0x1074  SharePoint Foundation           Database                        880j    High        SqlError: 'The statement has been terminated.'    Source: '.Net SqlClient Data Provider' Number: 3621 State: 0 Class: 0 Procedure: 'proc_AddDocument' LineNumber: 185 Server: 'CH02SP01'    a24942cc-743e-4d97-b534-e5aaf47133aa

Am I right, that I don't have to do any additional steps for deploying workflows (for example, manual registration workflow, etc.), if it work when I deploying it from VS, it must work when I deploying it from WSP package?

Do you have any suggestions, where is the problem?

Any help is very appreciated.

PS: SharePoint 2010, there are some InfoPath forms in the solution.

share|improve this question
    
Check if your particular feature with workflow is activated in the site, because when deploying from visual studio, it can automatically activate it, but Central Admin not. –  Kai Mar 12 '12 at 15:56
    
Features (my project consists of two) are activated. –  MikhailSP Mar 12 '12 at 16:07
add comment

1 Answer 1

up vote 1 down vote accepted

when you create workflow project through VS2010, your first step is setup of list that should be associated with a workflow, it is an instruction for VS2010 how to associate workflow with a list for debug. The package itself does not have any information about this relationships. Thus if you deploy solution through powershell or stsadm you should associate your workflow by hand.

share|improve this answer
    
Thank you for the answer. Am I right, that without any association in code, in any cases, I have to see my workflow, when I select list (in browser) / and choose add workflow? I can see there built-in workflows, but not my... –  MikhailSP Mar 12 '12 at 16:06
    
did you activate feature before? you should do it by hand too. If you do not see your feature in the list, you can check that the silution is deployed correctly in the CA –  Alexander Mar 12 '12 at 18:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.