Process getting terminated at a user task. Error is given below. This process has been working without any issues, but recently two got terminated. There are two upload fields in this form, one required and one not required.
-
Inner exception: System.InvalidOperationException Message: Attaching an entity of type 'Laserfiche.Forms.EntityModels.cf_bp_attachment_data' failed because another entity of the same type already has the same primary key value. This can happen when using the 'Attach' method or setting the state of an entity to 'Unchanged' or 'Modified' if any entities in the graph have conflicting key values. This may be because some entities are new and have not yet received database-generated key values. In this case use the 'Add' method or the 'Added' entity state to track the graph and then set the state of non-new entities to 'Unchanged' or 'Modified' as appropriate. at System.Data.Entity.Core.Objects.ObjectContext.VerifyRootForAdd(Boolean doAttach, String entitySetName, IEntityWrapper wrappedEntity, EntityEntry existingEntry, EntitySet& entitySet, Boolean& isNoOperation) at System.Data.Entity.Core.Objects.ObjectContext.AttachTo(String entitySetName, Object entity) at System.Data.Entity.Internal.Linq.InternalSet`1.ActOnSet(Action action, EntityState newState, Object entity, String methodName) at System.Data.Entity.Internal.Linq.InternalSet`1.Attach(Object entity) at System.Data.Entity.DbSet`1.Attach(TEntity entity) at Laserfiche.Forms.EntityModels.cf_bp_attachment_data.AttachToOrGet(IFormsEntities db, cf_bp_attachment_data& attachmentStub) at Laserfiche.Forms.Routing.FlowObject.AddSubmissionData(IEntityContext appContext, cf_submissions submission, SubmissionAttributeData[] attributeDataSet, SubmissionHeaderData submissionHeaderData) at Laserfiche.Forms.Routing.Activity.ProcessSubmissionDataForNewSubmission(SubmissionHeaderData submissionHeaderData, SubmissionAttributeData[] submissionAttributeDataSet, cf_submissions submission) at Laserfiche.Forms.Routing.Activity.UpdateDataForMainProcessInstance(cf_bp_worker_instances processInstance, IRoutingContext routingContext) at Laserfiche.Forms.Routing.UserTask.ExecuteForReEntry(cf_bp_worker_instances processInstance, IRoutingContext routingContext) at Laserfiche.Forms.Routing.UserTask.Execute(Int32 instanceId, IRoutingContext routingContext) at Laserfiche.Forms.Routing.RoutingDispatcher.ExecuteStep(KeyValuePair`2 currentStep, Exception& executionException)
Close
Cannot figure out what the issue could be. Will appreciate your help.