Workflow trace fails for nested workflow

When there is a workflow with Trace Level = InheritExisting and it has a WorkflowCall step, turning the trace on just for the called workflow results in an error.

Already reported here.

2024-07-23 17:12:57,108 [40] ERROR Origam.DA.Service.AbstractSqlDataService - Update failed
System.Data.SqlClient.SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK_AsapTraceWorkflowStep_refAsapTraceWorkflowId_AsapTraceWorkflow". The conflict occurred in database "*", table "dbo.OrigamTraceWorkflow", column 'Id'.
The statement has been terminated.
   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 961
   at Origam.DA.Service.AbstractSqlDataService.<>c__DisplayClass21_2.<UpdateData>b__1() in D:\a\1\s\backend\Origam.DA.Service\AbstractSqlDataService.cs:line 601
   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 2984
   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 591
ClientConnectionId:2298fb83-d00e-4386-8178-9a2c9658d115
Error Number:547,State:0,Class:16
2024-07-23 17:12:57,140 [40] ERROR Origam.DA.Service.AbstractSqlDataService - Update failed
System.Data.SqlClient.SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK_AsapTraceWorkflowStep_refAsapTraceWorkflowId_AsapTraceWorkflow". The conflict occurred in database "*", table "dbo.OrigamTraceWorkflow", column 'Id'.
The statement has been terminated.
   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 961
   at Origam.DA.Service.AbstractSqlDataService.<>c__DisplayClass21_2.<UpdateData>b__1() in D:\a\1\s\backend\Origam.DA.Service\AbstractSqlDataService.cs:line 601
   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 2984
   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 591
ClientConnectionId:2298fb83-d00e-4386-8178-9a2c9658d115
Error Number:547,State:0,Class:16
2024-07-23 17:12:57,144 [40] ERROR Origam.DA.Service.AbstractSqlDataService - Update failed
System.Data.SqlClient.SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK_AsapTraceWorkflowStep_refAsapTraceWorkflowId_AsapTraceWorkflow". The conflict occurred in database "*", table "dbo.OrigamTraceWorkflow", column 'Id'.
The statement has been terminated.
   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 961
   at Origam.DA.Service.AbstractSqlDataService.<>c__DisplayClass21_2.<UpdateData>b__1() in D:\a\1\s\backend\Origam.DA.Service\AbstractSqlDataService.cs:line 601
   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 2984
   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 591
ClientConnectionId:2298fb83-d00e-4386-8178-9a2c9658d115
Error Number:547,State:0,Class:16

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.