Oracle Workflow Guide
Release 2.6.2

Part Number A95265-03
  Go to previous page Go to next page       Go To Table Of Contents Go To Index Go To Table Of Contents

                     Contents  Index  Glossary Master Index Feedback
 

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 your approval
Body &REQ_DOCUMENT
Message attributes, preceded by an ampersand '&'

in the subject line and 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 and body of the message have to be defined with a source of 'Send'.

In this example, the message body contains a single message attribute called REQ_DOCUMENT. REQ_DOCUMENT is a PL/SQL Document-type attribute that references an item type attribute of the same name. When you initiate the Requisition process and the Workflow Engine runs the StartProcess procedure, it calls SetItemAttrText( ) to set the REQ_DOCUMENT item attribute to the following value:

'PLSQL:wf_reqdemo.create_req_document/'||ItemType||':'||ItemKey

This value calls the PL/SQL function wf_reqdemo.create_req_document with itemtype and itemkey concatenated as an argument. The function parses this string and creates a PL/SQL document for the specified itemtype:itemkey.

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
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.