What the state machine decided, and therefore which events the caller should fire. The machine does not fire anything itself. It returns this, the caller fires, and listeners decide what to deliver - so email, Slack and journeys are all just listeners and none of them has to reimplement the re-notification window.


Properties

PropertyReturnsDescription
bucketWasNewbooleanFalse when the bucket had already been accounted for, which is the common case: an hourly scheduler sees the same closed daily bucket around two dozen times. Nothing changed and nothing needs saving.
fireAlarmbooleanWhether the caller should fire the OnAnomalyAlarm event for this evaluation.
fireDetectedbooleanWhether the caller should fire the OnAnomalyDetected event for this evaluation.
fireRecoveredbooleanWhether the caller should fire the OnAnomalyRecovered event for this evaluation.
fromStateAlarmStateThe detector's alarm state immediately before this evaluation.
fromStateNameStringThe alarm state before this evaluation, as a string, for script and templates.
stateChangedbooleanWhether the detector's alarm state changed as a result of this evaluation.
toStateAlarmStateThe detector's alarm state immediately after this evaluation.
toStateNameStringThe alarm state after this evaluation, as a string, for script and templates.

Methods

getFromState() · getToState() · getFromStateName() · getToStateName() · isFireDetected() · isFireAlarm() · isFireRecovered() · isBucketWasNew() · hasEvents() · isStateChanged()

getFromState()

Returns: AlarmState

The detector's alarm state immediately before this evaluation.

getToState()

Returns: AlarmState

The detector's alarm state immediately after this evaluation.

getFromStateName()

Returns: String

The alarm state before this evaluation, as a string, for script and templates.

getToStateName()

Returns: String

The alarm state after this evaluation, as a string, for script and templates.

isFireDetected()

Returns: boolean

Whether the caller should fire the OnAnomalyDetected event for this evaluation.

isFireAlarm()

Returns: boolean

Whether the caller should fire the OnAnomalyAlarm event for this evaluation.

isFireRecovered()

Returns: boolean

Whether the caller should fire the OnAnomalyRecovered event for this evaluation.

isBucketWasNew()

Returns: boolean

False when the bucket had already been accounted for, which is the common case: an hourly scheduler sees the same closed daily bucket around two dozen times. Nothing changed and nothing needs saving.

hasEvents()

Returns: boolean

Whether this transition should result in any event being fired at all.

isStateChanged()

Returns: boolean

Whether the detector's alarm state changed as a result of this evaluation.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.