A business event is an occurrence in an internet or 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. You can define your significant events in the Event Manager.
Oracle Workflow provides several predefined events for significant occurrences within the Business Event System. See: Predefined Workflow Events.
Predefined events are also provided with some Oracle E-Business Suite products. For more information on application-specific workflow events, consult the documentation or help for that specific Oracle E-Business Suite product, the Oracle E-Business Suite Electronic Technical Reference Manual, available from My Oracle Support, and the business event interface information in the Integration Repository. For information about using the Integration Repository, see: Oracle E-Business Suite Integrated SOA Gateway User's Guide.
When you define an event in the Event Manager, you must assign it a unique internal name, which is case-sensitive. The suggested format for these internal names is a compound structure of identifiers separated by periods (.) as follows:
<company>.<family>.<product>.<component>.<object>.<event>
This format allows you to organize the events you define into a classification hierarchy.
Any detail information needed to describe what occurred in an event, in addition to the event name and event key, is called the event data. For example, the event data for a purchase order event includes the item numbers, descriptions, and cost. The event data can be structured as an XML document.
The application where the event occurs can include the event data when raising the event to the Event Manager. If the application will not provide the event data, you should specify a generate function for the event that can produce the complete event data from the event name, event key, and an optional parameter list. The generate function must follow a standard PL/SQL or Java API. See: Raise and Standard API for an Event Data Generate Function.
Define only one generate function for an event, either PL/SQL or Java. Define the generate function independently of any subscriptions to the event.
PL/SQL generate function - The Business Event System performs PL/SQL subscription processing in the database tier for an event with a PL/SQL generate function. However, if subscription processing for the event moves to the middle tier due to Java subscriptions, the middle tier Business Event System will execute the PL/SQL generate function through Java Database Connectivity (JDBC), if required.
Note: If you use custom PL/SQL generate functions, you can optionally enable Oracle Workflow to call your custom functions statically to enhance performance. See: Enabling Static Function Calls for Custom PL/SQL Functions.
Java generate function - The Business Event System will always perform subscription processing for the event in the middle tier to enable execution of the Java generate function, even if the subscriptions to the event are all PL/SQL subscriptions. If the event is raised from PL/SQL code or received through a PL/SQL agent listener, the Event Manager places the event on the WF_JAVA_DEFERRED queue to move subscription processing to the middle tier.
Note: When raising an event from Java, you can also set a serializable object as a payload for the event. The payload is available to all Java subscriptions to the event.
The Event Manager checks each subscription before executing it to determine whether the subscription requires the event data. If the event data is required but is not already provided, the Event Manager calls the generate function for the event to produce the event data. If the event data is required but no generate function is defined for the event, Oracle Workflow creates a default set of event data using the event name and event key.
Note: If the generate function is costly, and you want to return control to the calling application more quickly after raising the event, you can defer all the subscriptions that require the complete event data. Then the Event Manager will not run the generate function until those subscriptions are executed at a later time. See: Deferred Subscription Processing.
You can run a diagnostic test through Oracle Diagnostics Framework to verify that the generate functions that are defined for events exist in the database and are valid. See: Oracle Workflow Diagnostic Tests.
A service data object (SDO) represents a row of data in a service view object (SVO) in Oracle Application Framework. If you want to set the XML metadata for a service data object as the event data for an event, you can define the Java generate function for the event using a special format to retrieve the SDO metadata.
For Oracle Workflow to access the SDO metadata, all Java class files related to the service data object must be available in your CLASSPATH. Additionally, all XML artifacts for the service application module (SAM), service view object (SVO), and entity object (EO), as well as the server.xml file, must be available in the same locations as the corresponding class files.
Specify the Java generate function to retrieve SDO metadata in the following format:
sdo://<SAM><SDO><FILTER><KEYS>
<SAM> - Specify the package and class for the service application module in the following format:
oracle.apps.myBasePackage.myPackage.server.classname
For example:
oracle.apps.fnd.wf.bes.sample.WorkflowAgentSAM
<SDO> - Specify the service data object name in the following format:
:mySDOName
For example:
:Agent
<FILTER> - Specify the fully qualified filter name in the following format:
/oracle/apps/myBasePackage/myPackage/server/xxxFilter
For example:
/oracle/apps/fnd/wf/bes/sample/AgentFilter
<KEYS> - Specify the keys for the service data object preceded by a question mark and separated by commas in the following format:
?Key1,Key2,...KeyN
For example:
?Name
The key values should be provided in the event parameters.
The following example shows the complete Java generate function value:
sdo://oracle.apps.fnd.wf.bes.sample.WorkflowAgentSAM:Agent/oracle/apps/fnd/wf/bes/sample/AgentFilter?Name
For more information about service data objects, refer to the Oracle Application Framework Developer's Guide, available from My Oracle Support Knowledge Document 1315485.1.
You can associate an event with the program or application to which it belongs by setting the program name and brief identifier as the owner name and owner tag for the event. For instance, in the example of the purchase order event, the owner would be the purchasing application. The program can then use this identifying information to locate the events that it owns.
Each event is assigned a customization level that determines whether you can update the event definition. Oracle Workflow uses the customization level to protect Oracle E-Business Suite seed data and to preserve your customizations in an upgrade. An event can have one of the following customization levels:
Core - No changes can be made to the event definition. This level is used only for events seeded by Oracle E-Business Suite.
Limit - The event status can be updated to Enabled or Disabled, but no other changes can be made to the event definition. This level is used only for events seeded by Oracle E-Business Suite.
User - Any property in the event definition can be updated. This level is automatically set for events that you define.
See: Access Protection for Business Event System Data.
Some Oracle E-Business Suite products provide seeded events and subscriptions. In these cases, Oracle Workflow executes subscriptions only if the triggering event and the subscription are both owned by products that you have licensed with a status of Installed or Shared.
Your Oracle E-Business Suite installation may include seeded events owned by Oracle E-Business Suite products that you have not licensed. For such events, the Update Event page displays a notice that the event is not licensed. Oracle Workflow will not execute any subscriptions to these events. Additionally, Oracle Workflow will not execute any subscriptions owned by products that you have not licensed, even if the triggering events for those subscriptions are licensed.
You can use the License Manager utility to review which products you currently have licensed. To ensure that the license status of the seeded events and subscriptions in the Business Event System is updated according to the status of the products you currently have licensed, you can run the Synchronize Product License and Workflow BES License concurrent program. See: License Manager and Synchronizing License Statuses.
Note: Any events that you define with a customization level of User are always treated as being licensed.
You can also define event groups that let you associate any events you want with each other and reference them as a group in event subscriptions. An event group is a type of event composed of a set of individual member events. The internal names of event groups should follow the same format as the names of individual events. Once you have defined an event group, you can register a subscription to the group rather than having to create separate subscriptions for each individual event within it. The subscription will be executed whenever any one of the group's member events occurs.
Note: Event groups cannot be used to raise events. You must raise each event individually.