Skip Headers

Oracle Workflow Developer's Guide
Release 2.6.3

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

To Create a Message

1. Select the item type that you want to create a message for in the navigator tree, and choose New Message from the Edit menu. A Message property page appears.
2. Provide an internal name for the message that is all uppercase with no leading/trailing spaces, and provide a display name. You may also enter an optional description. All Oracle Workflow APIs, SQL scripts, and PL/SQL procedures refer to the internal name when identifying a message.
Attention: To update the internal name for a message once it is defined, you must use a special SQL script called wfchmsg.sql. You should only use this script to correct errors in a message's internal name during design time. Do not use this script to rename messages that are involved in running instances of processes. See: Wfchmsg.sql, Oracle Workflow Administrator's Guide.
Caution: Do not include colons ":" or leading/trailing spaces in your internal name.
3. Choose High, Normal, or Low for the default priority of the message. The priority level simply informs the recipient of the urgency of the message. It does not affect the processing or delivery of the message.
Note: When you assign this message to a notification activity and you incorporate the notification activity into a process diagram as a node, you can override this default message priority with a new priority that is constant or dynamically determined at runtime. See: To Define Nodes in a Process.
Note: In earlier versions of Oracle Workflow, the message priority was represented as a numeric value between 1 (high) and 99 (low). Oracle Workflow now automatically converts the priority values of all message definitions defined in earlier versions as follows: 1-33 = High, 34-66=Normal, and 67-99=Low.
4. Choose Apply to save your changes.
5. Select the Body tab to display the Body property page of the message.
6. The subject gets its default value from the display name that you entered in the Message tab. You can choose to keep the default subject or enter a new subject for the message. The subject can include message attributes that get token replaced with runtime values when the message is delivered. To include a message attribute in the subject, use an ampersand (&) followed by the message attribute's internal name. See: Send and Respond Message Attributes and To Define a Message Attribute.
Suggestion: For clarity, you can assign a message attribute the same name as the item type attribute it references.
7. Enter a plain text message body in the Text Body field. You can select the ellipsis button (...) to expand the view of the Subject and Text Body fields in another window.
Oracle Workflow uses the content you enter in the Text Body field to generate a plain text version of the notification message. The plain text message can be viewed from the from an e-mail reader that displays plain text messages.
Attention: Make sure you enter a plain text message body in the Text Body field. If Text Body is null, you get an empty notification when you view your message from a plain text e-mail reader.
8. You may enter an optional HTML-formatted message body in the HTML Body field by selecting the HTML Body tab and typing in the content, or by selecting Import to import the content from a .HTM or .HTML file. You can also select the ellipsis button (...) to expand the view of the Subject and HTML Body fields in another window.
Attention: When you enter or import the HTML message body, you do not need to include the <Body>...</Body> HTML tags. If you do include these tags, Oracle Workflow simply extracts the content between these tags to use as the HTML message body. As a result, Oracle Workflow ignores any HTML tags or content prior to the <Body> tag.
Attention: Oracle Workflow Builder does not verify the HTML formatting of the message body.
Oracle Workflow uses the content you enter in the HTML Body field to generate an HTML-formatted version of the notification message. You can view an HTML-formatted notification message from the Notification Details web page, or from an e-mail reader that displays HTML-formatted messages or HTML-formatted message attachments.
Note: If HTML Body is null, Oracle Workflow uses the message body entered in Text Body to generate the notification message. It inserts the plain text between the <pre>...</pre> HTML tags.
Attention: Oracle Workflow does not fully support references to icon and image files in the HTML message body. Although your web server may be able to resolve the location of these files for proper display in the Notification Details web page, notification mailers and third party e-mail applications are not able to identify the location of these files when users view the HTML version of their notifications in e-mail.
9. You can embed message attributes in the text or HTML body. Oracle Workflow token replaces the message attributes with runtime values when it delivers the notification. To embed a message attribute, enter an "&" followed by the message attribute's internal name.
Attention: The text in a message body must be less than 4000 bytes. If you include message attributes in the text for token substitution, then the final message body can increase up to 32000 bytes.
Note: You can also include a special token in the message subject or body called &#NID. Oracle Workflow substitutes this token with the notification ID of the runtime notification.
Additionally, you can use the message function WF_NOTIFICATION() to include a formatted table of message attributes or a notification history table in the text or HTML message body.
10. Choose Apply to save your changes.
11. Select the Roles tab page to specify the roles that have access to this message. (This functionality will be supported in a future release.)
12. Select the Access tab page to set the access levels allowed to modify this message. See: Allowing Access to an Object.
13. If you want the notification message to prompt the performer for a response value and you want Oracle Workflow to interpret that response value as the result of the notification activity, select the Result tab page and complete the information requested. Oracle Workflow uses the information you specify in the Result tab page to create a special 'Respond' message attribute called RESULT. See: Message Result
Specify a display name and description for RESULT. Select a lookup type from the poplist field. The lookup type you select should be identical to the lookup type specified for the notification activity's result type. Select a lookup code in the Default Value region. The lookup code you select appears as the default value of the RESULT message attribute.
Note: To create any other type of message attribute, see: To Define a Message Attribute.
14. Choose Apply to save your changes, OK to save your changes and close the property page or Cancel to cancel your changes and close the property page.
15. The message you just defined now appears beneath the Message branch in the navigator tree. You can review or edit the properties of this message at any time by double-clicking on the message in the navigator tree or by selecting the message and choosing Properties from the Edit menu.
If a message has a Result defined, then its message icon in the Navigator tree has a red question mark overlay to help you distinguish it from messages that do not have a Result defined.
16. You must now define all the message attributes that you have included in the subject and body of this message.
17. To create a message attribute that references an item type attribute, select the referenced item type attribute in the navigator tree, and hold down your mouse select button as you drag the item type attribute to your message.
Edit the property page that appears, making sure the message attribute has the proper Source. The Default Value region is automatically set to Item Attribute and references the originating item attribute.
18. You can also create message attributes that are not based on existing item type attributes. See: To Define a Message Attribute.

See Also

To Copy a Message
         Previous  Next          Contents  Index  Glossary


Oracle Logo
Copyright © 2003 Oracle Corporation.

All rights reserved.