Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Unable to clone application - CK__EventListeners__OnlyWorkflowOrStep failure



  • What can I do to resolve the following issue?

    I’m unable to duplicate an existing application when creating a new application in BuildMaster v4.6.4. Looking at the event log I see the following exception. The application I wish to clone has three entries in dbo.EventListeners, two with a WorkflowStep_Workflow_Id defined and no BuildStep_Workflow_Id and the other with the reverse set-up. Hence the application I’m cloning does not break the constraint [CK__EventListeners__OnlyWorkflowOrStep], it’s the BuildMaster implementation of the clone that is leading to the issue. Suspect this error is raised in line 168 of [Workflows_CloneWorkflow].

    Exception information:
    Exception type: SqlException
    Exception message: 500001642HandleError30547160Workflows_CloneWorkflow158The INSERT statement conflicted with the CHECK constraint "CK__EventListeners__OnlyWorkflowOrStep". The conflict occurred in database "BuildMaster", table "dbo.EventListeners".
    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
    at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Inedo.Data.SqlServerDataFactory.ExecuteNonQuery(String storedProcName, IList1 parameters)
    at Inedo.BuildMaster.Data.StoredProcedures.Applications_CloneApplication.Execute()
    at Inedo.BuildMaster.Web.WebApplication.Pages.Administration.Applications.CloneApplicationPage.<>c__DisplayClassa.<CreateChildControls>b__8(Object s, EventArgs e)
    at Inedo.Web.Controls.ButtonLinks.PostBackButtonLink.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Product: BuildMaster
    Version: 4.6.4



  • Thank you for the report – I was able to reproduce this and we should have a fix for it in the next maintenance release (v4.6.5).

    If we get a patch, we will post it here.



  • A patch is available below; run the contained SQL scripts against the BuildMaster database in any order to resolve this. Note that this fix only applies to v4.6.3-4, and will be included in v4.6.5:

    http://44.inedo.com/buildmaster/CloneAppPatch-v4.6.4.zip



Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation