Professional Documents
Culture Documents
Oracle OM Bussiness Events PDF
Oracle OM Bussiness Events PDF
This document starts with a brief introduction of Workflow Business Events as available with
Oracle e-Business Suite Technology Stack.
Next, the business events supported out of the box by Oracle Order Management are described.
The salient parameters associated with these business events are explained.
Subsequent sections of the white paper elaborate the set up to be done by Oracle Order
Management Administrator/Super User, to enable Order Management to emit business events
with relevant payload (of event parameter values).
Towards the final phases of the document, an illustrated example delineating the integration
process (defining subscriptions to the business events) is presented in Use Case – A Fully
Functional Custom Extension.
Intended Users
Oracle Applications System Administrators and Third-Party System Integrators find the
information contained in this document particularly useful.
Documentation R eferences
O Oracle Applications - Order Management Open Interfaces, API & Electronic Messaging
Guide, part # B14446-01, Chapter 7 (Electronic Messaging Technical Information) and
Chapter 8 (Electronic Messaging Implementation Considerations).
O Oracle Workflow – Administrators’ Guide, API Reference Guide, and Developers’ Guide.
The Oracle Workflow Business Event System is an application service that leverages the Oracle
Advanced Queuing (AQ) infrastructure to communicate business events between application
systems. The Business Event System consists of the Event Manager and workflow process event
activities.
The Event Manager contains a registry of business events, systems, named communication agents
within those systems, and subscriptions indicating that an event is significant to a particular
system. Events can be raised locally or received from an external system or the local system
through AQ.
Subject to the completion of certain set-up steps, Oracle Order Management raises Business Events
at salient points during the processing of a given sales order. This allows for the use: Customization
of Oracle Order Management in a non-invasive manner – simply by registering suitable subscriptions to the
relevant Business Events.
The following table displays a quick summary of Business Events raised by Order Management:
Patch# 16998134:R12.ONT.B provides the following Business events that will be raised in life cycle of
an Order:
1. Oracle.apps.ont.oip.processfailure.update
2. Oracle.apps.ont.oip.statuschange.update
3. Oracle.apps.ont.hold.action
Set-Up Considerations:
A raise of this event by Order Management is controlled by the profile option: OM: Electronic Message
Integration Event Sources. The possible values are XML (default value), XML & EDI and All.
This profile determines order sources that are capable of raising this business event. The Order
Management Super User sets this profile option value accordingly.
Parameter Details:
It may be noted that not every parameter will be populated in all cases, as described in subsequent
sections.
The following table contains a Y if a particular parameter is populated for Processing Constraint based
Event Raise:
Note: Regarding the colon-delimited string of Line Ids for line-level triggering: if the values
populating the line_id string exceed 2000 characters, the relevant business event will be raised multiple
times. The Raise Integration Event operation in the Processing Constraints window will not fail
because the line_id string can accommodate more characters.
The following table contains a Y if a particular parameter is populated for workflow sub-process
based event raise (using the Raise Show Sales Order Event Sub Process):
Note: Because the event passes no useful line id as its parameter, “Raise Show Sales Order Event Sub
Process” is only suitable to raise events from header-level (“OM Order Header”) workflow processes.
To raise events from a line-level (“OM Order Line”) workflow process, you can add Event nodes to its
definition, with Event Action = Raise, the desired Event Name, and with line id as one of the
parameters. Standard activity “Set Event Property” can be used to set the parameter value(s) as
desired. For more details on this topic, see Oracle Workflow Developer’s Guide.
Set-Up Considerations:
This business event is raised for orders that are generated from an order source marked as “AIA
Enabled” in the Order Import Sources definition.
1. A hold is applied.
2. A hold is released.
3. Flow status code on the order header/line is changed to Supply Eligible, Awaiting
Shipping, Shipped, Fulfilled or Closed.
4. Schedule Ship/Arrival Date is changed.
Parameter Details:
CHANGE_TYPE Indicates the type of change the APPLY – a hold has been
order/line is being subjected to. applied.
RELEASE – a hold has been
released.
LINE_STATUS – Flow
status code has changed.
SHIP_DT_CHG – Schedule
Ship date has been changed.
ARVL_DT_CHG –
Schedule Arrival date has been
changed.
Set-Up Considerations:
A raise of this event by Order Management is controlled by the profile option: ‘OM: Raise
Status Change Business Event’. If this profile option is set to Yes then the event is raised
when:
Any process fails in the Order cycle. Currently this business event is available for only Order Booking
process.
Parameter Details:
PROCESS_NAME
Indicates the Process which has failed BOOK_ORDER
Set-Up Considerations:
A raise of this event by Order Management is controlled by the profile option: ‘OM: Raise
Status Change Business Event’. If this profile option is set to Yes then the event is raised
when:
1. Order is Booked.
2. Line is S c he d ul e d .
3. Line is Rescheduled.
4. Customer Acceptance/Rejection
5. Flow status Code on the line is changed to Shipped, Fulfilled, Invoiced and Closed.
Parameter Details:
‘oracle.apps.ont.hold.action’ event is raised for all the sales orders independent of Order source. i.e
AIA& Non AIA enabled.
Set-Up Considerations
A raise of this event by Order Management is controlled by the profile option: ‘OM: Raise
Status Change Business Event’. If this profile option is set to Yes then the event is raised
when:
Parameter Details:
CHANGE_TYPE Indicates the type of change the APPLY – a hold has been
order/line is being subjected to. applied.
Requirement
Trigger a custom workflow, registered as part of custom subscription to the seeded business event
oracle.apps.ont.oi.xml_int.status. The event should be raised every time Request Date is updated on a
booked sales order line, and every time an order is booked. It should be regardless of order source. The
custom workflow should make an entry in a custom audit table.
Setup
The purpose of this table is to store any unexpected errors raised during the logging process.
/******************************************************************************
**
** Spec of package XX_OM_BES_PKG_WF
**
** NOTES
** This is created for test purpose
**
*****************************************************************************/
PROCEDURE Update_BES_InfoToCustTable (
p_itemtype IN VARCHAR2,
p_itemkey IN VARCHAR2,
p_actid IN NUMBER,
p_funcmode IN VARCHAR2,
p_x_result IN OUT NOCOPY VARCHAR2);
END XX_OM_BES_PKG_WF;
/
/******************************************************************************
**
** Body of package XX_OM_BES_PKG_WF
**
** NOTES
** This is created for test purpose
**
*****************************************************************************/
PROCEDURE Update_BES_InfoToCustTable (
p_itemtype IN VARCHAR2,
p_itemkey IN VARCHAR2,
p_actid IN NUMBER,
p_funcmode IN VARCHAR2,
p_x_result IN OUT NOCOPY VARCHAR2)
IS
l_order_source_id NUMBER;
l_sold_to_org_id NUMBER;
l_order_number NUMBER;
l_org_id NUMBER;
l_result VARCHAR2(30);
l_header_id NUMBER;
l_line_id NUMBER;
l_pos NUMBER;
l_line_number varchar2(100);
l_request_date DATE;
l_open_flag VARCHAR2(1);
l_flow_status_code VARCHAR2(30);
l_line_ids VARCHAR2(4000);
l_sqlcode number;
l_sqlerrm VARCHAR2(2000);
BEGIN
IF l_line_ids = 'ALL' THEN – event was raised because order was booked
OPEN header_info (l_header_id);
FETCH header_info
INTO l_booked_flag, l_request_date, l_flow_status_code, l_order_number;
CLOSE header_info;
p_x_result := 'COMPLETE:COMPLETE';
EXCEPTION
WHEN OTHERS THEN
l_sqlcode := sqlcode;
l_sqlerrm := SUBSTR(sqlerrm, 1, 2000);
INSERT INTO XX_OM_BES_ERRORS
( item_type,
item_key,
sqlerrnumber,
sqlerrtext,
logtime)
VALUES
( p_itemtype,
p_itemkey,
l_sqlcode,
l_sqlerrm,
sysdate);
p_x_result := 'COMPLETE:ERROR';
END Update_BES_InfoToCustTable;
END XX_OM_BES_PKG_WF;
/
COMMIT;
EXIT;
4.1 New Item Type = ‘Custom OM Business Event’ (Internal Name = XX_OMBES).
4.2 Create an event of Event Action = ‘Receive’ and name = ‘Custom Receive Event’ (Internal
Name = XX_BES_RECEIVE_EVENT). Set the Event filter = oracle.apps.ont.oi.xml_int.status
4.4 Create a process ‘Write Details Process’ (Internal Name = XX_WRITE_DETAILS) and check the
‘Runnable’ checkbox
4.5 Create a process definition by assigning the receive ‘Custom Receive Event’ as the start
activity, and workflow standard ‘End’ as end activity. Place the ‘Write Details to Custom table’
function activity between the above two activities and join the transition line as shown below:
Event Name and Event Key should be of type Text, Event Message type Event, Line Ids type Text
with length of 2000, and the rest type Number.
4.7 Set the Event properties under the ‘Event Details’ property tab as shown below:
In the next screen, provide the custom workflow item type and process internal name.
Provide the Owner Name and Tag to this event and save the changes
Navigate to OM Super User responsibility > Setup > Rules > Security > Processing Constraints form
Query for:
Application = Order Management
Entity = Order Line
Define a new user constraint with –
Operation = Update
Attribute = Request Date
User Action = Raise Integration Event
Enabled = Checked
And constraint condition as:
Scope = Any
Validation Entity = Order Line
Record Set = Line
Validation Template = Booked
Enabled = Checked
User Message = Business event has been raised
6. Setup the value to profile OM: Electronic Message Integration Event Source' as ‘ALL’.
That completes the necessary implementation & set-up for the request date change part of the
requirement.
Navigate to OM Super User responsibility > Orders, Returns > Quick Sales Order
Enter the Operating Unit, Customer details and Order Type information. Ensure other
required information to either be defaulted or enter it manually for the successful creation
of the order sales order.
Once done, save the changes and enter a sales order line with a certain request date.
Book the sales order.
Now change the request date.
Upon saving the changes, business event ‘oracle.apps.ont.oi.xml_int.status’ will be
raised.
Once the event is raised, navigate to Workflow Administrator responsibility > Status Monitor.
Query for custom item type ‘XX_OMBES’ and the latest launched details of custom process
‘XX_WRITE_DETAILS’
Click on view diagram button to ensure that the custom workflow, tied to custom
subscription, is triggered and completed.
For the second part of the requirement, to get an entry in the audit table XX_OM_BES_TBL also
when an order is booked, there is a few more setup steps required. This is because booking is a
flow status change, rather than attributes change, and cannot be captured by processing
constraints. Instead, we’ll use the seeded workflow sub process Raise Show Sales Order Event
Sub Process.
7. Copy and rename the seeded order header process R_STANDARD_HEADER (Order Flow –
Generic). Change the name to R_STANDARD_HEADER_SSO (Order Flow – Generic SSO).
8. In Oracle Workflow Builder, change the definition of Order Flow – Generic SSO by inserting
the seeded sub process RAISE_SHOW_SO_SUB (Raise Show Sales Order Event Sub Process)
from item type OESO (OM Show Sales Order) between BOOK_PROCESS_ASYNCH (Book -
Order, Manual) and CLOSE_HEADER_PROCESS (Book - Order, Manual):
Now create an order with order type from step 9 and book it. This should cause a corresponding
row to be created in the audit table XX_OM_BES_TBL, as well as a workflow item of type
XX_OMBES, just as previously, when you tested the request date change scenario.
Conclusion
Oracle Order Management provides out-of-the-box support to raise workflow business events at
salient points within the lifecycle of a sales order.
By coding & registering appropriate subscriptions to the standard business events, in a very non-
invasive manner, you can: