Skip to main content

Event processing rules

Event processing rules define the events, attributes and screenshots that are captured for a Task Mining project. Rules may be based on your use case or legal or privacy requirements so, for example, screenshots might be activated for some applications but not for others where user information may be displayed. 

Each event processing rule includes an event, a condition (optional) and an action. If the event and condition meet the criteria specified by the rule, the action is performed. 

Where an event and condition match multiple event processing rules, only the action associated with the first event processing rule that matches will be performed. The order you define event processing rules in is therefore important. You should define more specific event processing rules before more general event processing rules.

For example, if you want screenshots to be taken for Microsoft Excel only, the event processing rule specifying this should be ordered before the event processing rule that specifies applications where screenshots will not be taken.A default rule is always included and is applied if none of the actions in the previous event processing rules is performed. The default rule includes an action only.

Important

You must have Chrome browser extensions installed to use event processing rules.

Before you begin, ensure you have completed the following steps or meet the requirements listed below:

You can create event processing rules in the Configuration Editor using the:

The logic explained in Defining event processing rules, Boolean expressions in event processing rules and Event processing rule examples applies.

Tip

We recommend using the Visual Editor as it’s easier to use and will cover most common use cases. You can, however, switch to the Text Editor at any point although we recommend the Text Editor for more expert users only.

  1. In the Task Mining Configuration Editor, select Event Processing Rules > Visual Editor.

  2. Select New Rule.

    TM_event_process_rules_visual_editor_home.png
  3. Enter a name for your rule in Rule name.

    TM_event_process_rules_visual_editor_home_with_excel.png
  4. Select the Edit button TM_event_process_rule_edit_icon.png to open the Description screen.

  5. Add information about the rule in the Description field.

    TM_event_process_rules_visual_editor_description.png
  6. In the sidebar, select Event, Condition, Hashing and Screenshots in turn and specify your rule, using the dropdown menus to help add specific options.

    Tip

    See Defining event processing rules for more information.

  7. Select OK.

  8. Repeat steps 2 to 7 for each event processing rule you want to add.

  9. Use the Up button TM_event_process_rule_down.png and Down button TM_event_process_rule_down_icon.png to specify the order of your event processing rules.

  10. Add a default rule.

    TM_event_process_rules_visual_editor_home_with_multiple_rules.png
  11. Save and upload your configuration file.

  1. In the Task Mining Configuration Editor, select Event Processing Rules > Text Editor.

    The Text Editor opens.

  2. Add event processing rules in the text field.

    See Defining event processing rules for more information.

  3. Save and upload your configuration file

Important

Event processing rules are case sensitive.

Name

Description

Syntax

Example

rules

Consists of:

  • An assigned numerical identifier (0 to n).

  • A description (optional).

  • An event definition.

  • A condition (optional). 

  • An action definition.

  • A default rule.

The action is performed when the event and condition meet the criteria defined in the event processing rule. Multiple event processing rules can be specified

.If no actions are performed because none of the events and conditions meet the event processing rule criteria, the default rule is applied.

A default rule starts with the keyword DEFAULT and consists of:

  • A description (optional).

  • An action definition or the keyword SKIP.

If an action is defined in the default rule, it will be performed.

If the SSKIP keyword is used, events that did not match any rule are not logged.

<rules>                  ::== ( <ECA rule> )* <default rule><ECA rule>                ::== <Description>? <Event> ( <Condition> )? <Action><default rule>    ::== DEFAULT <Description>? ( <Action> | SKIP )

The most simple event processing rule consists of the default rule only. This effectively switches off logging for all events:

DEFAULT SKIP

Description

Consists of:

  • The keyword RULE.

  • The name of the rule (string).

  • The keyword DESCRIPTION.

  • A detailed description of the rule (string).

FROM 1.2.7

<Description>    ::== RULE <string expression> DESCRIPTION <string expression>

RULE 'Log Chrome events' DESCRIPTION 'Logging events for Google chrome with screenshots of the active window.'

Event

Defines which events will trigger the rule. The rule can be triggered for:

  • All events; or

  • Specific events defined in a list of event names.

The keyword EXCEPT (optional) inverts the list of triggering events. This means the rule matches all events except the events listed.

<Event>                  ::== ON ( ALL EVENTS ) | ( ( EXCEPT )? <string list> )

Trigger the event processing rule for all events:

ON ALL EVENTS

Trigger the event processing rule for click events only:

ON 'Left click', 'Right click'

Trigger the event processing rule for all events except click events:

ON EXCEPT 'Left click', 'Right click'

Condition

Defines a constraint that must be fulfilled for an event to meet the event processing rule criteria. Conditions are defined using Boolean expressions.

<Condition>              ::== IF <boolean expression THEN

