A business event is an occurrence in an
internet/intranet application or program that might be significant to other
objects in a system or to external agents.
For instance, the creation of a purchase order is an
example of a business event in a purchasing application.
Creating/Defining a Business event
There must be a unique internal name for a business
event.
The suggested format for these internal names
is a compound structure of identifiers
separated by periods (.) as follows: (Which is
case-sensitive.)
<company>.<family>.<product>.<component>.<object>.<event>
Example : oracle.apps.xxokl.am.test_busi_event
Steps
to create a new Business Event:
Navigation à System Administrator à Workflow à Administrator Workflow à Business Event
à Click on “Create Event”
à Fill all the required field
(marked with *)
Name
should be in the format
specified above.
Status must be “Enabled”
Owner Name Enter program name here.(Any oracle module name)
Owner Tag Enter program id here (Oracle module short name)
à Click
on “Apply”
à It will give the confirmation of successful
event creation
Subscription of a Business event
An event subscription is a registration
indicating that a particular event is significant to a
particular system and specifying the
processing to perform when the triggering event
occurs.
Steps
to Subscribe a Business Event:
Navigation à System Administrator à Workflow à Administrator Workflow à Business Event
à Search the business
event create above (for which subscription has to be created)
à
Click on “Subscription”
à Put
the required fields in the next window.
Subscriber region,
Click on the System field’s up arrow icon to
display a list of systems from which to choose
Triggering Event region,
• 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.
Event Filter
Name of your business event.
The subscription is
executed only when the triggering event is received from that agent.
Note:
In most cases, the Source Agent field is left blank.
It specify the order in
which subscriptions that apply to the same event are executed
Status
Select Enabled or Disabled.
Rule Data.
• Key - The subscription
requires only the event key.
•
Message - The subscription requires the complete event data Action Type Region
There are total 6 types of ‘Action Types’. Select anyone as your requirement put at least the required fields in ‘Action’ region of the selected ‘Action Type’.
‘ * ‘ mark indicates the required field)
Action Type
|
Action
|
Additional Options
|
Priority (1 required 0 optional)
|
Custom
|
|||
Java Rule
Function
|
0
|
||
PL/SQL Rule
Fuction
|
0
|
||
Workflow Type
|
0
|
||
Workflow
Process
|
0
|
||
Out Agent
|
0
|
||
To Agent
|
0
|
||
*Priority
|
1
|
||
Launch Workflow
|
|||
*Workflow Type
|
1
|
||
*Workflow
Process
|
1
|
||
*Priority
|
1
|
||
Add
Subscription Parameters
|
|||
Launch when
Parameters Match
|
|||
Launch when
Parameters Match
|
|||
Receive Message from Trading Partner
|
|||
*Priority
|
1
|
||
Send To Agent
|
|||
Out Agent
|
0
|
||
To Agent
|
0
|
||
*Priority
|
1
|
||
Add
Subscription Parameters
|
|||
Launch When
Parameters Match
|
|||
Send Notification
|
|||
*Message Type
|
1
|
||
*Message Name
|
1
|
||
*Recipient
|
1
|
||
Callback
|
0
|
||
Context
|
0
|
||
Comment
|
0
|
||
Due Date
|
0
|
||
*Priority
|
1
|
||
Send Message to Trading Partner
|
|||
*Priority
|
1
|
Note :: All the required fields have LOV attached
On Error
Stop and Rollback
Skip to Next
Subscription Parameters Region
You can enter any additional parameters for the rule function in the Parameters field. Specify the name and value for each parameter in the following format:
<name1>=<value1> <name2>=<value2> ... <nameN>=<valueN>
Documentation Region
Owner name
Enter program name here.
Owner tag
Enter program ID here.
Customization Level
Customization level
“User” is automatically set for subscriptions that you define.
Description(optional)
You can give the description about your subscription/event.
Warning: Each subscription must have a unique
combination of subscribing system,source type, triggering event, source agent,
phase, owner name, and owner tag.
If
you are defining several subscriptions with similar properties, assign
each subscription a different phase
number to differentiate it from the others.
Following Subscription is
an example with “Action Type-Custom”
à Click
On “Next”
à Click
On “Apply”
à It
will give the confirmation message of successful subscription
Sample Subscribed Function:
function xx_test_event_func(
p_subscription_guid in raw
,p_event in out nocopy wf_event_t)
return varchar2 is
l_parmlist wf_parameter_list_t;
l_user_id number;
l_resp_id number;
l_application_id number;
begin
---- get the parameter list for the event.
l_parmlist := p_event.getparameterlist ();
l_user_id := to_number (p_event.getvalueforparameter ('USER_ID'));
l_resp_id := to_number (p_event.getvalueforparameter ('RESP_ID'));
l_application_id := to_number (p_event.getvalueforparameter ('RESP_APPL_ID'));
--<write your business logic>
return 'SUCCESS';
exception
when others then
return 'FAILURE';
end xx_test_event_func;
p_subscription_guid in raw
,p_event in out nocopy wf_event_t)
return varchar2 is
l_parmlist wf_parameter_list_t;
l_user_id number;
l_resp_id number;
l_application_id number;
begin
---- get the parameter list for the event.
l_parmlist := p_event.getparameterlist ();
l_user_id := to_number (p_event.getvalueforparameter ('USER_ID'));
l_resp_id := to_number (p_event.getvalueforparameter ('RESP_ID'));
l_application_id := to_number (p_event.getvalueforparameter ('RESP_APPL_ID'));
--<write your business logic>
return 'SUCCESS';
exception
when others then
return 'FAILURE';
end xx_test_event_func;