Skip to main content

matchPattern

A Workflow Engine function that uses the Pattern Matcher configuration to compare the target event, alert or Situation field value with predefined patterns. If a match is found, the configured destination field will be updated with the corresponding value from the Pattern Matcher configuration.

The action can override the Pattern Matcher configuration, allowing source and/or destination fields to be taken from the action rather than the pattern group configuration.

This function is available as a feature of the Add-ons v2.6 download and later.

This function is available for event, alert, and Situation workflows.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function matchPattern takes the following arguments:

Name

Required

Type

Description

patternGroups

no

object (list [ ])

The PatternMatcher group name that will be used. If no groups are specified, all groups marked as “Include by default” in the Pattern Matcher configuration will be used.

source

no

string

Overrides the source CEvent field defined in the Pattern Matcher group configuration.

destination

no

string

Overrides the destination CEvent field defined in the Pattern Matcher group configuration.

Example

The following example demonstrates typical use of Workflow Engine function matchPattern.

To run the matchPattern action using the default groups and the configured source and destination, leave all parameters blank.

To use a group called “test” and ignore all other groups (and exclude all default groups) - add a list containing “test” to the patternGroups parameter:

patternGroups : [ 'test” ]

If a patternGroup defined in the Pattern Matcher used a source field of “description” and a destination field “custom_info.assignmentGroup”, then these could be overridden to examine “custom_info.originalDescription” and “custom_info.assignTo” by supplying the “source” and “destination” fields in the action (these could also be workflowContext fields).

matchPattern_1.png
matchPattern_2.png