Beruflich Dokumente
Kultur Dokumente
3. If you have chosen event based alert then find out on which event (insert,update,delete) you want to
fire the alert.
4. Decide what data need to be included in the alert.
5. Based on the data you want in the alert write a SELECT SQL statement to pull
the data.
6. Create a distribution list grouping all the people to whom you want to send the
alert.
Just for example, assume a requirement to send Happy birthday mail to employees in an organization.
We have to choose Periodic alert for our requirement.
Employee Birthday can be any calendar day of the year. So we will tell oracle apps
to check daily once every calendar day and see if today is employee's birthday and send email if true.
You need Alert Manager Responsibility to define a new Alert.
Navigate through Alert Manager -> Alert -> Define
Fill the options as given in the screenshot below.
Note that we need to write SQL which satisfies our condition and also to fetch required details. Here is
the SQL
select global_name, date_of_birth, email_address
into &emp_name, &dob, &emp_email
from per_all_people_f
where trunc(sysdate) between effective_start_date and effective_end_date
AND to_char(to_date(date_of_birth),'dd') = to_char(to_date(sysdate),'dd')
AND to_char(to_date(date_of_birth),'mm') = to_char(to_date(sysdate),'mm');
We have to dump these query into "Select Statement" at alert form then you can check the SQL for
syntax using "verify" button.
One point here, if any row that matches condition, it is called exception in Alert.
So when you click "run" button, it will display the number of exceptions occurred (number of rows that
satisfied the condition).
Next step is to define action if condition matches. Don't forget to select action level of type "Detail". This
is because action should be performed once for every Alert Exception.
Then click on "Action Details" button and define the email message.
we also need "Action Sets" and attach the action which we just created.
We can test the alert as follows :
Go to Alert Manager -> Request -> Check, and schedule the Alert to run it sometime after current time.
It will submit a concurrent program.
Once concurrent program is successfully run, the number of exceptions can be verified from Alert
Manager -> History and query for alert.
Which means our Alert is working.Note that you can do many more than just sending mails. Alert can
execute SQL code/function/procedures and it can also run concurrent programs.