Exporting sample packets and schemas

You can export sample packets and schemas of events and actions for testing purposes or to provide IBM® components (such as Business Monitor) with the information required for integration with Decision Server Events.

About this task

Event data payloads sent to the event runtime and action data payloads sent from the event runtime are called packets. You can find example packets and schemas in the output (bin) folder of your event project, which are called generated resources in Event Explorer. The example packets and schemas are automatically built as you change them, so they are always up to date.

Actions
  • The example packets and schemas files are located in:
    • Output folder of your event project: <project name>/bin/packets/actions/
    • Generated resources in Event Explorer: <project name>/generated resources/packets/actions/
    where <project name> is the name of your event project.
  • There is an example packet XML file named for each action. The example for each action is in either 2.2 or 6.2 packet format, depending on which format is configured for the action. If the action is configured to produce Common Base Event format, there is an _CBE.XML file containing an example common base event.
  • If the action is configured to produce Common Base Event format, there is an _CBE.XSD file containing the action schema for the common base event payload (not for the whole common base event).
    Important: The target namespace for the schema must contain the event runtime host name. You might have to edit the schema to change the targetNamespace= attribute at the top of the schema.
    If the action is not configured to produce Common Base Event format, there is an .XSD file containing the schema for the action packet in either 2.2 or 6.2 packet format, depending on which format is configured for the action.
Events
  • The example packets and schemas files are located in:
    • Output folder of your event project: <project name>/bin/packets/events/
    • Generated resources in Event Explorer: <project name>/generated resources/packets/events/
    where <project name> is the name of your event project.
  • There are example packets and schemas named for each event in the three subfolders (v2.2, v6.2, and CBE).
  • If the event is configured to produce Common Base Event format, the .XSD file in the Common Base Event subfolder contains the event schema for the common base event payload (not for the whole common base event).
    Important: The target namespace for the schema must contain the event runtime host name. You might have to edit the schema to change the targetNamespace= attribute at the top of the schema.
    In addition, the .cbe file contains an event definition file that you can use to configure Business Monitor to send events to the event runtime.
  • The event runtime accepts event packets in either 2.2 or 6.2 format. You can find example packets and schemas for these formats in the v2.2 and v6.2 subfolders.

Exporting sample packets and schema definitions

Before you begin

Open the Event perspective to see the Event Explorer view.

Procedure

  1. In the Event Explorer view, click the Action tab of the Action Properties dialog, or the Event tab of the Event Properties dialog, then click Export packets and schemas.
  2. Choose the type of XML you want to generate. For a Common Base Event Payload Schema, you must also provide the host portion of the target namespace; this value is incorporated into the schema definition. The host portion must match the value of the Decision Server Events system name. This value ensures that the namespace specified in events forwarded to Decision Server Events and the exported XSDs are the same. The supplied value must match the value of the host name in the <system> element at run time. The run time default for the <system> element is the host name (without the port number) where the event runtime is executing. If you do not know what that value is going to be, you can modify the as.director.common.defaultSystemName property to set the runtime value.

    For details of how to set this property, see Setting properties.

    If you are using Properties, this property is in the Common section.

    The XML is displayed in a separate window.

  3. If you want to save the output to a file, click Save, navigate to the required location, and save the file. The default file format is Action_action-name.xsd or Event_event-name.xsd for schema exports and Action_action-name.xml or Event_event-name.xml for sample packets (any embedded spaces in the action or event name are replaced with underscores).

Example exports

The following example shows an Decision Server Events packet from an action:

<connector xmlns="http://wbe.ibm.com/6.2/Action/Deny-Authorization" name="Transaction Server" version="6.2">
  <connector-bundle id="AE6740B6_4231_4DCF_9EB1_8EC207B9E021" name="Deny Authorization" type="Action">
    <Transaction-Processing-Instruction>
      <transaction_id type="String">String_transaction_id_55</transaction_id>
      <transaction_processing_instruction type="String">DENY</transaction_processing_instruction>
    </Transaction-Processing-Instruction>
    <Transaction-Processing-Instruction>
      <transaction_id type="String">String_transaction_id_16</transaction_id>
      <transaction_processing_instruction type="String">DENY</transaction_processing_instruction>
    </Transaction-Processing-Instruction>
  </connector-bundle>
  <system>AdvESB.pot.com</system>
  <timestamp>2008-11-20T15:53:11Z</timestamp>
  <loginfo>Test values</loginfo>
</connector>

The following example shows an Decision Server Events packet schema from an action:

<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://wbe.ibm.com/6.2/Action/Deny-Authorization" xmlns:tns="http://wbe.ibm.com/6.2/Action/Deny-Authorization">
  <annotation>
    <documentation>Changes might be lost. Autogenerated (20090916_1759) .</documentation>
  </annotation>
  <element name="connector">
    <complexType>
      <sequence>
        <element name="connector-bundle">
          <complexType>
            <sequence>
              <element maxOccurs="unbounded" minOccurs="0" name="Transaction-Processing-Instruction">
                <complexType>
                  <sequence>
                    <element maxOccurs="1" minOccurs="0" name="transaction_id">
                      <complexType>
                        <simpleContent>
                          <extension base="string">
                            <attribute fixed="String" name="type" type="string" use="optional"/>
                          </extension>
                        </simpleContent>
                      </complexType>
                    </element>
                    <element maxOccurs="1" minOccurs="0" name="transaction_processing_instruction">
                      <complexType>
                        <simpleContent>
                          <extension base="string">
                            <attribute fixed="String" name="type" type="string" use="optional"/>
                          </extension>
                        </simpleContent>
                      </complexType>
                    </element>
                  </sequence>
                </complexType>
              </element>
            </sequence>
            <attribute fixed="Deny Authorization" name="name" type="string" use="required"/>
            <attribute fixed="Action" name="type" type="string" use="required"/>
            <attribute name="id" type="string" use="optional"/>
            <attribute name="stream" type="string" use="optional"/>
            <attribute name="workflow" type="string" use="optional"/>
          </complexType>
        </element>
        <element minOccurs="0" name="system" type="string"/>
        <element minOccurs="0" name="timestamp" type="dateTime"/>
        <element minOccurs="0" name="loginfo" type="string"/>
      </sequence>
      <attribute name="name" type="string" use="optional"/>
      <attribute name="folder" type="string" use="optional"/>
      <attribute fixed="6.2" name="version" type="string" use="required"/>
    </complexType>
  </element>
</schema>