Error trying to update workflow with staging application

jeff McDaniel asked on March 8, 2017 18:51

Hi all,

We recently upgraded to Kentico 10.0.7. The upgrade went well and I didn't notice anything weird. However, I tried to update a workflow using the staging application and received the below error.

`SyncServer.ServerError: Exception occurred: [DataConnection.HandleError]: 
Query: IF NOT EXISTS (SELECT * FROM CMS_WorkflowStepRoles WHERE ([StepID] = @StepID1 
AND [RoleID] = @RoleID AND [StepSourcePointGUID] = @StepSourcePointGUID1)) 
BEGIN INSERT INTO CMS_WorkflowStepRoles ([StepID], [RoleID], [StepSourcePointGUID]) 
VALUES (@StepID, @RoleID, @StepSourcePointGUID) SELECT SCOPE_IDENTITY() AS [ID] END 
ELSE UPDATE CMS_WorkflowStepRoles SET [StepID] = @StepID, [RoleID] = @RoleID, 
[StepSourcePointGUID] = @StepSourcePointGUID WHERE ([StepID] = @StepID1 AND [RoleID] = @RoleID 
AND [StepSourcePointGUID] = @StepSourcePointGUID1) 
Caused exception: Cannot insert duplicate key row in object 'dbo.CMS_WorkflowStepRoles' with 
unique index 'IX_CMS_WorkflowStepRoles_StepID_StepSourcePointGUID_RoleID'. 
The duplicate key value is (8965, <NULL>, 95). The statement has been terminated.`

Basically the workflow step won't update because there is already an entry in the CMS_WorkflowStepRoles target server. I've tried deleting this entry manually, deleting the entire workflow and trying again, and importing the workflow on the target server. Each time the workflow staging application throws the same error. Each time this happens the problem row appears in the DB table again. It's like it is trying to add the same row twice.

Has anybody seen something like this before? Is there something I'm missing that I can try?

Thanks Jeff

Recent Answers


Chetan Sharma answered on March 9, 2017 08:04

Hi Jeff,

It could be the fact that manual deletion is not deleting all the books and links related to a page workflow.

Did you try disassociating pages from the workflow. Go to you workflow and their will be a pages tab. These pages are pages associated with a workflow. An option will come to keep changes and unhook the WF. do this and give it a shot again.

Thanks Chetan

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.