Trigger the event processing rule only if the event came from the Google Chrome browser:

IF ProcessName = 'chrome' THEN

Action

Defines how an event that matches the rule should be processed. Consists of a definition for:

  • Logging.

  • Hashing (optional).

  • Screenshots (optional).

<Action>         ::== <Logging> ( <Hashing> )? ( <Screenshots> )?

Logging

Defines the event attributes that are logged. All attributes or specific attributes defined in a list of attribute names can be logged. 

The keyword EXCEPT (optional) allows specific attributes to be excluded.

Note

If an attribute isn’t included, the default value (usually null) is used. Mandatory attributes cannot be excluded and will be automatically included even if not specified in the attribute list.

For information about mandatory attributes, see the Task Mining attribute reference.

<Logging>                ::== LOG ( ALL | ( ( EXCEPT )? <attribute list> ) )

Log all attributes:

LOG ALL

Log the URL and KeyboardCommand attributes. Mandatory attributes are also logged:

LOG URL, KeyboardCommand

Hashing (optional)

Defines the attributes that are hashed before logging. Can be excluded if hashing of attributes is not required. The hash function used is SHA256.

Note

Attributes that are excluded from logging are also implicitly excluded from hashing. Adding attributes to the attribute list that are not hashable will cause errors. Mandatory attributes are not hashed.

For information about hashable attributes, see the Task Mining attribute reference.

<Hashing>                ::== HASH <attribute list>

Log the URL and SystemUser attributes as hashed values. Mandatory attributes are also logged but are not hashed:

HASH URL, SystemUser

Screenshots (optional)

Defines the screenshot capturing mode, with these options:

  • Do not take screenshots (default).

  • Take screenshots of active window.

  • Take screenshots of active desktop.

  • Take screenshots of all desktops.

Can be omitted if screenshots are not required.

<Screenshots>    ::== TAKE SCREENSHOT ( ACTIVE_WINDOW | ACTIVE_DESKTOP | ALL_DESKTOPS )

Take a screenshot of the active window:

TAKE SCREENSHOT ACTIVE_WINDOW

Take a screenshot of the active desktop:

TAKE SCREENSHOT ACTIVE_DESKTOP

Take a screenshot of all desktops:

TAKE SCREENSHOT ALL_DESKTOPS

Boolean operator

Description

Syntax

Example

Comparison

Compares two expressions and evaluates to a Boolean depending on the comparison operator. Both input expressions must be of the same data type and can be attributes or constant values.

Available comparison operators are:

  • Equals (=).

  • Doesn’t equal (!=).

  • Less than (<).

  • Less than or equal to (<=).

  • Greater than (>).

  • Greater than or equal to (>=).

<Comparison>                     ::== <left expression> <Comparison operator> <right expression><Comparison operator>     ::== '=' | '!=' | '<' | '<=' | '>' | '>='

Compare the URL attribute to a string constant for equality:

URL = 'https://www.celonis.com/'

Check if the ScreenshotWidth attribute is greater than 0:

ScreenshotWidth > 0

IN

Checks if an expression evaluates to one of the given values.

Note

All values in the value list must be of the same data type. Supports STRING, INT and FLOAT data types.

<In>                                     ::== <expression> IN ( <value list> )

Check if the ProcessName attribute evaluates to one of the given process names (applications):

ProcessName IN ( 'chrome', 'OUTLOOK', 'explorer')

NOT

Inverts a Boolean expression.

<Not>                                    ::== NOT <boolean expression>

Check whether the URL is not https://www.celonis.com/:

NOT URL = 'https://www.celonis.com/'

IS NULL

Checks if an expression evaluates to null. 

The NOT keyword could be used instead.

<Is null>                                ::== <expression> IS ( NOT )? NULL

Check if the ActiveWindow attribute is not set:

ActiveWindow IS NULL

Check if the ActiveWindow attribute is set to a value:

AActiveWindow IS NOT NULL

AND

Computes the logical AND of two or more Boolean expressions.

<And>                            ::== <boolean expression> ( AND <boolean expression> )+

Check if both comparisons evaluate to true:

ProcessName = 'chrome' AND URL = 'https://www.celonis.com/'

OR

Computes the logical OR of two or more Boolean expressions.

<Or>                             ::== <boolean expression> ( OR <boolean expression> )+

Check if at least one of the comparisons evaluates to true:

ProcessName = 'chrome' OR URL = 'https://www.celonis.com/'

()

Allows the logical structuring of Boolean expressions.

<Parenthesis>            ::== '(' <boolean expression> ')'

Logically structure the statement to evaluate the OR statement before the AND statement:

( ProcessName = 'chrome' OR URL = 'https://www.celonis.com/' ) AND ScreenshotWidth > 0

