This documentation supports the releases of BMC Helix Operations Management up to December 31, 2021.To view the documentation for the latest version, select 23.1 from the Product version picker.

Example: Retrieve and modify notes in incoming events


Fetch a note from a list of notes, enrich the event message with the note content, and update the note only if the event status changes by using an advanced enrichment policy.

Actions involved: Trigger-If, Variable, Enrich, Function

Event selection criteria: Define a condition to select events from the EVENT class, and message that contains, "testApp". 

The following image illustrates how the event selection criteria will look.

Get set note event selection criteria.png

Important

You can hover over an action to view the complete label for the action as shown in the following screenshot:

Action_hover.png

Build the policy workflow:

  1. Add the Trigger-If action by defining a condition, under the Trigger-If Settings, that checks whether the event status changes.
    Get set note trigger if.png

  2. To retrieve a note from an incoming event, add the Variable action to store the result of the GetNote function as the variable value. This function returns the timestamp, author, and content of the note.
    Get set note variable 1.png
  3. Now, from the note that you retrieved in the previous step, say, you want to fetch only the note content, add the Variable action to store the result of the ListGetElement function as the variable value.
    Get set note variable 2.png

  4. Add an Enrich action to enrich the event message and append the note content you retrieved in the previous step to the message.
    Get set note enrich.png

  5. To modify a note by using the policy, add a Function action.
    Function_settings_set_note.png

Retrieve and modify notes in incoming events workflow: The following image illustrates how the policy workflow will look.

Retrieve and modify a note in incoming events policy workflow.png


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*