|Oracle Workflow Guide
Part Number A95265-03
The post-notification function should be a PL/SQL procedure written to the same API standards required for function activities. See: Standard API for PL/SQL Procedures Called by Function Activities.
When you specify a post-notification function, the Workflow Engine first sets the context information to use with the function via the following two global engine variables:
Note: The value of responder varies depending on the notification interface the recipient uses to respond. If the recipient responds using the Notification web page, responder is set to the role name of the responder. If the recipient responds via e-mail, responder is set to "email:responder_email_address".
You may reference these global engine variables in your PL/SQL function.
Then when the notification's state changes, a notification callback function executes the post-notification function in the mode that matches the notification's state: RESPOND, FORWARD, or TRANSFER.
When the Notification System completes execution of the post-notification function in RESPOND mode, the Workflow Engine automatically runs the post-notification function again in RUN mode. In this mode, the post-notification function can perform additional processing such as vote tallying.
If a notification activity times out, the Workflow Engine runs the post-notification function for the activity in TIMEOUT mode. For a Voting activity, the TIMEOUT mode logic should identify how to tally the votes received up until the timeout.
When the post-notification function completes, the Workflow Engine erases the two global engine variables.
As a final step, if the post-notification function is run in TRANSFER mode and Expand Roles is not checked for the notification activity, the Workflow Engine sets the assigned user for the notification to the new role name specified.
Attention: If the post-notification function returns ERROR:<errcode> as a result or raises an exception, the Workflow Engine aborts the respond, forward, or transfer operation. For example, if the post-notification function is executed in FORWARD mode and it raises an exception because the role being forwarded to is invalid, an error is displayed to the user and the Forward operation does not get executed. The notification recipient is then prompted again to take some type of action.