Best Practices Question: How to send error message to SSHR web page.

Best Practices Question: How to send error message to SSHR web page from custom PL\SQL procedure called by SSHR workflow.
For the Manager Self-Service application we’ve copied various workflows which were modified to meet business needs. Part of this exercise was creating custom PL\SQL Package Procedures that would gather details on the WF using them on custom notification sent by the WF.
What I’m looking for is if/when the PL\SQL procedure errors, how does one send an failure message back and display it on the SS Page?
Writing information into a log or table at the database level works for trouble-shooting, but we’re looking for something that will provide the end-user with an intelligent message that the workflow has failed.
Thanks ahead of time for your responses.
Rich

We have implemented the same kind of requirement long back.
We have defined our PL/SQL procedures with two OUT parameters
1) Result Type (S:Success, E:Error)
2) Result Message
In the PL/SQL procedure we always use below construct when we want to raise any message
hr_utility.set_message(APPL_NO, 'FND_MESSAGE_NAME');
hr_utility.raise_error;
In Exception block we write below( in successful case we just set the p_result_flag := 'S';)
EXCEPTION
WHEN APP_EXCEPTION.APPLICATION_EXCEPTION THEN
p_result_flag := 'E';
p_result_message := hr_utility.get_message;
WHEN OTHERS THEN
p_result_flag := 'E';
p_result_message := hr_utility.get_message;
fnd_message.set_name('PER','FFU10_GENERAL_ORACLE_ERROR');
fnd_message.set_token('2',substr(sqlerrm,1,200));
fnd_msg_pub.add;
p_result_message := fnd_msg_pub.get_detail;
After executing the PL/SQL in java
We have written some thing similar to
orclStmt.execute();
OAExceptionUtils.checkErrors (txn);
String resultFlag = orclStmt.getString(provide the resultflag bind no);
if ("E".equalsIgnoreCase(resultFlag)){
String resultMessage = orclStmt.getString(provide the resultMessage bind no);
orclStmt.close();
throw new OAException(resultMessage, OAException.ERROR);
It safely shows the message to the user with all the data in the page.
We have been using this construct for a long time for all our projects. They are all working as expected.
Regards,
Peddi.

Similar Messages

  • How to send error message to forms from Database Trigger

    Hi, Please help me to send error message to forms from Database Trigger?
    RgDs,
    Madesh.R.M

    You are correct, the On-Error trigger is a Forms trigger. However, if your Form is going to display the error generated by the database stored procedure or trigger - you might not see the database error in your Form unless you check the DBMS_ERROR_CODE in the On-Error trigger and manually display the Error Code and associated Text. I've see this happen with a co-worker. The Form she was working on was based on a table with an Before-Insert trigger. Because she was not explicitely handling the error from the Before-Insert trigger in the Forms On-Error trigger, her Form appeared to halt for no reason at all. Once she added code to the On-Error trigger in the Form to handle the DBMS_ERROR_CODE, she discovered the trigger was producing an error and was able to show the error to the user in the On-Error trigger.
    I understand the desire to keep as much as possbile in the database, but with that comes some extra coding in your Forms to handle this. This extra coding could easily be placed in a Forms Library, attached to a Form and called in the On-Error trigger. Your code could look like this:
    DECLARE
       /*This example assumes you have an Alert defined
          in your Form called: 'ERROR' */  
       al_id    ALERT;
       al_text  VARCHAR2(200);  /* Max text of a Forms Alert message*/
       al_btn   NUMBER;
    BEGIN
    IF DBMS_ERROR_CODE != 0 THEN
       /* Error code is ORA-00000 Normal Successful completion
           So only handle non-zero errors  */
       al_text := DBMS_ERROR_CODE||':'||DBMS_ERROR_TEXT;
       al_id := Find_Alert('ERROR');
       set_alert_property(al_id, alert_message_text, al_text);
       al_btn := show_alert(al_id);
    END IF;
    END;Your original question was "How to send error message to forms from Database Trigger?" The answer is you don't because Forms already gets the database error code and database message through the Forms DBMS_ERROR_CODE and DBMS_ERROR_TEXT functions. Look these up in the Forms help and it should clear things up for you.
    Craig...
    Edited by: CraigB on Jun 14, 2010 4:49 PM
    Edited by: CraigB on Jun 14, 2010 4:49 PM
    Edited by: CraigB on Jun 14, 2010 4:50 PM
    Edited by: CraigB on Jun 14, 2010 4:51 PM
    Edited by: CraigB on Jun 14, 2010 4:51 PM

  • How ro send error message from BADI to BAPI

    i have a BADI which is triggered from a BAPI.This BADI has only importing and changing parameters.How can i send error message to BAPI.Please reply at the earliest.
    High points can be expected.

    Hi Arshi,
         Please check whether the following link is of any use to you,
    how to capture the error message from bapi
    Best Regards.
    Reward points if it is helpful.

  • How to delete the error message in the Web page Message Monitoring

    Hi All:
    I'd like to ask a question.If there is error message in the T-code sxmb_moni->Monitor for Processed XML Messages,I can cancel the error message manually and archive the message. After that,I can delete the message from "Monitor for Processed XML Messages".
    But after those operation,I find in the web page " Message Monitoring", there are still messages in the "Messages from Component Integration Server and/or Adapter Engine".
    How can I delete those message both successful and error.
    Thanks All
    Elliott

    Hi Elliot,
    SXMB_ADM
    Integration Engine Configuration
    Specific Configuration
    Category: DELETION
    Parameters: PERSIST_DURATION, PERSIST_DURATION_ERROR
    Subparameters: SYNC, ASYNC
    Change "Current Value".
    and execute your delete job again!
    Regards,
    Udo

  • How to send error message via a mail to the customers email id

    HI experts ,
    i have a requirement,In idoc where i have to send the error message via email to a perticular emailid?
    please help me n tell also which fm is used for that?
    Thanks
    RAhul Sisodia

    Hi ,
    Check this Link..
    [sending an email with multiple attachments;
    Regards,
    Sachin M M

  • How To Display Error Message In Self Service Page

    Dear All,
    I am using 11.5.10 Oracle HRMS self Service ,,,
    How can I display error message on the top of the self service page if some action happen ?
    Best Regards

    Time entry rules maybe?

  • How to send quiz results to a web page?

    Okay, this should have taken 2 minutes, not 2 hours. Very frustrating. Here is the situation:
    * Downloaded Captivate 5 Trial Version
    * Created based quiz (which took forever to figure out how to set the correct answers -- HORRIBLE user interface for setup, but that is another issue)
    * I want the results sent to a web page. I will code the web page & database calls, etc. to handle the information (I am a web developer). Just need the information sent somewhere!
    Several big issues here:
    1. When setting up a URL for the "Pass or Fail", nothing happens. User not taken anywhere. No "Post Results" button shown. The Captivate file just ends and that's it. ??
    2. Finally figured out that I needed the "Internal Server" option chosen to have a Post Results button shown. Okay.
    So when I click Post Results (after answering the 5 questions correctly), I am shown a login box. Why? What is this for? This is not needed. I am going to an INTERNAL SERVER. It is none of Adobe's business what this person's name/email is. What gives? Okay... anyways, I enter my own Adobe login information. It then says "Connecting..." then I get a Status Message that says "Unknown Error". Keep in mind this will be used by a general audience, of which approximately 99.9% will not have an Adobe ID, nor should they need one.
    How I can easily have the Captivate file redirect the user to pages like this: Confirm.aspx?pass=yes or Confirm.aspx?pass=no.
    I don't need anything fancy. But I do need something that works. This is terribly frustrating and I'm about to say it just doesn't work. Please tell me I am wrong.
    Thank for your time and for reading this.
    -Randy

    The Quiz Results slide's Continue button actions are set under Quiz Preferences > Pass or Fail > If Passing Grade etc. By default, the Continue button is set to just continue on to the next slide after the Quiz Results.
    After the user clicks the Continue button on the Quiz Results slide any Pass/Fail actions you've set up there will be evaluated and executed.
    So if the user achieved a passing score, and you set up an action such as Go to URL in Current Window for that case, then the user should find themselves redirected to that URL.  If there was a different action for Failure, and the user failed, then that should happen.  But either of these will only happen after the Continue button is clicked.
    I tested this by setting www.google.com as the go to URL and it worked.  To see if the URL is the issue, try using another URL that you know everyone can get to.  If that works, try to find out why the URL you want to use is not working.  If no URL works, something else is interfering with the action.

  • How to send Parameters FORM to PHP WEB Page with method POST (secure)?

    Hello everyone,
    i hope someone can help me to find a solution to this problem!
    i have to send "+precious+" parameters from an oracle form to php page, like username and password, with a secure method... i tried with WEB.SHOW_DOCUMENT procedure but it uses GET Method and when the web page open up you can read those parameters in the url...no good!
    some suggestion?
    Thank a lot in advance... FMicio

    The other way you have is to make a PJC java bean ...
    which uses HTTPClient library..
    for example:
    PostMethod post = new PostMethod("http://jakarata.apache.org/");
            NameValuePair[] data = {
              new NameValuePair("user", "joe"),
              new NameValuePair("password", "bloggs")
            post.setRequestBody(data);
            // execute method and handle any error responses.
            InputStream in = post.getResponseBodyAsStream();
            // handle response.I have done a multipart form data post to upload files to my db over httpClient.. and other things...
    Or with java.net.* api-s
    try {
        // Construct data
        String data = URLEncoder.encode("key1", "UTF-8") + "=" + URLEncoder.encode("value1", "UTF-8");
        data += "&" + URLEncoder.encode("key2", "UTF-8") + "=" + URLEncoder.encode("value2", "UTF-8");
        // Send data
        URL url = new URL("http://hostname:80/cgi");
        URLConnection conn = url.openConnection();
        conn.setDoOutput(true);
        OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
        wr.write(data);
        wr.flush();
        // Get the response
        BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
        String line;
        while ((line = rd.readLine()) != null) {
            // Process line...
        wr.close();
        rd.close();
    } catch (Exception e) {
    }Or you can call your web page (post data) from your database
    http://awads.net/wp/2005/11/30/http-post-from-inside-oracle/
    Edited by: Peterv6i on Mar 30, 2012 3:49 PM
    Edited by: Peterv6i on Mar 30, 2012 3:55 PM

  • What's this error message on a web page: "No se pudo insertar IP 2605:e000:3fc0:37:6563:1afb:8d61:9783 en base de datos"

    When clicking on a link on a web site in Spanish, I get an error message: "No se pudo insertar IP 2605:e000:3fc0:37:6563:1afb:8d61:9783 en base de datos."
    Is it an issue with the web site or with my computer?
    Thank you,
    Lymsi

    Hi SuperSluether:
    Thank you for your response!
    It looks like issue solved. This morning, I visited the website, and I could access all the links. It got fixed by itself without mine needing to do anything... amazing, but glad it's now all good!
    In any case, thank you again for your help.
    lymsi

  • When i do initial set up w creative cloud set uo wont run send error message"installer failed to initialize" why and how can i get pass this

    When I do initial set up with creative cloud set up it wont run a send error message "installer failed to initialize" comes up. Why and how can I get passed this?

    Error "Installer Failed to Initialize" | Install desktop application | Windows

  • Is it possible to send error message from Adapter Module to CCMS?

    Hi
    Is it possible to send error message from Adapter Module  to CCMS...?I have written on adatper module from there i have to send error message to CCMS or SXMB_MONI. Is it possible if yes please send me the related documents
    Best Regards
    Ravi Shankar B

    Hi
    I have written following User Defined Exeption in my Module program
    class DuplicateFileException extends ModuleException{
              DuplicateFileException(String message){
                   super(message);
    I am throwing my Exception like this
    try{
         throw new DuplicateFileException("Duplicate File");
    }catch(DuplicateFileException e){
         throw e;
    But i am not getting this exception in SXMB_MONI. In adpater monitoring i am getting the following exceptions
    <b>
    2007-05-16 15:51:30 GMT+05:30: Retry interval started. Length: 5.000 s
    - 2007-05-16 15:51:30 GMT+05:30: Error: java.lang.NullPointerException
    - 2007-05-16 15:51:30 GMT+05:30: An unknown error occured.
    - 2007-05-16 15:51:30 GMT+05:30: Processing started
    - 2007-05-16 15:51:25 GMT+05:30: Error: java.lang.NullPointerException</b>
    can any one give me the idea how to send error from module program to SXMB_MONI
    Thanks & Regards
    Ravi Shankar B

  • How to give a message in the UI page if there is an error in AppImpl method

    How to give an error message in the jsf page if the AppImpl method fails ?
    Use case : I have a create form and a submit button which binds with a client interface method in Application Impl class. If the method fails due to some exception , how can I notify the users with proper error message ?
    Thanks
    Suneesh

    Hi,
    As the previous reply (casting the result) is the best solution here (separating model and view logic) but sometimes we do a shortcut.
    may be it is not the best approach but it comes handy most of the time, this approach is also error-proven. we used it more than 2 years in large applications.
    add the following code whenever you want to add message in UI be aware that we have add it in a jar and add that library to the model projects
    FacesContext ctx = getFacesContext();
    FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_ERROR, msg, "");
    ctx.addMessage(null, fm);
    you just need to add jsf library to the model applications and replace msg with your message.
    regarding throw jboException, it seems good most of the time but sometimes when you are in middle of the transaction it somehow ruin the flow of the transactions.
    Regards.

  • How to send ALL message that is in Outbox without ...

    How to send ALL message that is in Outbox without doing it one by one sending?
    All status is either deferred, or failed. is there a way that can auto resend but not doing it one by one?
    I have hundred of message un-send and stuck in outbox.
    Please help.

    try select options then scroll down to mark mark all if this does not work you will either have to delete or resend,you can delete all messages via the same mark all option your best of to just remove,also keep your inbox to a minimum
    If  i have helped at all a click on the white star below would be nice thanks.
    Now using the Lumia 1520

  • SAP Adapter Best Practice Question for Migration of Channels

    I have a best practice question on the SAP adapter when migrating an OSB project from one environment (DEV) to another (QA).
    If my project includes an adapter channel that (e.g., Inbound SAP Proxy listening on a channel), how do I migrate that project to another environment if the channel in the target environment is different.
    I tried using the search and replace mechanism in the sbconsole, but it doesn't find the channel name in the jca and wsdl files.
    What is the recommended way to migrate from one environment to the other when the channel name changes?

    I have a best practice question on the SAP adapter when migrating an OSB project from one environment (DEV) to another (QA).
    If my project includes an adapter channel that (e.g., Inbound SAP Proxy listening on a channel), how do I migrate that project to another environment if the channel in the target environment is different.
    I tried using the search and replace mechanism in the sbconsole, but it doesn't find the channel name in the jca and wsdl files.
    What is the recommended way to migrate from one environment to the other when the channel name changes?

  • Sending error messages

    When I send error messages it disables the back, exit and cancel button.
    How can I enable them?

    Use popup window to notify errors...
    CALL SCREEN '1100' AS WINDOW STARTING AT 10 10.
    <i>OR</i>
    CALL FUNCTION 'POPUP_TO_CONFIRM'
      EXPORTING
       TITLEBAR                    = 'Test '
        text_question               = 'Error message'
       DISPLAY_CANCEL_BUTTON       = ' '
    Regards
    ramana

Maybe you are looking for

  • Error while compile client! Please help

    Hi everybody, I am new to J2EE. I hav got application server and client in the same computer. While compile client application to test the server part followint error is shown: 28-Feb-2007 10:36:05 com.sun.corba.ee.spi.logging.LogWrapperBase doLog IN

  • Error 1905.module c:\program\files\quicktime\QTOcontrol.dll

    I'm trying to install itunes version 7. I keep getting this message. error 1905.module c:\program\files\quicktime\QTOcontrol.dll failed to unregister HRESULT -2147220472. Contact your support personnel. Anyone know how to fix this?   Windows XP   del

  • WAD 3.5 URL - Command Sequence Filter and set_hierarchy_state in same url

    Hey folks, i need your help with following command sequence: The Filter command works perfekt, but the second command 'set_hierarchy_state' doesnt work. I really tried everything, read blogs and how-to's...  please help me out: &CMD=LDOC&TEMPLATE_ID=

  • Method 'WriteRecord' of business component 'Contact'

    Hi All, I'm trying to upload data into CRMOD for contact object, I'm an Administrator , I'm using Stubs to create my SOAP XML. Below is the response i received. Can anyone help me on this. Its urgent. ERROR 1: <siebelf:errormsg_>Method 'WriteRecord'

  • Adding SSD to G400S

    I bought G400S with windows 8 can i added the SSD storage in this laptop? if could, how should i done this without replacing the HDD? i read about the PCIE slot for G400S, so i've been thinking about the mSATA PCIE SSD storage..would it fit? thank yo