Recently, there was a question on OTN about how you can find out what Business Event has fired in a certain circumstance:
When a transaction is done in Self Service, how to know which business event is fired? We use status monitor to see the transactions of the workflow but how to know the details of the business event if there is no workflow process involved in the transaction?
The response which was given was to check WF_DEFERRED where any deferred Subscriptions are stored, but doesn’t address what Events fire where there are Subscriptions which are not deferred, or Events where there are no Subscriptions defined. So, what’s the best way to find out what Events are firing where the Subscriptions are not deferred?
Using a development environment (or any environment other than Production), you can install some logging code and a custom Event Subscription which can provide the information for you.
Firstly, define a custom Subscription to the “any” event (oracle.apps.wf.event.any) to call a new function which I’ll describe in the next step. The Subscription should fire when an Event is raised internally, since this is the most common method for raising an Event. If you are expecting messages to arrive from an external source, then define another Subscription for an external source, which calls the same function.
Secondly, write a custom function which will be invoked from your Subscription(s) – make sure that the function conforms to the standard API signature (see the Workflow Documentation for more details). The function should retrieve the EVENT_NAME from the inbound event parameter ADT and then store this information in a table or other logging mechanism, and then end.
For EVERY event which now fires, the any event will fire and call your function. The function will then store the information, or log it somewhere, depending on your exact code. You should then perform the transaction that you are interested in, and check what information the function recorded.
Once you have completed the test and determined which event(s) were fired, you should revisit the any event and either disable or delete the Subscription – otherwise your logging mechanism will get overloaded with all the Events which will fire!