CentralAZ / Rock-CentralAZ

An open source CMS, Relationship Management System (RMS), Church Management System (ChMS), and composable application framework.
http://www.rockrms.com
17 stars 3 forks source link

RR - Can't Delete Workflow #81

Closed jrockman13 closed 5 years ago

jrockman13 commented 6 years ago

Before completing your first issue we highly recommend reading this post on Effective Ways To Get Help from Maintainers.

Prerequisites

Description

Yesterday, I added another workflow to notify when reservations are changed. Today, I realized it was a bad idea and tried to delete it. I tried this on our sandbox and did NOT get the error, although I created, saved, and deleted all within a couple minutes.

Steps to Reproduce

  1. Create new workflow (trigger - reservation updated, action Room Reservation Reminder Notification)
  2. Save
  3. Click X to delete
  4. Click Save

Expected behavior:

The workflow deletes.

Actual behavior:

I get this message:

Error The DELETE statement conflicted with the REFERENCE constraint "FK__com_centralaz_RoomManagement_ReservationWorkflow_ReservationWorkflowTriggerId". The conflict occurred in database "cbc-rock-db", table "dbo._com_centralaz_RoomManagement_ReservationWorkflow", column 'ReservationWorkflowTriggerId'. The statement has been terminated.

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, Boolean isInternal, Boolean forDescribeParameterEncryption) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at System.Data.Entity.Infrastructure.Interception.InternalDispatcher1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func3 operation, TInterceptionContext interceptionContext, Action3 executing, Action3 executed) at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.NonQuery(DbCommand command, DbCommandInterceptionContext interceptionContext) at System.Data.Entity.Core.Mapping.Update.Internal.DynamicUpdateCommand.Execute(Dictionary2 identifierValues, List1 generatedValues) at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() at System.Data.Entity.Core.Mapping.Update.Internal.UpdateTranslator.Update() at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess) at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesInternal(SaveOptions options, Boolean executeInExistingTransaction) at System.Data.Entity.Internal.InternalContext.SaveChanges() at System.Data.Entity.Internal.InternalContext.SaveChanges() at Rock.Data.DbContext.SaveChanges(Boolean disablePrePostProcessing) at RockWeb.Plugins.com_centralaz.RoomManagement.ReservationConfiguration.btnSave_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\Plugins\com_centralaz\RoomManagement\ReservationConfiguration.ascx.cs:line 198 at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Versions

tcavaletto commented 6 years ago

Fixed

jrockman13 commented 6 years ago

Thanks! Question: What do I need to do to update? My rock install shows 1.2.2 installed.

From: Taylor Cavaletto notifications@github.com Sent: Friday, July 27, 2018 10:46 PM To: CentralAZ/Rock-CentralAZ Rock-CentralAZ@noreply.github.com Cc: Josiah Rocke jrocke@cbcneenah.org; Author author@noreply.github.com Subject: Re: [CentralAZ/Rock-CentralAZ] RR - Can't Delete Workflow (#81)

Fixed

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/CentralAZ/Rock-CentralAZ/issues/81#issuecomment-408580049, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVIhKsS1iaYo-1dB_nOgk9CtCGUgjX5uks5uK95cgaJpZM4VOHX6.