Process Alerts API

Process alerts in Appian notify you when any severe problem in a process happens. By default, these alerts are sent by email to the mailboxes of one or more Appian user accounts. While this works pretty well, there are situations where this is just not enough.

Let’s see what other options we have.

Ticket System Email Inbox

Just send process alerts to the email inbox of your ticketing system. Then you can filter and parse the email and initiate an incident ticket.

Appian Internal

Appian can start a process on incoming email. Let’s create an alert receiving process model that accepts email, and a user account that uses an email address following this pattern:

processmodeluuid<PROCESS_MODEL_UUID>@<YOUR_COMPANY>.appiancloud.com

Then, in process models configure the alert settings to send alerts to that user.

And … Bingo! Appian now sends alerts to itself!

Appian does not include any structured data in that email, so we need to apply some magic to extract some facts.

a!localVariables(
  /* Extract the process id from the email body */
  local!processId: tointeger(index(extract(ri!body, "design/monitoring/", """>View the Process"), 1, null)),

  /* Query additional data using a process report */
  local!processData: a!queryProcessAnalytics(
    report: cons!ABC_PROCESS_ALERTS_REPORT,
    query: a!query(
      pagingInfo: a!pagingInfo(1,1),
      filter: a!queryFilter(
        field: "c42", /* Use the field that holds the process id */
        operator: "=",
        value: local!processId
      )
    )
  ),

  /* Create a basic map and add additional data dynamically */
  a!update(
    data: a!map(
      processId: local!processId,
      errorMessage: striphtml(ri!body)
    ),
    index: a!forEach(
      items: local!processData.columnConfigs.label,
      expression: substitute(fv!item, " ", "")
    ),
    value: a!forEach(
      items: local!processData.columnConfigs.field,
      expression: index(index(local!processData.data, fv!item, null), 1, null)
    )
  )
)

My example creates the following output:

Use this as a template and add any data you need, using process reports, plugins or log files. Then store that data in a database or send it via an integration to another system for managing the incident. And maybe you would rather not process every alert and apply some filtering.

Summary

Process alerts are limited in their configuration options. That might change with the new execution engines in 2024, but potentially the ideas described above, help you solve an issue that itches you now.

Do you have another clever way to manage process alerts? Let me know in the comments.

Cheers.

One thought on “Process Alerts API

Leave a Reply