Defining Messages

arrow icon   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.

    Important: 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.

    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. The maximum length for the complete token-substituted subject is 240 bytes. See: Send and Respond Message Attributes and To Define a Message Attribute.

    Tip: For clarity, you can assign a message attribute the same name as the item type attribute it references.

  7. If the message will not contain any embedded Oracle Application Framework regions, 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.

    Important: If the message will not contain any embedded Oracle Application Framework regions, ensure that 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. However, if the message does contain one or more embedded Oracle Application Framework regions, then you should leave the Text Body field blank, because the text body is not used for this type of notification. See: Embedding Oracle Application Framework Regions in Messages.

  8. Enter an 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.

    If the message will contain an embedded Oracle Application Framework region, then the HTML body is required. Otherwise, the HTML Body field is optional. See: Embedding Oracle Application Framework Regions in Messages.

    Important: 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.

    Important: 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.

  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 ampersand ("&") followed by the message attribute's internal name.

    Important: 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.

    Note: If you define a 'Send' message attribute of type URL that points to an image file with an extension of gif, jpg, png, tif, bmp, or jpeg, and you embed the URL attribute in the HTML body of the message, then the prefix in the attribute value controls whether Oracle Workflow displays the image inline in the Notification Details page and HTML-formatted e-mail notifications or displays the image URL as a link. See: To Define a URL Attribute.

    Additionally, you can use the message function WF_NOTIFICATION() to include a formatted table of message attributes or an action 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.

