Oracle Workflow Guide
Release 2.6.2

Part Number A95265-02
Previous Next       Contents Index Glossary
         Previous  Next          Contents  Index  Glossary

Custom Callback Function

A default callback function can be called at various points by the actions of the WF_NOTIFICATION APIs. You may provide your own custom callback function, but it must have the following specifications:

procedure <name in callback argument>
     (command in varchar2,
     context in varchar2,
     attr_name in varchar2,
     attr_type in varchar2,
     text_value in out varchar2,
     number_value in out number,
     date_value in out date);

Arguments (input)

command Specify GET, SET, COMPLETE, ERROR, TESTCTX, FORWARD, TRANSFER, or RESPOND as the action requested. Use GET to get the value of an attribute, SET to set the value of an attribute, COMPLETE to indicate that the response is complete, ERROR to set the associated notification activity to a status of 'ERROR', TESTCTX to test the current context by calling the item type's Selector/Callback function, FORWARD to execute the post-notification function in FORWARD mode, TRANSFER to execute the post-notification function in TRANSFER mode, and RESPOND to execute the post-notification function in RESPOND mode.
context The context passed to SEND( ) or SendGroup( ). The format is <itemtype>:<itemkey>:<activityid>.
attr_name An attribute name to set/get if command is GET or SET.
attr_type An attribute type if command is SET or GET.
text_value Value of a text attribute if command is SET or value of text attribute returned if command is GET.
number_value Value of a number attribute if command is SET or value of a number attribute returned if command is GET.
date_value Value of a date attribute if command is SET or value of a date attribute returned if command GET.

Note: The arguments text_value, number_value, and date_value are mutually exclusive. That is, use only one of these arguments depending on the value of the attr_type argument.

When a notification is sent, the system calls the specified callback function once for each SEND attribute (to get the attribute value).

Example 1

For each SEND attribute, call:

	your_callback('GET', context, 'BUGNO', 'NUMBER', textval, numval, dateval)

Example 2

When the user responds to the notification, the callback is called again, once for each RESPOND attribute.

	your_callback('SET', context, 'STATUS', 'TEXT', 'COMPLETE', numval, dateval);

Example 3

Then finally the Notification System calls the 'COMPLETE' command to indicate the response is complete.

	your_callback('COMPLETE', context, attrname, attrtype, textval, numval, dateval);


         Previous  Next          Contents  Index  Glossary


Oracle
Copyright © 2002 Oracle Corporation.

All Rights Reserved.