You are on page 1of 12

Oracle Business Events

Oracle Business events are like Triggers. So we have event (Business event) based on which an action can be performed. There
are two kinds of business events
1.

Oracle provided business events / Seeded Business Events

2.

Custom Business Events, which we create as per our business needs.

In most of the cases we just need to create an action for a seeded business event. Oracle Corp knows most of the business
requirements and they have provided us with many seeded business events which are ready to use.
I have seen many people using business events for wrong purpose just like how they use oracle workflow just to send a email.
Primarily Business Events should be used as a mediator between two applications or two systems.
To help you understand business events let me provide a sample business requirement.
Business Requirement: We need to send a SMS to business user when certain Concurrent programs are submitted. These
concurrent programs contain sensitive data so the SMS alert is required.
We can debate about the security level for a concurrent program which can be achieved through Request groups /
Responsibilities but keep that aside.
As I cant demonstrate the SMS functionality here I will call a PLSQL function which will insert data into a custom table.
Step1:
Oracle Business events are enabled for concurrent programs from R12.1 version onwards. Check if your oracle ERP instance has
concurrent program level business events enabled by navigating to Concurrent program registration form.

Navigation: Application Developer > Concurrent > Program

Step2:
Set the profile Concurrent: Business Intelligence Integration Enable to Yes.

Step3:
Create a Concurrent program and enable Business Event, Request Submitted(Y). It can be PLSQL Concurrent program /
Oracle Report / Host or any other type of concurrent program.

Read the below article to understand how to create a concurrent program. Just in case if you dont know about it..
http://erpschools.com/articles/register-pl-sql-stored-procedure-in-oracle-apps
Step4:
Navigate to Workflow Administrator . responsibility
Search for oracle.apps.fnd.concurrent.request.submitted business event as shown below

Click on Subscription button


Click on Create Subscription button towards right corner
Enter the fields as below

Click Next button and enter the details as below. Also please compile the PLSQL procedure given below in database.

Click Apply button to save the subscription. You should see a successful confirmation message.

Step5:
Compile the below PLSQL in databse
1 create table erps_test_be (request_id number, requested_by varchar2(10));
1
CREATE OR REPLACE FUNCTION erps_conc_prog_submit_be
2
(
3
p_subscription_guid IN RAW,
4
p_event IN OUT NOCOPY wf_event_t )
5
RETURN VARCHAR2
6
IS
7
v_request_id NUMBER;
8
v_requested_by NUMBER;
9
BEGIN
10
v_request_id := p_event.getvalueforparameter('REQUEST_ID');
11
v_requested_by := p_event.getvalueforparameter('REQUESTED_BY');
12
-- There are other possible parameters like PROGRAM_APPLICATION_ID CONCURRENT_PROGRAM_ID STATUS COMPLETION_TEXT
13
INSERT
14
INTO erps_test_be
15
(
16
REQUEST_ID,
17
REQUESTED_BY
18
)
19
VALUES
20
(
21
v_request_id ,
22
v_requested_by
23
);
24
COMMIT;
25
RETURN 'SUCCESS';
26
END erps_conc_prog_submit_be;

Step6:
Launch the concurrent program and see if the records are being inserted into the table.

Query the table in backend to see the data in custom table we created.
1 select * from erps_test_be;

Thats itYou should be able to see the request_id and user_id of the person who submitted the concurrent request.

Thank you. If you have any questions / comments or suggestions please let me know in the comments section.

You might also like