arrow icon   To Define a Message Attribute:

  1. To create a message attribute that does not reference an existing item type attribute, select a message in the navigator tree and choose New Attribute from the Edit menu.

    An Attribute property page appears.

  2. Provide an Internal Name in all uppercase with no leading/trailing spaces. All Oracle Workflow APIs, SQL scripts, and PL/SQL procedures refer to the internal name when identifying an attribute.

    Important: To update the internal name for a message attribute once it is defined, you must use a special SQL script called wfchmsga.sql. You should only use this script to correct errors in a message attribute's internal name during design time. Do not use this script to rename message attributes that are involved in running instances of processes. See: Wfchmsga.sql.

    Caution: Do not include leading/trailing spaces or reserved characters such as a colon (":"), ampersand ("&"), or number sign ("#") in the internal name of a message attribute. Additionally, do not include any spaces within the internal name of a message attribute.

  3. Specify 'Send' or 'Respond' in the Source field to indicate whether this attribute should send information to the notification recipient or prompt a notification message recipient for a response, respectively.

  4. Enter a Display Name. This is the name that appears in the navigator tree. If this is a 'Respond' message attribute, then this display name is also used as the response prompt. See: Example 'Respond' Message Attributes.

    For 'Send' message attributes, the Display Name of the attribute appears in plain text e-mail notifications only if the attribute is of type URL, to describe what the URL drills down to.

  5. Enter an optional description. If this is a 'Respond' message attribute, use this field to elaborate on response instructions. Oracle Workflow includes this description to provide supplemental instructions to the notification recipient as follows:

  6. Select the data type of the attribute.

  7. Depending on the Type of your attribute, provide the following default information:

    Important: Do not specify a message attribute's data type as Attribute, as it serves no purpose in a notification message and is also not supported by the Workflow Notification System.

    Important: 'Respond' message attributes of type Date, Number, Text, or Role prompt the notification recipient to respond with a date, number, text value, or role (internal or display name), respectively.

    For 'Respond' message attributes of type Role, if an administrator has defined grants to restrict the Oracle Workflow user list of values, then when a notification recipient enters response values for the role attribute in the Notification Details page, Respond to Notifications as Group page, or Vacation Rule: Response page, only the values to which the notification recipient has access appear in the list of values. See: Configuring the Oracle Workflow User List of Values.

    'Respond' message attributes of type Lookup prompt the notification recipient to select a response from a list of values.

  8. If your message attribute is a URL attribute, specify a Frame Target. When you reference this message attribute in a message and the user who receives the message clicks the URL link in the message body, the URL opens according to what you specify as the frame target. The frame target can be:

    Note: You should only choose New Window or Full Window as the frame target for URL attributes. The Notification Details page no longer uses frames to display notifications, so choosing Same Frame or Parent Frameset is equivalent to choosing Full Window.

    Note: If the URL attribute points to an image file with an extension of gif, jpg, png, tif, bmp, or jpeg, the attribute value has a prefix of IMG: or no prefix, and you embed the URL attribute in the notification message by token substitution, then Oracle Workflow displays the image inline in the Notification Details page and HTML-formatted e-mail notifications, rather than as a link. In this case the frame target value is not applicable.

  9. If your message attribute is a Send attribute, is of type Document, and contains a PL/SQL, PL/SQL CLOB, or PL/SQL BLOB document, you can check Attach Content to attach the content of the attribute to the notification message. When you view your notification from the Notification Details Web page, you see a document icon following the notification message body that displays the contents of the attached message attribute when you click on it. If you view your notification from e-mail, the presentation of the attachment will vary depending on what your e-mail notification preference setting is. See: Reviewing Notifications via Electronic Mail.

    Note: You can attach, as well as embed (by token substitution) PL/SQL document attributes in the notification message and are not limited to one or the other. However, a document attribute that references an Oracle Application Framework region can only be embedded in the notification message. A region cannot be attached to a notification. See: Embedding Oracle Application Framework Regions in Messages.

  10. If your message attribute is a Send attribute and is of type URL, you can check Attach Content to attach the URL to the message.

    Note: You can attach, as well as embed (by token substitution) URL attributes in the notification message and are not limited to one or the other.

    Note: If you check Attach Content for a URL attribute that points to an image file, the URL attribute appears as a link in the Notification References attachment or Related Applications region, just as other URLs do.

  11. For message attributes, the default value may be a constant or an item type attribute. If the default references its entire value directly from an item type attribute, choose Item Attribute, then use the poplist field to choose an item type attribute. The item type attribute you select must be associated with the same item type that the message itself is associated with. The item type attribute you select must also be of the same data type as the message attribute.

    Note: A message attribute type of 'Text' is compatible with any item attribute type except Event, but all other message attribute types must match the item attribute type exactly.

  12. 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.

  13. Any message attribute you define appears beneath the respective message you defined it for in the navigator tree. You can review or edit the properties of an attribute at any time by double-clicking on the attribute in the navigator tree or by selecting the attribute and choosing Properties from the Edit menu. Respond message attribute icons in the Navigator tree have a red question mark overlay to help you distinguish them from Send message attribute icons.

    Note: Message attributes assume the access/protection level of their parent message.

    Important: The order in which you list 'Respond' message attributes in the navigator tree correlates to the order in which they appear in the response section of the notification message. You can use the drag and drop feature of the navigator tree to reorder a set of attributes, or select an attribute and choose Move Attribute Up or Move Attribute Down from the Edit menu.

arrow icon   To Token Substitute an Attribute:

Oracle Workflow supports runtime token substitution of attributes. You can embed attributes within an attribute as well as embed attributes within a message subject and body. To embed an attribute, specify the attribute that you want to have token substituted as &attr_name, where attr_name is the internal name of the attribute.

When performing token substitution, Oracle Workflow fetches the internal name of the attribute and its value. If an attribute requiring token substitution is nested with another attribute, Oracle Workflow orders the nested list of attributes according to the length of their internal attribute names and then begins substituting the attributes with the longest internal names first.

Important: If you find that you need to nest message attributes more than two layers deep to display the necessary message body content, you should investigate creating a PL/SQL document-type message attribute. See: External Document Integration.

arrow icon   To Copy a Message:

  1. Select the message to copy in the navigator tree.

  2. Hold down your mouse select button as you drag the message to the item type branch you want to copy to.

  3. When you release your mouse button, a property page appears for the new message.

    Note: You can also use the Copy and Paste options in the Edit menu.

  4. Enter a new internal name and display name.

  5. Make any additional modifications to the properties of the message.

  6. When you are done, choose OK.

    Note: Copying a message also copies any message attributes assigned to it.

Related Topics