Alert 1
Alert 1
1. First, you must create the schema within the database. This
can be done from any user/schema account with the DBA Role
privileges. Please remember that you must grant to the newly
created schema a minimum of "CONNECT" and "RESOURCES" to the
schema for it to be accessed. (Please refer to the Oracle SQL
Reference Guide for your release of the database to secure
more information.) If you would like to follow the Oracle
Application guidelines for naming conventions, please name
your schema with a three character name, like "CUS" - Customer.
Then, prepend it with an "XX" so that you have an user/schema
"XXCUS" name.
Unix Prompt
-----------
$ sqlplus system/manager
SQL*Plus Prompt
---------------
SQL> create user XXCUS identified by XXCUS;
SQL> grant connect to XXCUS;
SQL> grant resource to XXCUS;
For example:
----------------------------------------------------------------------
-
Custom Application XXCUS XXCUS_TOP Custom
Application
Database
Username Password Privilege Install Group
Description
----------------------------------------------------------------------
----
XXCUS XXCUS Enabled 0 Custom
Application
4. You need to add the custom user/schema to a data group. You can
do this by logging into Oracle Applications as the System
Administrator and navigate:
5. You can now build an object, in the example the object will be
a table with a single column, and a local stored database object,
which will be a stored procedure in this example. You can log
into SQL*Plus as the custom schema owner, XXCUS, and create the
following database objects:
COMMIT;
END;
/
DECLARE
var1 VARCHAR2(1) := 'A';
var2 VARCHAR2(1) := 'B';
BEGIN
ins_my_event('1', var1, var2);
END;
/
SELECT v1
FROM my_event_test;
7. You can register your custom user/schema's tables or views and any
flexfields with the PL/SQL package AD_DD, which is defined below.
After the specification declarations, you will find examples for
registering the tables and columns from SQL*Plus.
PROCEDURE DELETE_COLUMN
Argument Name Type In/Out
Default?
------------------------------ ----------------------- ------
--------
P_APPL_SHORT_NAME VARCHAR2 IN
P_TAB_NAME VARCHAR2 IN
P_COL_NAME VARCHAR2 IN
PROCEDURE DELETE_PRIMARY_KEY_COLUMN
Argument Name Type In/Out
Default?
------------------------------ ----------------------- ------
--------
P_APPL_SHORT_NAME VARCHAR2 IN
P_KEY_NAME VARCHAR2 IN
P_TAB_NAME VARCHAR2 IN
P_COL_NAME VARCHAR2 IN
DEFAULT
PROCEDURE DELETE_TABLE
Argument Name Type In/Out
Default?
------------------------------ ----------------------- ------
--------
P_APPL_SHORT_NAME VARCHAR2 IN
P_TAB_NAME VARCHAR2 IN
PROCEDURE REGISTER_COLUMN
Argument Name Type In/Out
Default?
------------------------------ ----------------------- ------
--------
P_APPL_SHORT_NAME VARCHAR2 IN
P_TAB_NAME VARCHAR2 IN
P_COL_NAME VARCHAR2 IN
P_COL_SEQ NUMBER IN
P_COL_TYPE VARCHAR2 IN
P_COL_WIDTH NUMBER IN
P_NULLABLE VARCHAR2 IN
P_TRANSLATE VARCHAR2 IN
P_PRECISION NUMBER IN
DEFAULT
P_SCALE NUMBER IN
DEFAULT
PROCEDURE REGISTER_PRIMARY_KEY
Argument Name Type In/Out
Default?
------------------------------ ----------------------- ------
--------
P_APPL_SHORT_NAME VARCHAR2 IN
P_KEY_NAME VARCHAR2 IN
P_TAB_NAME VARCHAR2 IN
P_DESCRIPTION VARCHAR2 IN
P_KEY_TYPE VARCHAR2 IN
DEFAULT
P_AUDIT_FLAG VARCHAR2 IN
DEFAULT
P_ENABLED_FLAG VARCHAR2 IN
DEFAULT
PROCEDURE REGISTER_PRIMARY_KEY_COLUMN
Argument Name Type In/Out
Default?
------------------------------ ----------------------- ------
--------
P_APPL_SHORT_NAME VARCHAR2 IN
P_KEY_NAME VARCHAR2 IN
P_TAB_NAME VARCHAR2 IN
P_COL_NAME VARCHAR2 IN
P_COL_SEQUENCE NUMBER IN
PROCEDURE REGISTER_TABLE
Argument Name Type In/Out
Default?
------------------------------ ----------------------- ------
--------
P_APPL_SHORT_NAME VARCHAR2 IN
P_TAB_NAME VARCHAR2 IN
P_TAB_TYPE VARCHAR2 IN
P_NEXT_EXTENT NUMBER IN
DEFAULT
P_PCT_FREE NUMBER IN
DEFAULT
P_PCT_USED NUMBER IN
DEFAULT
PROCEDURE UPDATE_PRIMARY_KEY
Argument Name Type In/Out
Default?
------------------------------ ----------------------- ------
--------
P_APPL_SHORT_NAME VARCHAR2 IN
P_KEY_NAME VARCHAR2 IN
P_TAB_NAME VARCHAR2 IN
P_DESCRIPTION VARCHAR2 IN
P_KEY_TYPE VARCHAR2 IN
DEFAULT
P_AUDIT_FLAG VARCHAR2 IN
DEFAULT
P_ENABLED_FLAG VARCHAR2 IN
DEFAULT
EXECUTE ad_dd.register_column
( P_APPL_SHORT_NAME
, P_TAB_NAME
, P_COL_NAME
, P_COL_SEQ
, P_COL_TYPE
, P_COL_WIDTH
, P_NULLABLE
, P_TRANSLATE );
EXECUTE ad_dd.register_column
('XXCUS'
,'MY_EVENT_TEST'
,'V1'
, 1
,'NUMBER'
, 38
,'N'
,'N');
8. After creating and registering your objects and schema, you need
to run
the APPS_DDL and APPS_ARRAY_DDL packages against your user/schema.
You
must run the scripts from the $AD_TOP/admin/sql directory in the
order
noted below. The general form for executing the command is noted
below
and then examples based on the "XXCUS" user/schema and "XXCUS"
password
from above. Please remember that you must run these scripts from
the
"APPS" user/schema account.
1. adaddls.pls
2. adaaddls.pls
3. adaddlb.pls
4. adaaddlb.pls
10. You need to create a custom request group that will hold your
custom and/or standard requests within a custom responsibility.
You can do this by logging into Oracle Applications as System
Administrator and navigate:
11. After creating your custom request group, you need to create a
custom responsibility for your custom user/schema. You can do
this by logging into Oracle Applications as System Administrator
and navigate:
+------------------------+
+------------------------+
| Available From | | Data Group
|
+------------------------+
+------------------------+
x Oracle Application Name:
Standard
Oracle Self Service Web Applications Application: Custom
Application
+------------------------+
Menu: Requests Menu | Request Group
|
- Other Responsibilities
+------------------------+
Web Host Name: Name: XXCustom
Web Agent Name: Application: Custom
Application
+-------------------------------+
| Function and Menu Exclusions |
+-------------------------------+
Type Name Description
12. You can now register your test program as a concurrent program
under SQL*Plus execution method. Do register the program, you
need to ensure that the program is located in the $XXCUS_TOP/sql
directory. Then, as System Administrator you should do the
following steps.
Executable = xxcus_ins
Short Name = xxcus_ins
Application = PLSQL Test
Description = XXCUS insert into event test
Execution Method = SQL*Plus
Execution File Name = xxcus.sql
Program = xxcus_ins
Short name = xxcus_ins
Application = PLSQL Test
Description = XXCUS insert into event test
Executable Name = xxcus_ins
NOTE: You should leave all other settings as they are set as
defaults.
You have now completed the steps on how to create and register a
customer
schema in the Oracle Applications. The next section discusses how you
can
create the alert in Oracle Alerts.
1. You log into the Oracle Applications, choose the Alert Manager
Responsibility and then navigate:
Application = xxcus
Name = xxcus_event_alert
Description = My event alert test
Type = Event
b. You enter the Event Alert Details section for your alert and
then check the "After Insert" and "After Update" boxes:
Application = XXCustom
Table = my_event_test
2. You can now click on the Action Button and create the detail
action
for your event alert, by the following steps:
a. You can set the general action parameters:
3. You can navigate back to the main Alert Definition form, and click
on
the Action Set button, which will allow you to enter a new action
set.
Below is a basic example consistent with the example code in this
entry.
Seq = 1
Action Set Name = xxcus_event_actionset
Then, you need to check the "Enabled" check box so that your event
alert is enabled to run. You should set members as follows:
Seq = 1
Action = xxcus_event_action
Type = Action: Message
Seq = 2
Action = Exit Action Set Successfully
Type = Exit from Action Set successfully
2. You should make the request a single request, click the "OK"
button,
choose the "xxcust_ins" Concurrent Manager Program and then submit
the job.
Related Documents
-----------------
Copyright