This custom procedure which helps us to find the critical logs while working in WORKFLOW
Step 1: Create a Sequence
DROP SEQUENCE XX_DEBUG_S
/
CREATE SEQUENCE XX_DEBUG_S START WITH 1
/
Step 2: Create a Table
DROP TABLE xx_debug_log
/
CREATE TABLE xx_debug_log
(id NUMBER
,log VARCHAR2(1000)
,ldate DATE
)
/
Step 3: Create a Custom Procedure
CREATE OR REPLACE PROCEDURE log_error(p_err_msg VARCHAR2)
IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO xx_debug_log VALUES(XX_DEBUG_S.nextval,p_err_msg,sysdate);
COMMIT;
END;
/
USAGE : Call the below statement in the workflow dependent package so we will understand the workflow node and it will list all the point it reached before getting stuck with any error !
BEGIN
log_error('Custom Message - Stage 1');
.....
<Some Logic>
.....
log_error('Custom Message - Stage 2');
END;
Select * from xx_debug_log;
Step 1: Create a Sequence
DROP SEQUENCE XX_DEBUG_S
/
CREATE SEQUENCE XX_DEBUG_S START WITH 1
/
Step 2: Create a Table
DROP TABLE xx_debug_log
/
CREATE TABLE xx_debug_log
(id NUMBER
,log VARCHAR2(1000)
,ldate DATE
)
/
Step 3: Create a Custom Procedure
CREATE OR REPLACE PROCEDURE log_error(p_err_msg VARCHAR2)
IS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO xx_debug_log VALUES(XX_DEBUG_S.nextval,p_err_msg,sysdate);
COMMIT;
END;
/
USAGE : Call the below statement in the workflow dependent package so we will understand the workflow node and it will list all the point it reached before getting stuck with any error !
BEGIN
log_error('Custom Message - Stage 1');
.....
<Some Logic>
.....
log_error('Custom Message - Stage 2');
END;
Select * from xx_debug_log;
No comments:
Post a Comment