Friday, 4 September 2020

How to raise Business event from pl/sql

How to raise Business event from pl/sql

Hi friends, we are going to discuss about How to raise Business event from pl/sql. We will share the detail sql query to raise Business event from pl/sql. There are two ways to trigger or raise the business event in oracle apps. We can raise the business event from application itself and from backend too. If we have to raise the Business event manually then we can use the option of backend using pl/sql. Using plsql we can raise the business event in oracle apps. To raise the business event from pl/sql we should have the complete name of the business event. Oracle has provided the standard api 'wf_event.raise' to raise the business event from pl/sql. Please find below the complete steps to raise Business event from pl/sql.

API to raise the Business event from pl/sql

wf_event.raise

3 Important Points to raise Business event from pl/sql

1. Need to have the Business event name.
2.Need to have the Business event Parameters details.
3.Need to have the API wf_event.raise to raise the Business event.

How to raise Business event from pl/sql
How to raise Business event from pl/sql


Detail PLSQL Code to raise the Business event from pl/sql


DECLARE
   l_event_name             VARCHAR2 (240)
                                  := 'oracle.apps.ont.genesis.outbound.update';
   l_event_parameter_list   wf_parameter_list_t := wf_parameter_list_t ();

BEGIN
      wf_event.addparametertolist (
         p_name=> 'HEADER_ID',
         p_value=> '2334443',
         p_parameterlist=> l_event_parameter_list
      );
      wf_event.addparametertolist (
         p_name=> 'LINE_ID',
         p_value=> '6655778',
         p_parameterlist=> l_event_parameter_list
      );
      wf_event.addparametertolist (
         p_name=> 'HOLD_SOURCE_ID',
         p_value=>'6675554',
         p_parameterlist=> l_event_parameter_list
      );
      wf_event.addparametertolist (
         p_name=> 'CHANGE_TYPE',
         p_value=> 'APPLY',
         p_parameterlist=> l_event_parameter_list
      );

      BEGIN
         wf_event.RAISE (
            p_event_name=> l_event_name,
            p_event_key=> SYS_GUID (),
            p_parameters=> l_event_parameter_list
         );

      EXCEPTION
         WHEN OTHERS
         THEN
            DBMS_OUTPUT.put_line (
                  ' Error in the Order Update '
               || SUBSTR (SQLERRM, 1, 250)
            );
      END;


   COMMIT;

   l_event_parameter_list.DELETE;

EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line (
            '  Error in the Order Update  : '
         || SUBSTR (SQLERRM, 1, 250)
      );
END;





How to raise Business event from pl/sql
How to raise Business event from pl/sql
 



1 comments:

StevenHWicker said...

I have found that this site is very informative, interesting and very well written. keep up the nice high quality writing Instrumentos de evaluaciĆ³n de desempeƱo

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *