Sie sind auf Seite 1von 18

EXERCISE ONE:

CREATING EVENT ALERTS ON CUSTOME TABLES

Two work on event alerts there are important concepts not be forgotten

1. DURING ALERT EVENT DEFINITION SPECIFIY NUMBER OF DAYS IN THE EVENT GREATER
THAN ON IN THE KEEP

2. Click on Alert Details, you will find the following


Click on Installations, then set Oracle ID as APPS and Operating Unit as Vision Operations
3. In order to for event alerts to work or to be raised, it should be run on oracle apps using
forms or concurrent programs.
4. Event alerts can never be raised on the backend, by inserting or updating on the table
To complete the first example.

1. CREATE TWO TABLES ON apps/apps

create table GEREALERTDEMO(SERNO NUMBER , USER_ID number, USER_NAME VARCHAR2(30));

create table CLICKALERTDEMO(SERNO NUMBER , USER_ID number, USER_NAME VARCHAR2(30));

2. Register the table on human resources( or any application)


BEGIN
AD_DD.REGISTER_TABLE('PER','GEREALERTDEMO','T');
AD_DD.REGISTER_COLUMN('PER','GEREALERTDEMO','SERNO',1,'NUMBER',5,'N','N');
AD_DD.REGISTER_COLUMN('PER','GEREALERTDEMO','user_id',2,'NUMBER',5,'N','N');
AD_DD.REGISTER_COLUMN('PER','GEREALERTDEMO','user_name',3,'VARCHAR2',30,'N','N');
commit;
end;

BEGIN
AD_DD.REGISTER_TABLE('PER','CLICKALERTDEMO','T');
AD_DD.REGISTER_COLUMN('PER','CLICKALERTDEMO','SERNO',1,'NUMBER',5,'N','N');
AD_DD.REGISTER_COLUMN('PER','CLICKALERTDEMO','user_id',2,'NUMBER',5,'N','N');
AD_DD.REGISTER_COLUMN('PER','CLICKALERTDEMO','user_name',3,'VARCHAR2',30,'N','N');
commit;
end;

3. Create procedure on apps that inserts data on the first table.

CREATE OR REPLACE PROCEDURE ALERT_PROCEDURE_GERE(ERRBUF VARCHAR2,


RETCODE VARCHAR2 ,SERNO NUMBER, USER_ID NUMBER, USER_NAME VARCHAR2)IS

BEGIN

INSERT INTO CLICKALERTDEMO VALUES(SERNO, user_id, user_name);


COMMIT;
END;
4. Create concurrent program based on the above procedure
Switch to Application Developer responsibility ->Concurrent->Executable
5. Create concurrent program,

6. Click on Parameters if there are any.


In the value sets, set the value set of the parameters like “10 characters” or “10 numbers”
depending on the data type of the parameter
7. Switch your responsibility to Alert Manager, Vision Enterprise.
Alert -> Define

8. Specify Application(“Human Resources” or any application on which the trigger is raised),


Name(“ ALERT_GERE_15” OR any alert_name) and write sql statement on the select
statement box as
SELECT SERNO, USER_ID,USER_NAME INTO &SER_NO, &USER_ID, &USER_NAME FROM
CLICKALERTDEMO WHERE ROWID=:ROWID

9. Click on Actions

10. Click on Action details

11. Go to action set, and define action set


12. Click on Action Set Details, go to members and add the action

13. Add the concurrent program to the request group by switching the responsibility to System
Administrator.
System Administrator -> Security -> Responsibility -> Request
14. Switch to your responsibility and submit the concurrent program
And you may be required to enter the parameter values during submission of the request

15. After entering the parameters and find the concurrent program submitted.
16. After submitting the program successfully, check data inserted on both tables from the
concurrent program. Note that the parameters passed (SRNO(1), USER_ID(1) and
USER_NAME(amsalu) ) are refelected on the first table as shown below.
17. Check the second table where the value is inserted and whether the alert is raised.
EXERCISE TWO:

CREATING TWO EVENT ALERTS THAT RUN TWO ACTIONS (SUMMARY AND DETAILS BESTED ON
THRESHHOLD)

STEP 1: CREATE A PROCEDURE WITH PARAMETRES

CREATE OR REPLACE PROCEDURE ALERT_CONCURRENT_GERE(

ERRBUF OUT VARCHAR2,

RETCODE OUT VARCHAR2,

FNAME VARCHAR2

IS

BEGIN

fnd_file.put_line(fnd_file.output,'Dear Rama Kumar');

fnd_file.put_line(fnd_file.output,' ');

fnd_file.put_line(fnd_file.output,'Following employees fullname is modified');

fnd_file.put_line(fnd_file.output,'Modified Name');

fnd_file.put_line(fnd_FILE.OUTPUT,fname);

fnd_file.put_line(fnd_file.output,' ');

fnd_file.put_line(fnd_file.output,'This is an aumated mail... Please do not reply');

COMMIT;

END;

2. CREATE EXECTUBALE WITH THIS FILE NAME AND CREATE CONCURRENT PROGRAME WITH PROPER

PARAMETERS INCLUDED IN THE ABOVE PROCEDURE

3. CREATE EVENT ALERT, SPECIFY THE TABLE AND SELECT STATEMENT

CAUATION: SPECIFY THE DAYS ABOVE 1(SOME +VE VALUE GREATER THAN 1)
4. SPECIFY THE ALERT DETAILS.SET ORACLE ID =APPS AND THE OPERATING UNIT MUST BE

SPECIFIED (IT IS A MUST). OERATING UNIT=Vision Operations


4. SEPECIFY TWO ACTION SUCH AS NAME THEM LIKE ACTION1 AND ACTION2 ONE AS DETAIL AND THE
OTHER AS SUMMARY
5. IN the action details, specify the action type as “CONCURRENT PROGRAM”, application as “Human
Resources (Or any application on which the trigger is raised)”, specify the concurrent program name that
can be submitted during the event is raised. And lastly, give the parameter as

“&PARAMETER_NAME” like “&FNAME”. If we have more than one parameters, they should be
separated by space as “&PARAMETER_NAME1” “&PARAMETER_NAME2”.

The same thing goes for action 2 for the summary one.
6. In the menu bar, to specify the threshold values, go to Tools -> threshold groups

Add actions(Action1 and Action2) to the threshold Group.


7. Define action set

And go to action set details and add the threshold group name to the members
8. INSERT OR UPDATE TO THE TABLE YOU SPECIFY IN STEP 3. UPDATE OR INSERT ON THE TABLE WE
SPECIFIED DURING ALERT CREATION, THE TABLE THE TIGGERS THE CONCURRENT PROGRAM TO RUN OR
EVENTS TO BE RAISED

Das könnte Ihnen auch gefallen