Skip to Main Content

APEX

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

ORACLE APEX RAISED USER-DEFINED EXCEPTION FOR START WORKFLOW PROCESS

15062895 days ago — edited 5 days ago

Hi everyone,

I am constructing a business web by Oracle Apex. I found some problem when I set up processes for web page.

In web page, I designed 2 processes:

  1. Interactive grid (edit mode) process for update/insert/delete mode. (Processing)
  2. Start workflow for approval task. (After submit)

However, when I run web, it raises an user-defined error:

  • is_internal_error: false
  • ora_sqlcode: 1
  • ora_sqlerrm: ORA-06510: PL/SQL: unhandled user-defined exception ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 5148 ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 1109 ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 1005 ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 5086 ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS_NATIVE", line 1116 ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS_NATIVE", line 1478 ORA-06512: at "APEX_230200.WWV_FLOW_PLUGIN", line 3634
  • component.type: APEX_APPLICATION_PAGE_PROCESS
  • component.id: 7675264569296919
  • component.name: Start Workflow
  • error_backtrace:
    ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 5148 ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 1109 ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 1005 ORA-06512: at "APEX_230200.WWV_FLOW_WORKFLOW", line 5086 ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS_NATIVE", line 1116 ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS_NATIVE", line 1478 ORA-06512: at "APEX_230200.WWV_FLOW_PLUGIN", line 3634 ORA-06512: at "APEX_230200.WWV_FLOW_PROCESS", line 192

This is my Update/Insert/Delete PLSQL code:

BEGIN
CASE 
WHEN :apex$row_status = 'C' THEN
INSERT INTO TMP_UPDATE (
EMP_ID, EMP_HANOI, EMP_HCM, EMP_DANANG, STATUS, OPERATION, NOTE, EDIT_BY, EDIT_ON
) VALUES (
:EMP_ID, :EMP_HANOI, :EMP_HCM, :EMP_DANANG, 'PENDING', 'INSERT', :NOTE, :APP_USER, SYSDATE
) RETURNING ROW_ID INTO :P8_ROW_ID;

WHEN :apex$row_status = 'U' THEN 
INSERT INTO TMP_UPDATE (
EMP_ID, EMP_HANOI, EMP_HCM, EMP_DANANG, STATUS, OPERATION, NOTE, EDIT_BY, EDIT_ON
) VALUES (
:EMP_ID, :EMP_HANOI, :EMP_HCM, :EMP_DANANG, 'PENDING', 'UPDATE', :NOTE, :APP_USER, SYSDATE
) RETURNING ROW_ID INTO :P8_ROW_ID;

WHEN :apex$row_status = 'D' THEN 
INSERT INTO TMP_UPDATE (
EMP_ID, EMP_HANOI, EMP_HCM, EMP_DANANG, STATUS, OPERATION, NOTE, EDIT_BY, EDIT_ON
) VALUES (
:EMP_ID, :EMP_HANOI, :EMP_HCM, :EMP_DANANG, 'PENDING', 'DELETE', :NOTE, :APP_USER, SYSDATE
) RETURNING ROW_ID INTO :P8_ROW_ID;
END CASE;
-- EXCEPTION
-- WHEN OTHERS THEN
-- -- Handle exceptions, log error messages or report errors
-- APEX_DEBUG_MESSAGE.LOG_MESSAGE(p_message => 'Error in workflow: ' || SQLERRM);
-- RAISE;
END;

and Workflow process retrieve P8_ROW_ID to be active but when starting workflow process, P8_ROW_ID is null.

Could you give me some solutions to tackle this issue?

Comments
Post Details
Added 5 days ago
0 comments
33 views