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
- Oracle provided business events / Seeded Business Events
- 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 can’t demonstrate the SMS functionality here I will call a PLSQL function which will insert data into a custom table.
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
Set the profile “Concurrent: Business Intelligence Integration Enable” to Yes.
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 don’t know about it..
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.
Compile the below PLSQL in databse
create table erps_test_be (request_id number, requested_by varchar2(10));
CREATE OR REPLACE FUNCTION erps_conc_prog_submit_be
p_subscription_guid IN RAW,
p_event IN OUT NOCOPY wf_event_t )
v_request_id := p_event.getvalueforparameter('REQUEST_ID');
v_requested_by := p_event.getvalueforparameter('REQUESTED_BY');
-- There are other possible parameters like PROGRAM_APPLICATION_ID CONCURRENT_PROGRAM_ID STATUS COMPLETION_TEXT
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.
select * from erps_test_be;
That’s it…You 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.