Skip Headers

Oracle Workflow Developer's Guide
Release 2.6.3.5

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

Example: Notify Requisition Approval Required

The Notify Requisition Approval Required activity sends a message called Requisition Approval Required to an approving manager. The message requests that the manager approve or reject a requisition and provides details about the requisition within the body of the message.

Result Type
The manager's response determines the activity that the process transitions to next. The possible responses, 'APPROVE' or 'REJECT' are defined in a lookup type called Approval. These values are defined by the message's special Result attribute, whose display name is Action. These values are also the possible results of the notification activity, as defined by the Result Type field in the Activity property page.

Message
The content of the notification is defined in the message called Requisition Approval Required:

Subject Requisition &REQUISITION_NUMBER, &REQUISITION_DESCRIPTION for &REQUISITION_AMOUNT requires approval
Body WF_NOTIFICATION(ATTRS,REQUISITION_NUMBER, REQUISITION_AMOUNT,REQUISITION_DESCRIPTION, FORWARD_FROM_USERNAME,REQUESTOR_USERNAME) WF_NOTIFICATION(HISTORY)
Message attributes, preceded by an ampersand '&' in the subject line or body of the message, are token substituted with runtime values when the notification is sent. However, in order for token substitution to occur properly, all message attributes referenced in the subject line or body of the message must be defined with a source of 'Send'.

In this example, the message body consists of two calls to the special message function called WF_NOTIFICATION(). The first call displays the requisition number, requisition description, requisition amount, previous approver name, and preparer name for the requisition in a message attribute table within the message. The second call displays a notification history table in the message. Additionally, the message includes a special 'Send' attribute named #FROM_ROLE, for the from role that sent the notification, to be displayed in the notification header. See: #FROM_ROLE Attribute and WF_NOTIFICATION() Message Function.

This message also contains a special result message attribute called Action and a 'Respond' message attribute called Note.

The result message attribute is defined in the Result tab of the message's property page. The result attribute prompts the approver to respond with a value from a list of possible values provided by the lookup type specified. The response, in turn, becomes the result of the Notify Requisition Approval Required activity. In this case, the possible response values are 'APPROVE' or 'REJECT', as defined by the Approval lookup type. This result determines which activity the process transitions to next.

The 'Respond' message attribute Note is of type 'Text'. This attribute prompts the approver to enter optional comments when responding to the notification.

Note: To view the content of any message, double-click on the message in the navigator tree or select the message and choose Properties from the Edit menu.

Process Node Properties
If you display the properties of the Notify Requisition Approval Required activity node in the Notify Approver subprocess diagram you should see that this node is set to Normal because it is neither the start nor end activity in the process.

You should also see that the Performer is set to the Forward To Username item type attribute, indicating that the notification gets sent to the user whose name is stored in the item type attribute called 'Forward To Username'. The value of 'Forward To Username' is determined earlier in the Requisition process by the activity called Select Approver.


         Previous  Next          Contents  Index  Glossary



Oracle Logo
Copyright © 2003, 2004, Oracle. All rights reserved.