SAS 9.1.3 Integration Technologies » Developer's Guide


Publish Event Interface
CALL Routines
EVENT_BEGIN
EVENT_BODY
EVENT_PUBLISH
EVENT_END
XML Specification for Generic Events
XML Specification for SASPackage Events
Examples of Published Events
Publishing Framework

XML Specification for Generic Events

Events are published using well-formed XML documents. The following XML specification is used for generic events, that is, events that are generated explicitly using the event publishing CALL routines.

The EVENT_PUBLISH CALL routine automatically generates the header portion of the document using information that you provide in the EVENT_BEGIN CALL routine properties; and it creates the body portion of the document using information that you provide in the EVENT_BODY CALL routine properties.

   <?xml version="1.0" encoding="UTF-8"?>
   <sas-event:Event 
         xmlns:sas-event=
         "http://support.sas.com/xml/namespace/services.events-1.1"
         sas-event:name="event_name">
      <sas-event:Header>
         <sas-event:Version>1.0</Version>
         <sas-event:Identity>guid</sas-event:Identity>
         <sas-event:Credentials 
            sas-event:name="userid" 
            sas-event:password="password" 
            sas-event:domain="domain"/>
         <sas-event:Priority>priority</sas-event:Priority>
         <sas-event:SentFrom>originator_description</sas-event:SentFrom>
         <sas-event:SentAt>timestamp</sas-event:SentAt>
         <sas-event:Response 
            sas-event:type="none|ack|result"/>
         <sas-event:Properties>
            <PropertyName>property_value</PropertyName>
            ....
            </sas-event:Properties>
      </sas-event:Header>
      <sas-event:Body> 
         body content 
         ... 
      </sas-event:Body>
   </sas-event:Event>

Explanations of the elements follow:

Element Description
Event Root element that names the event. The sas-event namespace is defined in this element.
Header Begins the event header properties.
Version Version of the event message is required to support multiple specifications as the service matures.
Identity Unique identifier. Responses echo this identifier so that the originator can use it for correlation.
Credentials Credentials that are used for authentication and authorization checks. Events defined at a broker can be configured so that the sender of the event must be authenticated and authorized to run the event. A configured event can also specify a security context under which it should be run.
Priority Priority is mapped to a Java thread priority so that process flows and listener dispatchers can be run at different priority levels.
SentFrom Description of event originator that is used for logging purposes if available.
SentAt The time that the event was sent. This information is echoed to the sender along with completion times. All times should be formatted according to the International Standard ISO 8601 standard. A brief summary is available on the W3C Web site at http://www.w3.org/TR/NOTE-datetime.html.
Response The sender of an event can specify the type of response that it wants. The supported types are no response (NONE), acknowledgement (ACK), and request/response (RESULT). Both NONE and ACK act as broadcast events.
Properties The originator can also send user-defined properties that can be utilized during event execution.
PropertyName Value assigned to the property called PropertyName.
Body The actual message content to be acted upon.