· In this blog we are considering the lookup code insert event for demonstration.
1. Navigate to Responsibility: Workflow Administrator
>> Administrator Workflow >> Business Events
2. All seeded events will start with ‘oracle.apps.’ then next we need to provide the application short name on which we want to create subscription.
3. In our case its ‘fnd’ as lookup will be register with
application ‘Application Object Library’
· 4. We are taking event named oracle.apps.fnd.lookup.code.insert which
will trigger when we insert some code in the lookup.
· 5. Search the event name ‘oracle.apps.fnd.lookup.code.insert’ by
typing in the Name field
6. Click
on Create Subscription
button.
7. The
System field will get populated with default name, if not click on search
button and select appropriate name.
8. You
must specify the source type of the events to which the subscription applies.
Events can have the following source types:
- Local--The subscription applies
only to events raised on the subscribing system.
- External--The subscription
applies only to events received by an inbound agent on the subscribing
system.
- Error--The subscription applies
to only to errored events dequeued from the WF_ERROR queue or the
WF_JAVA_ERROR queue.
9. The
phase number for a subscription controls whether the subscription is executed
immediately or is deferred. The Event Manager treats subscriptions with a phase
number of 100 or higher as deferred subscriptions. Subscriptions with a phase
number from 1 to 99 are executed immediately.
10. Defining
the Action for a Subscription
Subscription processing can include the
following types of processing
Action
Type
|
Description
|
Custom
|
Execute
custom business logic
|
Invoke
REST Service
|
Invoke
REST Service from BES Subscription
|
Invoke
SOAP Service
|
Invoke
SOAP Service from BES Subscription
|
Launch
Workflow
|
Launch
the workflow specified in the subscription
|
Receive
Trading Partner Message
|
Receive
a message from your trading partner
|
Send
to Agent
|
Send
the event to the agent specified in the subscription
|
Send
Notification
|
Send a
notification using standard or your own message templates
|
Send
Trading Partner Message
|
Generate
a message and send the message to your trading partner
|
11. In
our case we are calling custom package function, so we select Action type as
Custom.
12. We
can call below types of Functions
o
Java
function.
o
PLSQL
function.
o
Workflow.
13. In
our example we are calling the PLSQL function named ‘xx_event_subscription_pkg
event_subscription_func’.
14. An
agent is a named point of communication within a system. Communication within
and between systems is accomplished by sending a message from one agent to
another. A single system can have several different agents representing
different communication alternatives. For example, a system may have different
agents to support inbound and outbound communication, communication by
different protocols, different propagation frequencies, or other alternatives.
- In--Inbound communication to the system. The agent
receives messages in a specific protocol and presents them to the system
in a standard format.
- Out--Outbound communication from the system. The
agent accepts messages from the system in a standard format and sends
them using the specified protocol.
15. Enter
Owner Name and Owner Tag with event application owner usually it will be
application short name.
16. In
our case its fnd.
17. Then
click on Apply button, that will save the subscription.
18. In the mentioned package function, we are inserting the event name, sequence number and sysdate in to the table ‘xx_test_event_subscription_tbl’.
19. So, whenever we insert and record in to the lookup we should see record in this custom table.
20. Insert the record in lookup then query the custom table, you can see record inserted in that table.