After updating the component (RemObject), my application started not to interrupt the next changes, even setting DeltaChangeErrorEventArgs.CanContinue = false;
This setting always worked for the ProcessError event of the BusinessProcessor object.
For example: In my case I have two records to insert into the same transaction.
line 1
line 2
Flow:
-> 1st: BeforeProcessDelta
-> 2nd: BeforeProcessChange [line 1]
-> 3rd: ProcessError (e.DeltaChange.Message = trigger_person_bi - Invalid Code) [line1]
-> 4th: BeforeProcessChange [line 2]
-> 5º: ProcessError (e.DeltaChange.Message = current transaction is aborted, commands ignored until end of transaction block)
-> 6: AfterProcessDelta
If the variable [.CanContinue = false;] in the [ProcessError] method, the flow should stop in the 3rd step.
======= Connection Settings =======
ConnectionDefinition conexaoBD = new ConnectionDefinition();
conexaoBD.Name = “ConexaoBD”;
conexaoBD.Pool.MaxPoolSize = 10;
conexaoBD.Pool.WaitTimeOut = 600;
conexaoBD.ConnectionString = “DEVART_POSTGRESQL.NET?”;
conexaoBD.ConnectionString += “Host=localhost”;
conexaoBD.ConnectionString += “;Port=5432”;
conexaoBD.ConnectionString += ";Database=postgres;
conexaoBD.ConnectionString += “;User Id=postgres”;
conexaoBD.ConnectionString += “;Password=postgres”;
conexaoBD.ConnectionString += “;Unicode=True;Persist Security Info=True;Schema=public;Pooling=false;UnpreparedExecute=true;Max Pool Size=100;Connection Timeout=15;Default Command Timeout=0;”;
conexaoBD.Default = true;
connectionManager.ConnectionDefinitions.Add(conexaoBD);
connectionManager.PoolingBehavior = RemObjects.SDK.Pooling.PoolBehavior.RaiseError;
connectionManager.PoolTransactionBehaviour = PoolTransactionBehaviour.Rollback;
connectionManager.WaitIntervalSeconds = 10;
connectionManager.PoolingEnabled = false;
connectionManager.MaxPoolSize = 5;
connectionManager.ConnectionPoolTimeout = 600;
======= Components =======
Devart: 7.11.1229.0
RemObjects Data Abstract for .NET, Server Edition - 9.4.109.1377
PostgreSQL 10.3
======= Application log =======
RemObjects.DataAbstract.DAException: Multiple rows match the change in delta 'person: ’
em RemObjects.DataAbstract.DataAdapter.MergeTableDelta(DataTable table, Delta delta, Boolean acceptChangesDuringUpdate, Boolean briefcase)
em RemObjects.DataAbstract.DataAdapter.MergeTableDelta(DataTable table, Delta delta)
em RemObjects.DataAbstract.DataAdapter.MergeDelta(DataSet dataset, IEnumerable`1 deltas)
em RemObjects.DataAbstract.DataAdapter.InternalUpdate(DataSet dataset, String[] tableNames)
em RemObjects.DataAbstract.DataAdapter.Update(DataSet dataset)
======= PostgreSQL log =======
2019-01-16 09:22:30.318 -03 [4424] ERROR: trigger_person_bi - Invalid Code
2019-01-16 09:22:30.318 -03 [4424] CONTEXT: PL/pgSQL function f_person() line 5 at RAISE
2019-01-16 09:22:30.318 -03 [4424] STATEMENT: INSERT INTO “public”.“person” (
"id_person",
"name")
VALUES (
1,
E'Maxwell')
2019-01-16 09:22:30.319 -03 [4424] ERROR: current transaction is aborted, commands ignored until end of transaction block
2019-01-16 09:22:30.319 -03 [4424] STATEMENT: select nextval(’“seq_primary_key”’)
2019-01-16 09:22:30.320 -03 [4424] LOG: duration: 0.044 ms statement: COMMIT
Is there any configuration / variable that we can change so that upon triggering the ProcessError method it can interrupt the flow of the transaction by giving ROLLBACK that has changed in this new version of RemObjects?