×

Please give details of the problem

Docs

Find

How to be notified when processes fail

Let's create the following process:

2012-04-14_170941

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

2012-04-14_171301

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)

2012-04-14_171613

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

2012-04-14_172416

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 :

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<#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}

2012-04-14_171742

3. Configure the gateway

2012-04-14_171814

yes : condition is my_html != ""
no : condition is default

4. Send a notification to the administrator of the account with mail content :

1
2
3
4
5
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