You are viewing limited content. For full access, please sign in.

Question

Question

Error When Importing Forms Process

asked on May 19 Show version history

Forms Version 11.0.2311.50556

The system reported an error when I was trying to import a Forms process.

This process was new to this system (I was importing from my development environment to my production environment).

After the Import, I see two versions of the process - one with the normal name and one named with a (1) suffix.

The one with the normal name has the forms on it, but won't load the Process Diagram (kind of an indefinitely loading display).  The one with the (1) suffix doesn't list any forms, and won't load the Process Diagram either.

I was able to delete the one with the regular name, but I get an error when trying to delete the one with the (1) suffix.

Here's the error from the Import: 

An unexpected error has occurred. [LFF502-UnexpectedError]

Details:
URL: /Forms/Handlers/BusinessProcessImporterContinue.ashx?override=false&id=013391d9-47e9-4c80-8083-b2fb69c58d43
Error: UnexpectedError
Date: 5/19/2025 1:49:11 PM (Mountain Standard Time)
HTTP Status Code: 500
Business Process ID: 0
User: ***\matthew
IP: *.*.*.*
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.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)

 

Here's the error when trying to delete the one with the (1) suffix: 

An unexpected error has occurred. [LFF502-UnexpectedError]

Details:
URL: /Forms/webapi/v1/businessprocess/DeleteMany
Error: UnexpectedError
Date: 5/19/2025 1:49:31 PM (Mountain Standard Time)
HTTP Status Code: 500
Business Process ID: 0
User: ***\matthew
IP: *.*.*.*
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.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.NullReferenceException
Message: Object reference not set to an instance of an object.
   at E_Forms.WebApi.Version1.Controllers.BusinessProcessController.DeleteMany(Int32[] idList)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__0(Object instance, Object[] methodParameters)
   at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()

 

After I had deleted the one it would let me delete - I tried the import again - and this time it did work to run the import (into the one with the (1) suffix - which I then was able to rename).

It seems to be working now after the re-import - but I've seen hiccups similar to this before (which get really messy when replacing an existing process instead of importing a new one like this) , so I wanted to post this while I had the log details.

I do not believe this is an issue with the XML file itself that I am importing, because when I tried again, I used the same XML file and it worked again (and that was the case with similar issues in the past).

Does anyone have any additional information regarding what the root cause of this issue may be, so I can hopefully avoid it in the future?

0 0

Replies

replied on May 20

We had never seen such error in other cases; did the issue occur often in your system?

Was there any other process being imported or modified at the time you uploaded your process on the first time?

0 0
replied on May 21 Show version history

It's not often - but I've had the same (or a similar) issue occur maybe a half-dozen times over the last couple years.  I'm not certain if it was the same issue, because I didn't get the event logs the other times - but it feels like the same issue.

There would not have been any other process modifications or imports at the same time, because I do over 99% of that kind of work in our environment.  There could have been (maybe even likely) submission activity, but no maintenance activity.

This time it was a process that was new in that environment, so I was able to clean it up.  Other times, it was when updating an existing process, and that resulted in duplicate processes, one that was the old process (and had all the submission history) and one that was the new updated process - so that was quite problematic.

With the times it duplicated an existing process, at least twice I know for certain that I had exported the process from the production environment and into the development environment, worked on it there, and then did the reverse to export from development and import into production, and that was when it was duplicated in production.  I don't have much info about those times.  I started keeping a revision history of process exports so that if it happens again I would have before and after XML files to compare.  But now, with this time happening on a completely new process, I don't think it is the process itself that it being imported, I think something weird happened in the program or the database to cause this.

0 0
replied on May 21

Would you mind open a support ticket and provide us a backup of your database and xml files? We suspect it's related with corrupted data in the database and we need the data to reproduce it.

0 0
replied on May 22

I would need to talk to our team.  There is a lot of sensitive data and PII in our database.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.