Evaluate the AND statement before the OR statement:

ProcessName = 'chrome' OR URL = 'https://www.celonis.com/' AND ScreenshotWidth > 0

CAST

Converts the given expression into another data type.

Supports STRING, INT and FLOAT data types.

<Cast>           ::== CAST '(' <Type> ',' <expression> ')'<Type>            ::== STRING | INT | FLOAT

Convert the value of the ScreenshotWidth attribute to type STRING:

CAST ( STRING, ScreenshotWidth )

LIKE

Evaluates if a string expression matches the given pattern. Two different wildcard symbols can be used to define the patterns:

  • A percentage sign (%) matches an arbitrary number of characters (including 0 characters).

  • An underscore ( _ ) matches one character exactly. 

The wildcard symbols can be escaped by a preceding backslash ( \ ), e.g. \% or \_ . The backslash itself is escaped by a double backslash ( \\ ).

The comparison is case-insensitive so the patterns %celonis% and %Celonis% will produce the same result.

<Like>           ::== <string expression> LIKE <string pattern>

Match if the ActiveWindow attribute contains the string Unread Messages:

ActiveWindow LIKE '%Unread Messages%'

Match if the ActiveWindow attribute starts with Celonis:

ActiveWindow LIKE 'Celonis%'

Match if the ActiveWindow attribute ends with Celonis:

ActiveWindow LIKE '%Celonis'

DOMAIN

Maps a URL string to its domain, removing the paths, ports and protocol of the URL.

<Domain> ::== DOMAIN '(' <string expression> ')'

Trims the URL to its domain community.celonis.com:

DOMAIN ( 'https://community.celonis.com/latest' )

Important

Event processing rules are case sensitive.

Example

Example syntax

Example description

Denylist Slack and do not capture any data.

ON ALL EVENTS

IF ProcessName NOT IN ('slack') THEN LOG ALL

TAKE SCREENSHOT ACTIVE_WINDOW

DEFAULT SKIP

Note

The process name for Slack is lower case. If written with a starting capital letter, events from Slack will be captured.

Collect all events without any restrictions and take a screenshot of the active window.

ON ALL EVENTS

LOG ALL

TAKE SCREENSHOT ACTIVE_WINDOW

DEFAULT SKIP

or

DEFAULT LOG ALL

--

Avoid duplicate events from Google Chrome.

ON ALL EVENTS

IF ProcessName = 'chrome' AND ExtensionName = 'chrome' OR ProcessName != 'chrome' THEN

LOG ALL

TAKE SCREENSHOT ACTIVE_WINDOW

DEFAULT SKIP

Logs all events with all attributes and takes screenshots of the active window, but filters out events from Google Chrome that were not captured by the Chrome browser extension. This avoids duplicate events (like left clicks) that are detected by both the Task Mining Client software and the Chrome browser extension.

Tip

You can use the same syntax for the Task Mining browser extension for Microsoft Edge by replacing chrome with the process name for Microsoft Edge. You can find the process name by selecting the browser process in Windows Task Manager and selecting properties. The process name is case sensitive.

Log events from specified applications only.

ON ALL EVENTS

IF ProcessName IN ('chrome', 'explorer', 'Slack') THEN

LOG ALL

TAKE SCREENSHOT ACTIVE_WINDOW

DEFAULT SKIP

Logs events from Google Chrome, Microsoft Windows Explorer and Slack only.

The application name must exactly match the process name displayed in Windows Task Manager without the .exe extension. The application name is case sensitive.

Don’t log events from specified applications.

ON ALL EVENTS

IF ProcessName NOT IN ('chrome', 'explorer', 'Slack') THEN

LOG ALL

TAKE SCREENSHOT ACTIVE_WINDOW

DEFAULT SKIP

Events from Google Chrome, Microsoft Windows Explorer and Slack are not logged.

The application name must exactly match the process name displayed in Windows Task Manager without the .exe extension. The application name is case sensitive.

Log events for specified URLs only.

ON ALL EVENTS

IF DOMAIN (URL) LIKE '%.celonis.com' OR ProcessName != 'chrome' THEN

LOG ALL

TAKE SCREENSHOT ACTIVE_WINDOW

DEFAULT SKIP

Logs events from www.celonis.com and related subdomains (like community.celonis.com) only and takes a screenshot of the active window.

Collect all events and take screenshots.

ON ALL EVENTS

LOG ALL

TAKE SCREENSHOT ACTIVE_WINDOWd

DEFAULT SKIP

or

DEFAULT LOG ALL

TAKE SCREENSHOT ACTIVE_WINDOW

Collects all events without any restrictions and takes a screenshot of the active window.

Related topics