Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Directly marking spreadsheet rows as modified/failed in ADF Desktop Integration - Table component -

Alan Gutierrez-OracleAug 16 2019 — edited Aug 19 2019

Hi, please help with the following.

Introduction:

We import invoices whose information is stored in two different sql tables.

The general information of the invoice is saved in an INVOICE HEADER table and the detailed information can be saved in one or more records of the INVOICE LINES table.

The information is stored in an ADF Table Component. Some columns are available to store information about the header and the remaining columns for the lines. Therefore, if you want to create an invoice with 10 lines, then 10 lines need to be processed. The first row has header and line information both. The remaining 9 lines only store its own line information.

Rows are processed in batch. Before and after processing a row, we use the createDummyrowinTrans and afterInsert methods, which are defined in the Application Module.

The afterInsert method is called the first time for each row in the spreadsheet. The method validates the data entered through attribute validations defined in our ViewObjects. If any exception is thrown during validation, then we store the interface id. This id is like a local invoice header id.

Subsequently, the same afterInsert method is called for each row that had no error in the first stage.

The current problem is that if an invoice has an invalid line, then its other lines are marked as processed. Hence, once user corrects only the line with error, then the system only stores that single line (since the other lines are already marked as processed without changes), which is not expected behavior.

As a solution, I tried throwing an exception for those other lines of the invoices with error found during the first round.

However, having an exception during the second round causes the entire process to end.

Question:

During our afterInsert (insert-after-row-action of a table-component) process, how can we directly mark spreadsheet rows as MODIFIED / FAILED?

During the second round we already know what lines to mark as failed. So I think that should be the solution.

Thanks,

Alan

Comments
Post Details
Added on Aug 16 2019
4 comments
155 views