Coding expressions for IBM correlation rules

Prerequisites

Write IBM correlation rules

Procedure

Two predefined methods are available for retrieving and for updating Common Base Event properties when coding expressions for IBM(R) correlation rules. The getAttribute(property_name) method for the act_event variable gets the value for the Common Base Event property specified by property_name. For example, the following code retrieves the msg property of an event:

act_event.getAttribute(msg);
The set(property_name, "new_value") method for the act_event variable sets the value to new_value for the Common Base Event property specified by property_name. For example, the following code updates the severity property of an event:
Short newSeverity = new Short("50");
act_event.set("severity", newSeverity);

The following table lists the Common Base Event properties and the data types returned by the getAttribute method for the act_event variable. Use the data types in this table in the set method for the act_event variable.

Common Base Event property Type returned by act_event.getAttribute(property_name)
contextDataElements[n] An object implementing the org.eclipse.hyades.logging.events.cbe.ContextDataElement interface.
contextDataElements[n].contextId String
contextDataElements[n].contextValue String
contextDataElements[n].name String
contextDataElements[n].type String
creationTime String
creationTimeAsLong Long
elapsedTime Long
extendedDataElements[n] An object of the appropriate type.
  • byte
  • int
  • short
  • long
  • double
  • float
  • string
  • dateTime
  • boolean
  • hexBinary
  • byteArray
  • intArray
  • shortArray
  • longArray
  • doubleArray
  • floatArray
  • stringArray
  • booleanArray
  • hexBinary
  • noValue
extendedDataElements[n]. An object implementing the org.eclipse.hyades.logging.events.cbe.ExtendedDataElement interface.
extensionName String
globalInstanceId String
localInstanceId String
msg String
msgDataElement An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.MsgDataElement interface.
msgDataElement.msgCatalog String
msgDataElement.msgCatalogId String
msgDataElement.msgCatalogTokens[n] String
msgDataElement.msgCatalogType String
msgDataElement.msgId String
msgDataElement.msgIdType String
msgDataElement.msgLocale String
priority Short
repeatCount Short
reporterComponentId An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.ComponentIdentification interface.
reporterComponentId.application String
reporterComponentId.component String
reporterComponentId.componentIdType String
reporterComponentId.componentType String
reporterComponentId.executionEnvironment String
reporterComponentId.instanceId String
reporterComponentId.location String
reporterComponentId.locationType String
reporterComponentId.processId String
reporterComponentId.subComponent String
reporterComponentId.threadId String
sequenceNumber Long
severity Short
situation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.Situation interface.
situation.availableSituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.AvailableSituation interface.
situation.availableSituation.availabilityDisposition String
situation.availableSituation.operationDisposition String
situation.availableSituation.processingDisposition String
situation.availableSituation.reasoningScope String
situation.categoryName String
situation.configureSituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.ConfigureSituation interface.
situation.configureSituation.reasoningScope String
situation.configureSituation.successDisposition String
situation.connectSituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.ConnectSituation interface.
situation.connectSituation.reasoningScope String
situation.connectSituation.situationDisposition String
situation.connectSituation.successDisposition String
situation.createSituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.CreateSituation interface.
situation.createSituation.reasoningScope String
situation.createSituation.successDisposition String
situation.dependencySituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.DependencySituation interface.
situation.dependencySituation.dependencyDisposition String
situation.dependencySituation.reasoningScope String
situation.destroySituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.DestroySituation interface.
situation.destroySituation.reasoningScope String
situation.destroySituation.successDisposition String
situation.featureSituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.FeatureSituation interface.
situation.featureSituation.featureDisposition String
situation.featureSituation.reasoningScope String
situation.otherSituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.OtherSituation interface.
situation.otherSituation.any String
situation.otherSituation.reasoningScope String
situation.reportSituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.ReportSituation interface.
situation.reportSituation.reasoningScope String
situation.reportSituation.reportCategory String
situation.requestSituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.RequestSituation interface.
situation.requestSituation.reasoningScope String
situation.requestSituation.situationQualifier String
situation.requestSituation.successDisposition String
situation.situationType An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.SituationType interface.
situation.startSituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.StartSituation interface.
situation.startSituation.reasoningScope String
situation.startSituation.situationQualifier String
situation.startSituation.successDisposition String
situation.stopSituation An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.StopSituation interface.
situation.stopSituation.reasoningScope String
situation.stopSituation.situationQualifier String
situation.stopSituation.successDisposition String
sourceComponentId An instance of an object implementing the org.eclipse.hyades.logging.events.cbe.ComponentIdentification interface.
sourceComponentId.application String
sourceComponentId.component String
sourceComponentId.componentIdType String
sourceComponentId.componentType String
sourceComponentId.executionEnvironment String
sourceComponentId.instanceId String
sourceComponentId.location String
sourceComponentId.locationType String
sourceComponentId.processId String
sourceComponentId.subComponent String
sourceComponentId.threadId String
version String