Business Process Automation

Stylesheet Profiles

This page is accessed via Business Process Automation > Power Data > Event Management > Stylesheet Profiles.

Stylesheet Profiles format messages that Oracle Transportation Management sends. Oracle Transportation Management provides default stylesheets for most events and several communication methods. You can override these defaults by choosing a different stylesheet. Stylesheet profiles also store the formats and templates used for message processing.

Note: You will have to upload your new XSL file to the server before starting this procedure. Save your XSL files in <otm_install_dir>/glog/gc3webapp.ear/GC3.war/WEB-INF/xsl/workflow.

Adding a Stylesheet Profile

  1. Enter a Stylesheet Profile ID to uniquely identify the Stylesheet Profile. The ID should not contain any spaces.
  2. Enter which XSL file to use in the Template Name field. If you do not enter a template name, you must enter information in the Stylesheet Content field. The glog.customPath property provides the directory name where the client-specific files are stored, and it holds the directory name that contains the XSL. The template name must be the path at where the XSL is present.

    The file name you enter is relative to <otm_install_dir>/web/htdocs/ (for CSS, javascript and image files) and <otm_install_dir>/glog/gc3webapp.ear/GC3.war/WEB-INF/xsl (for XSL files). For example, to use MyOwnTenderHtml.xsl you enter workflow/MyOwnTenderHtml.xsl.
  3. If you mark the Raw XML check box, Oracle Transportation Management sends your messages without applying your stylesheet. If you clear this check box, Oracle Transportation Management formats your messages with this stylesheet before sending.
  4. Select the MIME Format of your message. Typically "text/plain" for fax stylesheets and "text/html" for email and Message Center stylesheets. The list of available formats is set by the glog.stylesheet.formatTypes property.
  5. The Subject Property Key puts information into the output of the XSL. It is recommended that you use the default property key for the message type you are using.

    To find your default property key, search for the stylesheet that you are redesigning. An example is the property key for tendering: subjectPropKey.Tender_for_Shipment_0.
  6. The Out XML Profile ID is applied when building or including the Raw XML in the notification. The Profile is used to reduce the size of the XML that is generated prior to the stylesheet being applied. This can be used to improve performance.
  7. Enter a Data Generator Plugin ID to specify the Java class of the data generator.
  8. Enter a Notify Function ID to specify the Java class of the message transformer.
  9. Select a Message Direction to indicate if the stylesheet profile is used for processing inbound messages, outbound message, or both. When editing an inbound stylesheet profile, you have the option to Parse Stylesheet Content. You cannot parse an outbound profile.
  10. Select the Type of stylesheet profile.
  11. Attachments control the embedding/linking of documents into Oracle Transportation Management notifications. The following options are available:
    • OTM Login: Document content can be retrieved by only Oracle Transportation Management users, via a link in the email. Users must login to view content.
    • OTM Link: Document content is retrieved via a link in the email, by any mail recipient. The content is piped through an Oracle Transportation Management webserver to avoid firewall restrictions, but does not require an Oracle Transportation Management login to view.
    • Direct Link: Document content is retrieved via a link in the email directly to the document system.
    • Embed: Document content is embedded in the notification. If not, Oracle Transportation Management Link is used.

    Note: If the document is stored in WebCenter Content, and the Content Management System has been configured to use direct URL's, the OTM Login and OTM Link options map to a direct WCC link.

  12. If the stylesheet profile is used in notification transformations, select the For Notification XML check box.
  13. If the stylesheet profile is used for the transmission XML, select the For Transmission XML check box.
  14. If the stylesheet profile is used for the message XML, select the For Message XML check box.
  15. Enter the Stylesheet Content ID where the content of the stylesheet is maintained. For inbound messages, the stylesheet content ID indicates the XSL/Text template used for parsing the inbound XML/Text message. For outbound messages, the stylesheet content ID indicates the XSL template used for formatting or transforming the outbound XML message. If you have not entered information in the Template Name field, you must use a stylesheet content ID. Doing so enables the use of stylesheet content for notification.
  16. In the View Stylesheet Content ID field, enter the stylesheet content used for viewing the content associated with the profile. You can use this setting to configure the presentation of your content. The View Message Content action on the Message Hub Manager relies on this field to present the content.

    The option is available for inbound and outbound messages. For inbound messages in the Message Hub, the View Stylesheet Content is used for formatting TEXT/XML messages. The template should be an XSL for XML messages. For outbound, the template should be an XSL which is used to transform the outbound Message XML in a personalized format.

