1 Reply Latest reply: Oct 30, 2013 3:37 AM by fa77 RSS

    Custom Notification through java or PL/SQL.

    886575

      Hi All,

       

           I have a requirement to create a custom notification, the same way as oracle workflow notification. Is there any API to use to display custom notifications in ebiz without using the workflows?

       

           To give a little back ground, The customer will receive a xml file from a 3rd party. Based on the file in data, I need to display some information from file in the notifcation to the client whenever he/she logs in. Just like workflow notificatons.

       

           I can always create a custom table based on the xml data file and create Oracle Alerts to fire an email, but I am looking for notifcation instead of mail. Any thoughts?

       

      Many Thanks,

      Santosh.

        • 1. Re: Custom Notification through java or PL/SQL.
          fa77

          Yes, it's possible, please modify the following script as per your requirements.

           

          CREATE OR REPLACE PROCEDURE APPS.XX_REQ_NOTIFY_REQ (
             p_requester   IN VARCHAR2,
             p_po          IN VARCHAR2
             )
          AS
             ln_notification_id   NUMBER;
             lv_role_name         VARCHAR2 (100);
             lv_key               VARCHAR2 (50);
             lv_from_user         VARCHAR2 (100);
             lv_from_role         VARCHAR2 (100);
          BEGIN
             SELECT b.user_name
               INTO lv_role_name
               FROM fnd_user b, per_people_f f
              WHERE f.PERSON_ID = b.employee_id AND f.FULL_NAME = p_requester;
          
          
             IF lv_role_name IS NOT NULL
             THEN
                lv_key := TO_CHAR (SYSDATE, 'DDMMRRRRHH24MISS');
                ln_notification_id :=
                   wf_notification.send (ROLE       => lv_role_name,
                                         msg_type   => 'CS_MSGS',
                                         msg_name   => 'FYI_MESSAGE',
                                         priority   => 1);
          
          
          
          
                wf_notification.
                setattrtext (ln_notification_id,
                             'OBJECT_TYPE',
                             'Xxx Xxxxx Xxxxxx');
          
          
                wf_notification.
                setattrtext (
                   ln_notification_id,
                   'MESSAGE_TEXT',
                      'Xxx Xxxxx Xxxxxx'
                   || CHR (10)
                   || CHR (10)
                   || 'Purchase Order - '
                   || p_po);
          
          
               COMMIT;
             --DBMS_OUTPUT.put_line(v_res);
             END IF;
          EXCEPTION
             WHEN NO_DATA_FOUND
             THEN
                NULL;
          
          END;