| Previous | Next |  | Contents | Index | Glossary

## Standard API for an Event Data Generate Function

When you define an event in the Business Event System, you can assign the event a Generate function that can produce the complete event data from the event name and event key. The event data gives additional details to describe what occurred and can be structured as an XML document. You should specify a Generate function if the application that raises the event will not produce the event data itself.

The Event Manager calls the Generate function when an application raises the event without providing the event data and any subscriptions to the event require the event data. The Generate function returns the event data in clob format.

> Note: 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.

The PL/SQL function that generates the event data must have the following standard API:

function <function_name> ( | p_event_name | in varchar2,
|  |  |  | p_event_key | in varchar2) return clob;

The arguments for the function are as follows:

p_event_name | The internal name of the event.
p_event_key | A string generated when the event occurs within a program or application. The event key uniquely identifies a specific instance of the event.

### See Also

To Define an Event

To Define an Event Subscription

| Previous | Next |  | Contents | Index | Glossary