So, we all are aware of Workflows in EBS but do you know we can extend the workflow functionality using Business Events ? Let's see how.
Oracle Business Event System .. what's that ?
- Business Event System is an application service that leverages the Oracle Advanced Queuing (AQ) infrastructure to communicate business events between systems
- Mainly consists of the event manager and process event activities
- Event Manager –
- Contains a registry of business events, systems, communication agents within those systems, and subscriptions for a given event
- Events can be raised/received from an external system or the local system through AQ. When an event occurs, the subscribing code is executed in the same transaction as the code that raised the event, unless the subscriptions are deferred - Each business event represents a ready to use integration or extension point
- Oracle E-Business Suite currently ships preconfigured with over 900 business events
What's Oracle Advanced Queuing ?
- It's a Message-oriented middleware (MOM) infrastructure that supports sending and receiving messages between distributed systems
- AQ uses database structures as a repository for asynchronous queuing which acts as the main element in various Oracle related as well as heterogeneous operations
- Oracle Advance Queuing does not support synchronous messaging
- Oracle AQ supports PL/SQL, Oracle Cloud Infrastructure, Java Message Service and SOAP APIs
Messaging using Oracle Advanced Queuing
Messaging is the ability to send a message containing data from one application/process to another application/process and is widely used in distributed systems, particularly high volume OLTP systems
Client server applications are typically synchronous whereas messaging is asynchronous
In an asynchronous model, the sender, usually referred to as the producer, is not blocked waiting for a reply from the recipient(s), referred to as consumer(s)
Messages are placed into queues by Producer systems
– This is called enqueuing
Messages are read & removed from the queue by Consumer systems
– This is called dequeuing
The data section of the message is referred to as the payload
Now, let's see what's the difference between Workflow Engine vs Business Event System
What are Business Events ?
- Business Event is an occurrence of a business activity which is significant to other objects or processes in a system or to external agents.
- For example, the activity of creating a Purchase Order is a business event, similarly approving PO, receiving goods against a PO or matching a PO with invoice is a Business Event.
- Business Event is a ready to use integration or extension point.
- Business Events are integrated to specific business flows for additional processing or validations.
- Examples of preconfigured Business Events –
oracle.apps.po.autocreate.pocreatedoracle.apps.po.autocreate.rfqcreatedoracle.apps.per.api.employee.create_employeeoracle.apps.wsh.delivery.gen.shipconfirmed
Navigation to access Business Events:
Uses of Business Events
System Integration Messaging hubs -
Business Event System can serve as a messaging hub for complex system integration scenarios. The Event Manager can be used to "hard–wire" routing between systems based on event and originator.
Distributed Applications Messaging –
Applications can supply Generate and Receive event message handlers for their business entities.
Message-based System Integration –
You can set up subscriptions, which cause messages to be sent from one system to another when business events occur. In this way, you can use the Event Manager to implement point–to–point messaging integration.
Business event-based workflow processes –
You can develop sophisticated workflow processes that include advanced routing or processing based on the content of Business Events.
Non-invasive customization of packaged applications -
Create subscriptions to various Business Events to trigger custom code or workflow processes.
What are Event Subscriptions ?
- An activity to be performed on occurrence of a Business Event.
- For example, in order to send an email notification to users when a PO receipt is created, you can create a Subscription to PO Receipt related Business Event and trigger a workflow notification from the subscription to send email.
- Whenever an Event is raised locally or received from an external source, the Event Manager searches for and executes any active Subscriptions for that event.
- If multiple subscriptions are defined to the same Business Event, you can control the order in which the Event Manager executes those subscriptions by specifying a phase number for each subscription. Subscriptions are executed in ascending phase order.
- Subscriptions can be executed immediately or be deferred
- Immediate Subscriptions are Synchronous
- Deferred Subscriptions are Asynchronous
- The Event Manager determines the execution method based on Phase Number of a Subscription
- Immediate (Synchronous) Subscriptions have Phase <= 99
- Deferred (Asynchronous) Subscriptions have phase > 100
- Deferred subscription events are enqueued to WF_DEFERRED AQ and Workflow Agent Listener dequeues/executes them in the background
- All events with Synchronous subscriptions are executed in the same thread they are raised in and not enqueued to any AQs
Navigation to access Event Subscriptions:
Sample Subscription Definition:
Let's auto-create a PO for testing:
We'll be able to see below entries in WF_DEFERRED table for above PO:
One entry for Auto-create and one for Notification
And now, if we head back to Application, we'll be able see the custom notification
Below are some Possible Use Cases using Business Event System:
This topic was presented in one of my OATUG webinars. Please find the details below for full presentation and demo:
Webinar
Presentation and Demo
Sample Subscription Definition:
Let's auto-create a PO for testing:
We'll be able to see below entries in WF_DEFERRED table for above PO:
One entry for Auto-create and one for Notification
And now, if we head back to Application, we'll be able see the custom notification
Below are some Possible Use Cases using Business Event System:
Subscriptions can include the following types of processing –
- Executing custom code on the event information
- Sending event information to a workflow process
- Sending event information to other queues or systems
- Sending a notification based on the event information
- Sending or receiving an Oracle XML Gateway message
- Invoking a business process execution language (BPEL) process or other Web services
This topic was presented in one of my OATUG webinars. Please find the details below for full presentation and demo:
Webinar
Presentation and Demo