2 Replies Latest reply: Aug 2, 2013 4:01 PM by user539616 RSS

    Adding #FROM_ROLE TO wf_notifications.send is giving error :active autonomous transaction detected and rolled back

    user539616

      Hello all,

       

      I'm using the below code to send the notication using plsql package. It works fine and sends notification if i don't use '#FROM_ROLE' and 'SENDER' attributetext in the code. If i use them, i get the error message. Please advice

       

          L_MESSAGE_TYPE := 'WFMAIL';

          L_MESSAGE_NAME := 'OPEN_MAIL_FYI';

          L_NID          := WF_NOTIFICATION.SEND(UPPER(P_USER_NAME),

                                                 L_MESSAGE_TYPE,

                                                 L_MESSAGE_NAME);

          WF_NOTIFICATION.SETATTRTEXT(L_NID, 'SUBJECT', P_SUBJECT);

          WF_NOTIFICATION.SETATTRTEXT(L_NID, 'BODY', P_TEXT_BODY);

          WF_NOTIFICATION.SETATTRTEXT(L_NID, '#FROM_ROLE', 'USERNAME1'); 

          WF_NOTIFICATION.SETATTRTEXT(L_NID, 'SENDER', 'USERNAME1');

          WF_NOTIFICATION.DENORMALIZE_NOTIFICATION(L_NID);

       

      Thanks

      KK