Commit_form call is supposed to save the transaction on the data entry screen first to the custom application table(s) and then invoke the procedures as listed in the coding. However in our case, the consecutive procedures are reading the value from form (:header_blk.order_number) and gone ahead with processing the data over Order management repositories for missing transactions!!! (user's identified these were the cases when there were network failures, client systems hanging up, java crashing etc)
Begin Commit_form; --Call first procedure; stage_1(:header_blk.order_number); stage_2(:PARAMETER.STAGE_1_SUCCESS); End;
Now my query is whether there is a better approach towards this requirement and whether depending upon a view for a cross verification is really a practical solution.
Declare l_trx_check VARCHAR2(1); Begin Commit_form; Begin Select 'X' into l_trx_check from order_hdr_id_v where order_number = :header_blk.order_number; Exception when no_data_found then message('Local transaction not saved. Please try again'); raise form_trigger_failure; End; --Call first procedure; stage_1(:header_blk.order_number); stage_2(:PARAMETER.STAGE_1_SUCCESS); End;
Andreas Weiden wrote:Thank you Andreas
I would check if you could use a POST instead of a COMMIT_FORM, so that all your actions are done in the same transaction. With your coding there is the chance that the first commit is excuted, but then the form craches in the afterwards processing.