Stylesheet Profile Locale

This section is used for specifying locale-specific stylesheet content, to send notifications in a specific language. Locale-specific stylesheet content will be honored if the glog.notify.localizeStylesheet property is set to true.

  1. Select a Language. To send notifications in the language specified for the contact, select the corresponding language in the Language Spoken field for the contact on the Contact Manager. For example, if the contact has a language spoken of "French", you must enter a language of "French" and a country of "France".
  2. Select a Country. If the language is not country-specific, select "*". If you want to select a specific language and country combination, it must match the following table in order to match with the Language Spoken field on a contact. Other combinations are not supported by the Language Spoken field.

    Note: Non-supported languages, e.g. Croatian, have been added to the user interface so you can create your own translations and get emails and faxes in the appropriate language.

     

    Language Spoken

    (on Contact Manager)

    Language

    Country

    Belarussian Belarusian Belarus
    Chinese (Simplified) Chinese China
    Chinese (Traditional) Chinese Taiwan
    Croatian Croatian Croatia
    Czech Czech Czech Republic
    Dutch Dutch Netherlands
    English English United States
    Finnish Finnish Finland
    French French France
    French (Canadian) French Canada
    German German Germany
    Hungarian Hungarian Hungary
    Italian Italian Italy
    Japanese Japanese Japan
    Korean Korean South Korea
    Latvian Latvian Latvia
    Lithuanian Lithuanian Lithuania
    Norwegian Norwegian Norway
    Polish Polish Poland
    Portuguese (Brazilian) Portuguese Brazil
    Russian Russian Russia
    Serbian Serbian Serbia
    Slovak Slovak Slovakia
    Slovene Slovenian Slovenia
    Spanish (World Wide) Spanish Spain
    Spanish (Castillian) Spanish Spain
    Spanish (Mexican) Spanish Mexico
    Swedish Swedish Sweden
    Thai Thai Thailand
    Turkish Turkish Turkey
    Ukrainian Ukrainian Ukraine

  3. Enter a Stylesheet Content ID.
  4. Click Save for each locale you define.

Stylesheet Profile Arguments

This section is available only if you select the For Message XML check box. Stylesheet profile arguments represent arguments that have been extracted from the message template. You can also enter user-defined arguments to be used in message processing.

  1. Enter an Argument Name.
  2. Select an Argument Source. If the argument is extracted from the stylesheet content template, select MESSAGE. If a user has added the argument, select USER. If you choose MESSAGE and the stylesheet content template is updated and reprocessed, the argument may change.
  3. If the argument is required to continue processing, select the Required check box. This setting is used during inbound message processing when determining the stylesheet profile for the message profile.
  4. Enter a Default Value for the argument.
  5. Click Save for each argument you enter.

Stylesheet Profile Set Fields

This section is available only if you select the For Message XML check box. It represents fields in the message table that should be updated after a message is parsed. For example, if the latitude and longitude need to be parsed from the message and stored in the message table, the Stylesheet Profile Set Fields grid would specify the following:

Field Name

Argument Name

Assign Type

LATITUDE

LATITUDE

ARG

LONGITUDE

LONGITUDE

ARG

