Creating transformation files for inbound messages

Develop an .xsl transformation that Decision Server Insights can apply to inbound messages that do not conform to the event schema.

About this task

You use the Transformation wizard to create a new .xsl transformation for your solution. The transformation is pre-filled with the namespace and fields of a specified event in your solution project. You can create the .xsl transformation either from the File menu as described in the procedure, or by right-clicking on any node of a solution project. If you right-click the node of a solution project, the project name is entered into the wizard for you. You can then select the event type in the related BOM project, if a BOM project is available.

The message classifier expressions can use the functions that are defined by the MessageContext interface to classify messages based on the attributes other than the message content. For example: the function context:getMessageTimestampISO8601('UTC') returns the time stamp of the JMS message, in ISO8601 format. For more information about the functions available, see MessageContext.

Procedure

  1. Click File > New > Transformation File.
  2. Select a solution project.
  3. Enter a container name, or click Browse and select the container.
  4. Specify a file name for the .xsl transformation.
  5. Select XML message into inbound event from the template menu.
  6. Select the event type. The event type is the event into which inbound messages that are not recognized by Decision Server Insights are transformed.
  7. Click Finish to save your work.

Results

The wizard creates the .xsl transformation for your solution. You must now add entries to the.xsl transformation that map inbound messages that are not recognized to the specified event type.

Example

In the following example transformation file, the address, message, and timestamp fields must be completed if they are to be populated by the incoming message:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns="http://www.ibm.com/ia/xmlns/default/my-solution-bom/model"
   xmlns:context="com.ibm.ia.connectivity.context.MessageContextProvider"
   exclude-result-prefixes="context">

<xsl:template match="/">
   <PingEvent>
      <address><!-- TODO --></address>
      <message><!-- TODO --></message>
      <timestamp><!-- TODO --></timestamp>
   </PingEvent>
</xsl:template>

</xsl:stylesheet> 

What to do next

Define the inbound endpoints.