Alets

You can use alerts simply to notify one person/multiple persons about an event or some data change. There are two type of alerts

  • Event based Alerts
  • Periodic Alerts

Event based Alerts: These Alerts are fired/triggered based on some change in data in the database.

Periodic Alerts: These Alerts are triggered hourly, daily, weekly, monthly or yearly based on your input.

What can be done with Alerts?

  • You can send notifications
  • You can send log files as attachments to notifications
  • You can call PL/SQL stored procedures.
  • You can send approval emails and get the results.
  • Print some content dynamically

Navigation:

  • Go to “Alert Manager” Responsibility
  • Alert >> Define

Transfer Alert from one instance/database to other:

  • Go to Alert Manager Responsibility
  • Alert >> Define
  • Go to “Tools” Menu on top
  • Click on “Transfer Alert”
  • Enter source and destination fields and click Transfer.

alert1

Defining an Alert :

Responsibility  –> Alert Manager.

Navigation

Alert –> Define

Define a Period Alert:

Application = Human Resources

Name =  xxscc_test1

Enable = Selected.

alert2

Event Alert

Application  = Human Resources

Table  = PER_ALL_PEOPLE_F

Enter the following SQL statement.

select employee_number

into &emp_num

from per_all_people_f

where rowid=:rowid

alert3

Verify, to check whether the syntax written is correct.

Save

Define Alert Actions:

After you define your alert you need to create the actions you want your alert to perform.There are four types of actions you can create:
• message actions
• concurrent program actions
• operating script actions
• SQL statement script actions

Action Name :  send_mail   (up to 80 characters)

Select a level for your action:Detail, Summary, or No Exception.
During an alert check, a detail action performs once for each individual exception found, a summary action performs once for all exceptions found, and a no exception action performs when no exceptions are found.

alert4

Define Action Details: 

Click on Action Details Button. Depending upon the action level and type you choose, different fields appear in the Action Details window.

TO :   Give you email ID here.      Note : You can also put here also bind variable with &email if that taken in select statement.

Subject :  Give Subject of you Email.

Text :  hello this is test email &emp_num

alert5

Define Action Sets

You can have multiple actions that follow one after the other. For this you need to define an Action Set that defines the flow of these actions.

Click on Action Sets Button.

Action Set Name =  Send Email Test

Go to Action Set Details –> Members.

Action =  send_email_notification  as shown bellow.

alert6

Save.

Now if you Update or Create New Employee you will received notification in given email ID.

Now comes the question, how do we test a  Periodic Alert?

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 ran, we can verify the number of exception from

Alert Manager -> History and query for alert.

Query for your alert. If status is Complete it means that the alert is working.

Advertisements