Sending Event and Dimensional Data

The recommended method for publishing monitor data into Optimize is to use the Web Service Data Collector's dimensionalData interface that is described in this section. The Web Service Data Collector contains web services for sending data as events and dimensions, where events capture metric data and dimensions capture metadata about the metric data. For more information, see Configuring KPIs.

The addEvent (event) and addEvents (events) methods pass data as event types and a list of details about the event types, presented as a series of key/value data pairs.

The following table provides an example of the metadata that the event passes.

Data Value
Event type OrderProcess
Key/value pairs
Revenue = 500
Customer = 9
Product = 71
OrderID = 123456

The addStronglyTypedEvent (event) and addStronglyTypedEvents (events) methods are included only for backward compatibility.

The addDimension (dimension) and addDimensions (dimensions) methods pass metadata for the event data as a dimension type, or name, and a list of details about the dimension type presented as a series of key/value data pairs.

The following table provides an example of the metadata that the event passes.

Data Value
Dimension 1  
Name Customer
Key/value pairs
ID = 9
Name = ABC Corp
Region = Central
Dimension 2  
Name Product
Key/value pairs
ID = 71
Name = Widget

The addStronglyTypedDimension (dimension) and addStronglyTypedDimensions (dimensions) methods pass metadata for the event data as a dimension type, or name, and a list of details about the dimension type presented as a series of key/value data pairs.

The following table provides an example of the metadata that the event passes.

Data Value
Dimension 1  
Name Customer
Pairs
ID = 9
Name = ABC Corp
Region = Central
Dimension 2  
Name Product
Pairs
ID = 71
Name = Widget
Note: The methods of this interface use the classes contained in the bam-wsdc.jar file in the Optimize_directory/dataCollector/lib directory.

addEvent (event) and addEvents (events)

The addEvent method sends a single event. The addEvents method sends multiple events. The addEvents method does not support Web service callbacks.

Input Parameters (all parameters are required unless specified as optional)

The following table describes the input parameters.

event Document Container for the list of event attributes.
  attributes Document ListContainer for event attribute information.
    Parameter Value
    name String Attribute name (such as Revenue).
    value String or key/value Attribute value (such as 500).
  eventType String Type of the event (such as OrderProcess).
  time String Time to associate with the eventType. The time zone parameter of the date must be set to "GMT" in Designer. For input from Integration Server or Designer, the time must be in the following format:
yyyy-MM-dd’T’HH:mm:ss.SSS’Z’
yyyy-MM-dd’T’HH:mm:ss.SSSZ
yyyy-MM-dd’T’HH:mm:ss.SSS
yyyy-MM-dd HH:mm:ss.SSS
Note: If left blank, this field defaults to the current data and time.
auth Not used.
_port Not used.

addEventWithCallback

The addEventWithCallback method sends a single event and supports Web service callbacks.

Input Parameters (all parameters are required unless specified as optional)

The following table describes the input parameters.

event Document Container for the list of event attributes.
  attributes Document List Container for the event attribute information.
    Parameter Value
    name String Attribute name (such as Revenue).
    value String or key/value Attribute value (such as 500).
  eventType String Type of the event (such as OrderProcess).
  time String Time to associate with the eventType. The time zone parameter of the date must be set to "GMT" in Designer. For input from Integration Server or Designer, the time must be in the following format:
yyyy-MM-dd’T’HH:mm:ss.SSS’Z’
yyyy-MM-dd’T’HH:mm:ss.SSSZ
yyyy-MM-dd’T’HH:mm:ss.SSS
yyyy-MM-dd HH:mm:ss.SSS
Note: If left blank, this field defaults to the current data and time.
callbackEndpoint String (Optional) Location of the Web service published using the EventCallback.wsdlWSDL located in the Optimize_directory/dataCollector/conf/glue/wsdl directory. Use the following format:

http://{host}:{port}/{path}/{serviceName}.wsdl

If the value is null, the event will be processed but the callback will not be issued.

timeoutMS Int (Optional) Overrides the Analytic Engine's configured default event processing timeout value (currently set to 100000 milliseconds). Value must be greater than the Analytic Engine's configured default to override.
correlationId String (Optional) Unique identifier generated by the client sent back to the Web service during the callback operation. If value is null, the event will be processed but callback will not be issued.
notifyOnFailureOnly Boolean (Optional) If true, Web service calls are issued only when a failure occurs.
auth Not used.
_port Not used.

addStronglyTypedEvent (event) and addStronglyTypedEvents (events)

The addStronglyTypedEvent method sends a single strongly typed event. The addStronglyTypedEvents method sends multiple strongly typed events.

Note: This method is deprecated, and it is supported only for backward compatibility. In a future release, the addStronglyTypedEvent and addStronglyTypedEvents methods will be removed.

Input Parameters (all parameters are required unless specified as optional)

The following table describes the input parameters.

event Document Container for event information.
  eventType String Type of the event (such as OrderProcess).
  pairs Document List Container for the list of key/value event data.
    Parameter Value
    attribute String Attribute name (such as Revenue).
    value String or key/value Attribute value (such as 500).
  timestamp String The time when the event occurred. The time zone parameter of the date must be set to "GMT" in Designer. For input from Integration Server or Designer, the time must be in the following format:
yyyy-MM-dd’T’HH:mm:ss.SSS’Z’
yyyy-MM-dd’T’HH:mm:ss.SSSZ
yyyy-MM-dd’T’HH:mm:ss.SSS
yyyy-MM-dd HH:mm:ss.SSS
Note: If left blank, this field defaults to the current data and time.
auth Not used.
_port Not used.

addDimension (dimension) and addDimensions (dimensions)

The addDimension method sends a single dimension. The addDimensions method sends multiple dimensions.

Input Parameters (all parameters are required unless specified as optional)

The following table describes the input parameters.

dimension Document Container for the list of dimension attributes.
  attributes Document Container for dimension attribute information.
    Parameter Value
    key String Attribute name (such as Revenue).
    value String or key/value Attribute value (such as 500).
  name String Name of the dimension (such as Customer).
auth Not used.
_port Not used.

addStronglyTypedDimension (dimension) and addStronglyTypedDimensions (dimensions)

The addStronglyTypedDimension method sends a single strongly typed dimension. The addStronglyTypedDimensions method sends multiple strongly typed dimensions.

Note: This method is deprecated, and it is supported only for backward compatibility. In a future release, the addDimension and addDimensions methods will be enhanced, and the addStronglyTypedDimension and addStronglyTypedDimensions methods will be removed.

Input Parameters (all parameters are required unless specified as optional)

The following table describes the input parameters.

dimension Document Container for dimension information.
  name String Name of the dimension (such as Customer).
  pairs Document List Container for the list of key/value dimension data.
    Parameter Value
    attribute String Attribute name (such as ID).
    value String or key/value Attribute value (such as 9).
auth Not used.
_port Not used.