Skip to main content

classifyEvent

A Workflow Engine function that sets the class, type, and severity fields of an event based upon its contents using a predefined classification algorithm. Overwrites existing values. See Event and Alert Field Best Practice for information on object fields.

This function is available as a feature of the Workflow Engine v1.0 and later.

This function is available for event workflows only.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function classifyEvent takes the following arguments:

Name

Required

Type

Description

eventFields

Yes

Object

An array of fields to use in the classification. An empty list, [], uses the description field.

typeField

Yes

String

Field to populate with the calculated 'type'.

classField

Yes

String

Field to populate with the calculated 'class'.

severityField

Yes

String

Field to populate with the calculated 'severity'.

Example

The following example demonstrates typical use of Workflow Engine function classifyEvent. If you want the Workflow Engine to automatically populate the type, class, and severity fields of the event based upon the description, set the following:

  • eventFields: []

  • typeField: type

  • classField: class

  • severityField: severity

The UI translates your settings to the following JSON:

{"eventFields":[],"typeField":"type","classField":"class","severityField":"severity"}

Given an object with the following description:

"description":"App server APPSERVER2002 down."

The Workflow Engine updates the object fields as follows:

"severity": 5,
"type": "availability",
"class": "server"