Work queue entry processing sometimes ends up with a concurrency exception error.
I was expecting work queue entry will end up in a queue selected as an “error” queue of the action.
Instead it ended up in the normal queue (with an error)
This was already reported here Work queue entry doesn't end up in the error queue after concurrency exception during processing and the frequency of errors decreased, but again, there is yet another place where it’s not handled and the queue was not moved to the error queue.
The concurrency error raised when trying to delete a currently processed queue entry. The work queue message didn’t end up in the defined error queue, but stays in the main queue with an error, so that the retry didn’t take place.
---> System.Data.DBConcurrencyException: Concurrency violation: the DeleteCommand affected 0 of the expected 1 records.
at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount)
at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping)
at System.Data.Common.DbDataAdapter.Update(DataTable dataTable)
at Origam.DA.Service.AbstractSqlDataService.ExecuteUpdate(DataStructureQuery query, String transactionId, UserProfile profile, DataStructure dataStructure, IDbTransaction transaction, IDbConnection connection, ArrayList deletedRowIds, DataTable changedTable, DataRowState rowState, DataStructureEntity entity, Int32 rowCount, Boolean forceBulkInsert) in D:\a\1\s\backend\Origam.DA.Service\AbstractSqlDataService.cs:line 942
at Origam.DA.Service.AbstractSqlDataService.<>c__DisplayClass21_2.<UpdateData>b__1() in D:\a\1\s\backend\Origam.DA.Service\AbstractSqlDataService.cs:line 585
at Origam.DA.Service.Profiler.ExecuteAndTakeLoggingAction(DataStructureEntity entity, Action`2 loggingAction, Action actionToExecute) in D:\a\1\s\backend\Origam.DA.Service\AbstractSqlDataService.cs:line 2901
at Origam.DA.Service.AbstractSqlDataService.UpdateData(DataStructureQuery query, IPrincipal userProfile, DataSet dataset, String transactionId, Boolean forceBulkInsert) in D:\a\1\s\backend\Origam.DA.Service\AbstractSqlDataService.cs:line 575
--- End of inner exception stack trace ---
at Origam.DA.Service.AbstractSqlDataService.UpdateData(DataStructureQuery query, IPrincipal userProfile, DataSet dataset, String transactionId, Boolean forceBulkInsert) in D:\a\1\s\backend\Origam.DA.Service\AbstractSqlDataService.cs:line 654
at Origam.DA.Service.AbstractSqlDataService.UpdateData(DataStructureQuery query, IPrincipal userProfile, DataSet dataset, String transactionId) in D:\a\1\s\backend\Origam.DA.Service\AbstractSqlDataService.cs:line 452
at Origam.Workflow.DataServiceAgent.SaveData(DataStructureQuery query, DataSet data) in D:\a\1\s\backend\Origam.Workflow\Service Agents\DataServiceAgent.cs:line 252
at Origam.Workflow.DataServiceAgent.Run() in D:\a\1\s\backend\Origam.Workflow\Service Agents\DataServiceAgent.cs:line 421
at Origam.Workbench.Services.CoreServices.DataService.StoreData(DataStructureQuery dataStructureQuery, DataSet data, String transactionId) in D:\a\1\s\backend\Origam.Workbench.Services\CoreServices\DataService.cs:line 143
at Origam.Workflow.WorkQueue.WorkQueueService.WorkQueueRemove(Guid workQueueId, Object queueEntryId, String transactionId) in D:\a\1\s\backend\Origam.Workflow\WorkQueue\WorkQueueService.cs:line 568
at Origam.Workflow.WorkQueueServiceAgent.Remove(IWorkQueueService wqs) in D:\a\1\s\backend\Origam.Workflow\Service Agents\WorkQueueServiceAgent.cs:line 121
at Origam.Workflow.Tasks.ServiceMethodCallEngineTask.OnExecute() in D:\a\1\s\backend\Origam.Workflow\Tasks\ServiceMethodCallEngineTask.cs:line 201
at Origam.Workflow.ProfilingTools.<>c__DisplayClass4_0.<ExecuteAndLogDuration>g__FuncToExecute|0() in D:\a\1\s\backend\Origam.Workflow\ProfilingTools.cs:line 64
at Origam.Workflow.Tasks.AbstractWorkflowEngineTask.MeasuredExecution() in D:\a\1\s\backend\Origam.Workflow\Tasks\AbstractWorkflowEngineTask.cs:line 99
at Origam.Workflow.Tasks.ServiceMethodCallEngineTask.Execute() in D:\a\1\s\backend\Origam.Workflow\Tasks\ServiceMethodCallEngineTask.cs:line 88
--- End of inner exception stack trace ---