Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Concepts : Concept Property History

Concept Property History
Each concept property includes a history, the size of which is configurable. The history size determines how many previous values TIBCO BusinessEvents stores for that property. You can also set the history policy to record all values or only changed values.
For ContainedConcept and ConceptReference properties  History is tracked when a contained or referenced concept instance changes to a different concept instance. History is not tracked, however, when a contained or referenced concept’s properties change. See Concept Relationships for more on containment and reference relationships.
Database concepts  Database concept properties do not support history tracking.
History Size
If you set the history size to one or more, TIBCO BusinessEvents stores the property value when the property changes, along with a date and timestamp, up to the number specified. When the maximum history size is reached, the oldest values are discarded as new values are recorded.
If you set the history size to 0, TIBCO BusinessEvents does not store historical values for the concept. It stores the value without a time and date stamp.
For example, consider a Customer concept:
 
Historical Values are Stored in a Ring Buffer
The historical values for a concept property are kept in a ring buffer, as illustrated in Figure 2.
Figure 2 History Ring Buffer
The ring buffer stores both the value and the time at which the value was recorded. After the ring buffer reaches maximum capacity, which is eight in this example, TIBCO BusinessEvents begins replacing older values such that it always stores the n most recent values, where n is the history size. Note in Figure 2 in the ring buffer on the right, after the buffer reached maximum capacity, V9 replaced V1, then V10 replaced V2, making V3 the oldest value stored in the ring buffer.
History Policy
TIBCO BusinessEvents can record values using either of these policies:
Changes Only TIBCO BusinessEvents records the value of the property every time it changes to a new value.
All Values TIBCO BusinessEvents records the value of the property every time an action sets the value even if the new value is the same as the old value.
Which you choose depends on what you are tracking. For example, if you are setting the history for a property that tracks how many people pass a sensor every five minutes, All Values might be the best policy. However, if you are setting the history for a property that tracks the level of liquid in a coffee pot, Changes Only might be more appropriate.
For example, look at the two ring buffers in Figure 3. In both cases, the same series of values is set to the same property, but the history policy is different.
Figure 3 History Policy
 
History Policy and Rule Evaluation  The history policy affects how frequently TIBCO BusinessEvents re-evaluates rules that are dependent on the property. Each time TIBCO BusinessEvents records a value, it reevaluates rules that are dependent on that property. If you track changes only, rules are re-evaluated less frequently than if you track all values.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved