Sunteți pe pagina 1din 5

Business Events

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,

System (Where the subscription executes)

Click on the System fields up arrow icon to display a list of systems from which to choose

Triggering Event region,

Source Type (To which the subscription applies)


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.

Source Agent (optional -to which the subscription applies).


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.

Execution Condition region,

Phase Number

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

Action Type

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.

List of the Action Type and corresponding Action is mentioned below.


* mark indicates the required field)

Action Type Action Additional Priority


Options (1
required
0
optional)
Custom
Java Rule Function 0
PL/SQL Rule 0
Fuction
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;

S-ar putea să vă placă și