×

Please give details of the problem

Skip to content

How to be notified when processes fail

Let's create the following process:

notified

1. Configure the timer (1) and delay 6h (2)

notified

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)

notified

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

notified

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}  

notified

3. Configure the gateway

notified

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  

2012-04-14_171929

Create a live version of your process : it's done.

You should get emails like this:

2012-04-14_173844