Oracle Workflow API Reference Release 2.6.3.5 Part Number B12163-02 |
Previous | Next | Contents | Index | Glossary |
procedure Cleanup_Subscribers
(errbuf out varchar2,
retcode out varchar2);
Description
Performs cleanup for the standard WF_CONTROL queue.
When a middle tier process for Oracle Applications or for standalone Oracle Workflow starts up, it creates a JMS subscriber to the WF_CONTROL queue. Then, when an event message is placed on the queue, a copy of the event message is created for each subscriber to the queue. If a middle tier process dies, however, the corresponding subscriber remains in the database. For more efficient processing, you should ensure that WF_CONTROL is periodically cleaned up by running Cleanup_Subscribers() to remove the subscribers for any middle tier processes that are no longer active.
The Cleanup_Subscribers() procedure sends an event named oracle.apps.wf.bes.control.ping to check the status of each subscriber to the WF_CONTROL queue. If the corresponding middle tier process is still alive, it sends back a response.
The next time the cleanup procedure runs, it checks whether responses have been received for each ping event sent during the previous run. If no response was received from a particular subscriber, that subscriber is removed.
Finally after removing any subscribers that are no longer active, the procedure sends a new ping event to the remaining subscribers.
The recommended frequency for performing cleanup is every twelve hours. In order to allow enough time for subscribers to respond to the ping event, the minimum wait time between two cleanup runs is thirty minutes. If you run the procedure again less than thirty minutes after the last run, it will not perform any processing.
The maxiumum retention time for information about ping events sent to subscribers is thirty days. Cleanup_Subscribers() deletes information for previously sent pings that are more than thirty days old.
The procedure returns an error buffer that contains an error message if any inactive subscriber could not be removed during the cleanup. It also returns one of the following codes to indicate the status of the cleanup.
Standard Agents, Oracle Workflow Developer's Guide
Workflow Control Events, Oracle Workflow Developer's Guide
Previous | Next | Contents | Index | Glossary |