Since upgrading from Forms 11 Update 2 to Update 3, I've noticed a weird behavior. And it might just be me, but it's happened 3 times now, so it seems to be consistent, and I'm wondering if anyone else has seen this, and if maybe it is a possible bug.
I'm seeing this when migrating a process between my test instance of Forms and my production instance. It's a new process that doesn't exist in production at all.
I'll get the usual wizard that says it's a new process, and wants me to verify database tables, workflows, repository connections, etc. - that all looks right. But once the wizard is complete, and it's working through the import, it will throw an error.
After the error, I'll see there are two instances of my process in place. One named "New Process" (whatever the name is) and one named "New Process(1)". The "New Process(1)" shows a modified date of today, but "New Process" shows a modified date that matches the date from the test environment (and I know it didn't exist in Production since then).
I tried opening a couple of these and they didn't load right. Ultimately, I deleted both versions, and then re-ran the import wizard, and it worked correctly that time.
This has happened consistently in this manner three times now, so it feels like a bug and not something weird I'm doing (I don't think I've changed anything about what I'm doing since upgrading).
Both instances are running version 11.0.2212.30907.
Here's the text from the event viewer on the most recent error:
An unexpected error has occurred. [LFF502-UnexpectedError] Details: URL: /Forms/Handlers/BusinessProcessImporterContinue.ashx?override=false&id=e2f5c95e-c5fd-46a3-b18c-61c475b3887a Error: UnexpectedError Date: 2/14/2023 12:15:24 PM (Mountain Standard Time) HTTP Status Code: 500 Business Process ID: 0 User: {REDACTED} IP: {REDACTED} Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Business Process Name: Stack Trace: Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException Message: An unexpected error has occurred. [LFF502-UnexpectedError] Inner exception: System.InvalidOperationException Message: The changes to the database were committed successfully, but an error occurred while updating the object context. The ObjectContext might be in an inconsistent state. Inner exception message: A referential integrity constraint violation occurred: The property value(s) of 'cf_business_processes.bp_id' on one end of a relationship do not match the property value(s) of 'cf_bp_processes.bp_id' on the other end. at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction) at System.Data.Entity.Infrastructure.DbExecutionStrategy.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 E_Forms.Handlers.BPXmlHelper.PersistBPFromXmlReader(BusinessProcess bp, LaserficheIdentity currentUser, Dictionary`2 Warnings, List`1 warningExceptions, Int32 upgradeStep, String name, Boolean overwrite, Boolean DeleteStepsWithInstances, List`1 reportUpdateConfigs, Nullable`1 actionId) at E_Forms.Handlers.BPXmlHelper.RunAction(HttpContext context, Boolean OverrideBP, BusinessProcess businessProcess, Int32 upgradeStep, Dictionary`2 Warnings, Int32& bpId, List`1 updateReports, Nullable`1 actionId) at E_Forms.Handlers.BusinessProcessImporterContinue.ProcessRequest(HttpContext context) Inner exception: System.InvalidOperationException Message: A referential integrity constraint violation occurred: The property value(s) of 'cf_business_processes.bp_id' on one end of a relationship do not match the property value(s) of 'cf_bp_processes.bp_id' on the other end. at System.Data.Entity.Core.Objects.DataClasses.RelatedEnd.CheckReferentialConstraintProperties(EntityEntry ownerEntry) at System.Data.Entity.Core.Objects.DataClasses.RelationshipManager.CheckReferentialConstraintProperties(EntityEntry ownerEntry) at System.Data.Entity.Core.Objects.EntityEntry.AcceptChanges() at System.Data.Entity.Core.Objects.ObjectContext.AcceptAllChanges() at System.Data.Entity.Core.Objects.ObjectContext.SaveChangesToStore(SaveOptions options, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction)
EDIT TO ADD: And it's not consistently doing it, because on the forth form I migrated, it worked without the error. I dunno what's up.