I’m not sure Cloverleaf can keep track of specific rows (or identifiers of rows) while it is performing it’s select query, and then hand that information to the read success or read failure UPOC. Perhaps it can be an enhancement, but this is kind of a vague request. How would Cloverleaf know what to keep track of? It may be cumbersome to implement. You could designate a column to track, in a new variable on the config screen, and then Cloverleaf would make this variable available to the Read Success query.
On the other hand, ‘deleting behind’ is a typical component of a transaction and it would be nice to have a feature to help handle this activity.
Using a stored procedure instead of a raw SQL query may help. The stored procedure could do both of returning the desired data and also setting some indicator that certain rows were fetched. The indicator would be somewhere in the database. Perhaps the best place for the indicator is another column on the same table. The next time the DB Inbound is executed, the stored procedure would ignore the rows that had the indicator set.
The Read Success UPOC would also execute a stored procedure that would delete the rows with the indicator set. However that does not help executing the Read Failure UPOC – if you could guarantee that the Inbound DB thread only runs single-threaded, then the Read Failure UPOC could remove the ‘processed’ indicator, thus making the rows available for the next execution. But if this is multi-threaded, you could have two executions of the Inbound, get two different result sets, and have ‘processed’ indicators set for both of them, and then if the Read Failure is executed for one of the sets, it could clear out the processed flag for both result sets.
Perhaps a Cloverleaf enahncement in this area would be to request a timestamp or guid be generated for each execution, and be made available in a special variable that could be included as an argument to the stored procedure call. And this same value/variable would be made available to the Read Success or Read Failure action.