Adding Stylesheet Profile Set Fields:

  1. Select a Field Name. This specifies the field on the message table that will be updated after parsing a message and retrieving the argument.
  2. Select an Argument Name. This field indicates the argument name from the Stylesheet Profile Arguments section to use as the basis for setting the field.
  3. Select an Assign Type. If the selected argument contains the value you want to use, select ARG. If you want to use the associated values found via a message code map instead of the original ones supplied by the argument, select MAP.
  4. Enter a Message Code Map ID to use as a lookup to determine the value to populate the field if you have selected. The system takes the value provided by the argument, looks it up in the message code map, and then uses the associated value in the map instead of the original value.
  5. Click Save for each field you enter.

Email Modifications

Using the Subject Property Key to Control the Subject Line

Oracle Transportation Management supports the ability to override the default subject line for outbound email notifications. The subject property key allows you to refer to a translation ID for the subject line. Stylesheet profiles control the embedding/linking of documents into Oracle Transportation Management notifications.

When creating a stylesheet profile to use within Contact Notification or an agent action, you can override the default subject line with a specification including XPATH tags. The translation can include references to the XML data using a modified XPATH expression. An example of XML tags used in the modified XPATH specification is:

<TAG1/TAG2[@QUAL='value']>

For example, you can create a translation with a key "subjectPropKey.ClientShipmentEvent" whose translation is defined as:

<Shipment/References/Reference[@Qual='PRIMARY TRACKING REF']> :   <Shipment/Origin/Name> to <Shipment/Dest/Name>

By specifying subjectPropKey.ClientShipmentEvent as the subject property key of a stylesheet profile, you end up with subjects of the email:

PTR20021231-001 :  HOUSTON to PHILADELPHIA

Note: The maximum storage length of a translated subject line is 1000 characters.

Special Handling for Report Emails

Subject lines for report-related e-mails support additional functionality to provide e-mail recipients with information regarding the report. This includes:

1. Inclusion of all report parameters as number parameters for the standard subject substitutions (e.g. {6}). Report parameter values start at argument #6 and are ordered by parameter name. If a customer is interested in the first lexicographical parameter, he could replace the subject key with:

subjectPropKey.{0}_Report_{2}_for_{3}:_CAR_{6}

This key can be localized via NOTIFICATION translations.

2. Support for report parameters in the XML data provided for REPORT - READY. The structure for parameters is:

  <notify>

    <Report>

      <P>

        <Parameter name (with spaces replaced by underscores)>

           (parameter value)

        </Parameter name>

      </P>

    </Report>

  </notify>

So an XML macro for the COLLECTION ADVICE REFERENCE parameter would be <notify/Report/P/COLLECTION_ADVICE_REFERENCE>. Note that the property, glog.notify.supportsSubjectTags, must be set to true to enable XML macro substitution. It has been set to true by default.

3. Support for XML parsing in the Stylesheet Profile subject key. If the Subject Property Key begins with an asterisk (*), the entire subject is based on the text following the asterisk. This text can include XML macros. So to have all REPORT_EVENT_BY_EMAIL notification include the COLLECTION ADVICE REFERENCE in the header, the subject could be specified as:

*REPORT - READY for CAR {notify/Report/P/COLLECTION_ADVICE_REFERENCE>

Note that the Subject Property Key is currently limited to 100 characters. Increasing this would require a change in the database schema for STYLESHEET_PROFILE and the JSP screen for Stylesheet Profile editing.

With the size constraints on STYLESHEET_PROFILE.SUBJECT.SUBJECT_PROPKEY, it is recommended that you use approach #1.

Enabling XML Tag Scanning

Scanning subject lines for XML tags may have a slight performance impact. For this reason, Oracle Transportation Management disables such scanning by default. To use XML tags, set the following property:

glog.notify.supportsSubjectTags=true

The XML for all shipment emails includes:

  • End date (/Shipment/ EndDate) in the recipient's time zone.
  • Reference numbers (/Shipment/References/Reference). Each reference element holds a Qual attribute equal to the reference qualifier and a value equal to the reference number.

Related Topics