How to be notified when processes fail
Let's create the following process:
1. Configure the timer (1) and delay 6h (2)
2. Get the nb of red processes on your account.
Download from the library the connector Get anything (xml output) no header (provider RunMyProcess - Secured Connection)
In the Input variables of this activity, in the rmp_url variable, put the value
live/${P\_customer}/analysis/process/COUNT?field=NUMBER&group=MONTH&value=LIVE%20ANY%20301&filter=MODE%20PARENT%20STATUS&operator=EE%20IS%20EE
Note : this will retrieve a feed with the nb of live red processes by month
In the Output variables of this activity, create a variable my_html
with value :
<#function get_array my_father my_son>
<#if my_father?is_hash>
<#if my_father[my_son]?exists>
<#if my_father[my_son]?is_sequence>
<#assign my_array = my_father[my_son]>
<#else>
<#assign my_array = [my_father[my_son]?eval]>
</#if>
<#else>
<#assign my_array = []>
</#if>
<#else>
<#assign my_array = []>
</#if>
<#return my_array>
</#function>
<#assign my_html = "">
<#assign my_entries = get_array(P_result.feed.entry.content.data,"result")>
<#list my_entries as x>
<#assign my_html>
${my_html} ${x.serie.@value} : ${x.@value?number?string("0")} error(s) <br> </#assign>
</#list>
${my_html}
3. Configure the gateway
yes : condition is my_html != ""
no : condition is default
4. Send a notification to the administrator of the account with mail content :
Hello,
Several processes went red on the account ${P_customer} :
${my_html}
Regards,
RMP bot
Create a live version of your process : it's done.
You should get emails like this:
Please give details of the problem