Skip to main content

analyseSituation

A Workflow Engine function that runs Situation Analysis on the in-scope Situation. It returns true unless there is a failure (such as a missing configuration or a failed update). This function takes two optional parameters: the Situation Analysis method name, and the custom_info location to put the resulting tags in.

If no method is explicitly defined, then all the methods marked as "default method" are run. If no tag field is supplied, then the global tag field from the configuration is used.

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

This function is available for Situation workflows only.

Back to Workflow Engine Functions Reference.

Arguments

Workflow Engine function analyseSituation takes the following arguments:

Name

Required

Type

Description

method

no

string

The analysis method name to use, defined in the Situation Analysis Workflow configuration tile.

tagField

no

string

The custom_info field to put resulting tags in. Overrides the configured location.

Example

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

  • Supply no parameters in order to run all the default methods and use the configured tag's field.

  • To run a specified method (for example, a method exclusive to a specific Situation type), supply a method and optionally a tagField to add the resulting tags.

    • The tagField is used for all methods in this run.

  • method : “Urgent”

  • tagField : custom_info.myTags

The UI translates your settings to the following JSON:

{"method":"Urgent","tagField":"custom_info.mytags"}