Can APEX be used in combination with an Oracle database where the ruleframe of headstart is installed?
How will the ruleframe interact with APEX?
How can you make use of the error messages from the ruleframe?
I also posted the question on the APEX forum, but I didn't get a good answer.
Oracle CDM Ruleframe exists of PL/SQL packages in the database. So it could work in combination with APEX. The ruleframe also works when you connect to the database i.e. with sql. If an action is not allowed an error is raised. You would have to write some pl/sql so the message stack will be read after an error has occured.
I have tried a few options. Ideas that never got off the ground.
Modify APEX to wrap DML. Could not safely modify WWW_FLOW_DML to add a wrapper. Considered too dangerous.
Modify Headstart to capture error messages to display in a popup. Could not work out when to clear this temporary buffer so it will work in all instances.
Modify the error handling on the APEX page to run a PL/SQL to return the error messages in the current session - could not do this successfully. Ideas that partially worked.
These ideas captured the error messages, but failed to let APEX do it's standard operations. For example all these lost session state after any database error being raised during an INSERT. So you fill in the create form, get the error form, return to your form and all details are lost.
VAPI with error handling added - FAIL.
OpenTransaction and CloseTransactionPlusErrors PL/SQL processes - pre and post DML processes - FAIL.
Using a Function to do the open, insert, close, error handling - FAIL. Although probably the best of a bad bunch. The only working idea at this stage.
Create a validation PL/SQL process that does the INS/UPD/DEL rollsback but returns the error message.
Open transaction, Do INS/UPD/DEL based on V('REQUEST'), close transaction, abort transaction, error handle. Yes, you have to write a validation function for every table.
If anyone has any other ideas that work, please let me know. Thanks