Rule can't be traced if not part of a workflow

Tracing a rule fails (isn’t possible) when the trace is turned on for a rule that isn’t a part of a workflow, e.g. data structure rule.

2023-05-15 13:44:22,244 [Workflow 9d9b2034-846b-41fe-a534-4c2b73b66b50] ERROR Origam.DA.Service.AbstractSqlDataService - Update failed
System.Data.SqlClient.SqlException (0x80131904): The INSERT statement conflicted with the FOREIGN KEY constraint "FK_OrigamTraceRule_refOrigamTraceWorkflowId_OrigamTraceWorkflow". The conflict occurred in database "xxx", 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 ds, 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 855
   at Origam.DA.Service.AbstractSqlDataService.<>c__DisplayClass23_2.<UpdateData>b__1() in D:\a\1\s\backend\Origam.DA.Service\AbstractSqlDataService.cs:line 561
   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 2686
   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 557
ClientConnectionId:9ad8759d-d969-4319-ba14-bb09db5605a4
Error Number:547,State:0,Class:16

Make sure the parent workflow of traced rule is traced too. If not, refOrigamTraceWorkflowId will be null.

Even with the trace turned on for the parent workflow the rule is not traced. There is only a general Rule Processing step in the workflow, but the rule itself is mentioned neither in the Workflow Trace panel Rules nor in the Rule Trace. The only rule added to the list is a validation rule on another step.

The rules are traced in master. The foreign key problem was reproduced. The rule seems to be executed too many times.

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