I am having a wft program, which checks a function activity and depending on the value returned sends difference notifications.
The package body completed successfully from backend and while running the workflow program it sends a notification also. But while opening the notification it gives the following error,
ORA-20006: ORA-01722: invalid number ORA-06512: at "APPS.WF_NOTIFICATION", line 5328 ORA-06512: at line 5
I have 3 procedures in my package body and all the 3 procedures have exceptions defined as follows, if they are using any workflow activities.
WHEN OTHERS THEN
RAISE_APPLICATION_ERROR (-20006, SQLERRM);
But I am not able to figure out what is causing this error. What does this "line 5328 ORA-06512: at line 5" in the error message indicate?. My package body has only 600 lines. And why is the error message not displaying the procedure name? though I have defined the procedure name in the exception.
What is the best way to get the procedure name in the error message? So that it becomes easier for identifying which procedure is causing the erro?
Please let me know.
Instead of the RAISE_APPLICATION_ERROR command, just replace that with RAISE;
The error is coming out of the package that is sending the notification (WF_NOTIFICATION), which is invoked when you open the notification. I'm guessing that line 5 is the line in your code though.
Are you using documents to send the notification, or are they purely defined in the .wft file?
Alpha review chapters from my book "Developing With Oracle Workflow" are available on my website:
http://forum.workflowfaq.com NEW! - WorkflowFAQ Blog at http://thoughts.workflowfaq.com
Typically an exception from within WF_NOTIFICATION package is caused when you have defined a PLSQL or PLSQLCLOB document type message attribute to generate the notification message body. Any uncaught exceptions from within your PLSQL Document API is raised to the notification details page.
Please use only RAISE; within "WHEN OTHERS THEN" after setting the context. Also, please check if your PLSQL Document API is right?