Events

Overview

In a deployment, three types of events are triggered that allow users to react to them in data-integration routes.

You can subscribe to events when:

  • The value of an Attribute is updated.
  • An instance of a particular entity is created.
  • When an instance is deleted.

The following page describes the contents of these events and details the differences based on the type of Attribute or Entity you follow.

About IndicatorUpdateEvent

IndicatorData

An IndicatorData is a type of information stored in an Indicator. Each type of IndicatorData can be accessed using a unique key.

IndicatorUpdateEvent

An IndicatorUpdateEvent has the following information : 

  • instance id – The Id of the instance holding of the updated object.
  • transaction time – The transaction time at which the update took place.
  • added values – The "new" values that appeared during the update.
  • removed values – The values that were set before this update but are now deleted.
  • previous values – The values present before the update took place.

Added values, removed values and previous values are all lists of IndicatorValueTimeSeries  instances.

Depending on the type of Indicator being checked for updates (mono/multi dim, single/multi IndicatorData), the information can be accessed in different ways. The following sections examine each case separately.

Mono-dimensional Indicator with single IndicatorData

failureStatus of Payment is a mono-dimensional Indicator with a single  IndicatorData .

Because failureStatus is mono-dimensional there is only one instance id available. It can be accessed in a route using the dot syntax.

Similarly, because failureStatus has a single IndicatorData, added values, removed values and previous values only contain information for one IndicatorData ("Value").


The following table summarizes the information available and how to access it in a Camel route:

Information Syntax Returned objects
transaction time body.transactionTime Long corresponding to the transaction time of the event
instance id body.instanceId Long corresponding to the instanceId of the instance that triggered the event
added values body.addedValues List of TimedIndicatorValue
removed values body.removedValues List of   TimedIndicatorValue    
previous values body.previousValues List of TimedIndicatorValue    

Multi-dimensional Indicator with single IndicatorData

inProcessCount of AccountxCutoff is a multi-dimensional Indicator with a single  IndicatorData .

Because inProcessCount is multi-dimensional, you must be able to access all the entities that make up this Indicator. As with a mono-dimensional Indicator, It can be accessed in a route by using instanceIdByDimensionAlias and by defining the dimension alias you are interested in. 

Note: The dimension alias is the entity that holds the instance.

Because inProcessCount has a single IndicatorData, added values, removed values, and previous values only contain information for one IndicatorData ("Value").

The following table summarizes the information available and how to access it in a Camel route:

Information Syntax
transaction time body.transactionTime
instance id body.instanceIdByDimensionAlias[Account]
added values body.addedValues
removed values body.removedValues
previous values body.previousValues

 (info) instanceIdByDimensionAlias could also have been used in the previous example. For failureStatus we would have used instanceIdByDimensionAlias[Payment]

Mono-dimensional Indicator with multiple IndicatorData

stuckCountStatus of Step is a mono-dimensional Indicator with a multiple  IndicatorData .

Because stuckCountStatus is mono-dimensional there is only one instance id available. It can be accessed in a route using the dot syntax.

Because stuckCountStatus has a many IndicatorData, added values, removed values and previous values contain information for all IndicatorData:

  • Value – instance id of the corresponding instance of Classifier 
  • Rank – corresponding rank of the Classifier
  • Label – corresponding label of the Classifier


The following table summarizes the information available and how to access it in a Camel route:

Information Syntax Returned objects
transaction time body.transactionTime Long corresponding to the transaction time of the event
instance id body.instanceId Long corresponding to the instanceId of the instance that triggered the event
added values body.addedValues List of TimedIndicatorValue
removed values body.removedValues List of  TimedIndicatorValue  
previous values body.previousValues List of  TimedIndicatorValue  

IndicatorValueTimeSeries

A IndicatorValueTimeSeries is a list of TimedIndicatorValue. Each element of the list contains the actual value passed to the event and its valid time stored as two different fields (validTimeBegin and validTimeEnd).

The following tables describes how to access the information of a IndicatorValueTimeSeries.

Information Syntax
values body.indicatorValues
value (only works if there is one element) body.indicatorValue


TimedIndicatorValue

TimedIndicatorValue is a value with its valid time stored as two different fields (validTimeBegin and validTimeEnd).

The following tables describes how to access the information of a TimedIndicatorValue.

With only one IndicatorData

Information Syntax
valid time begin body.validTimeBegin
valid time end body.validTimeEnd
value body.value

With multiple IndicatorData

Information Syntax
valid time begin body.validTimeBegin
valid time end body.validTimeEnd
valueByIndicatorDataName

body.valueByIndicatorDataName[IndicatorDataName]

For a Classifier, the available "IndicatorDataNames" are:

    • Value – instance id of the corresponding instance of Classifier 
    • Rank – corresponding rank of the Classifier 
    • Label – corresponding label of the Classifier

When the Indicator represents a Relation then the value of a TimedIndicatorValue is an EventInstanceIds.

About InstanceEvent

InstanceCreationEvent

An InstanceCreationEvent has the following information: 

  • instance id – The Id of the instance that triggered the event.
  • entity id – The Id of the instance's entity.
  • transaction time – The transaction time at which the event took place.
  • operationInstant – The valid time of the operation.

InstanceDeletionEvent

An InstanceDeletionEvent has the following information: 

  • instance id – The Id of the instance that triggered the event.
  • entity id – The Id of the instance's entity.
  • transaction time – The transaction time at which the event took place.
  • operationInstant – The valid time of the operation.


Related Links