Problem with formula on Timer

432 views
Skip to first unread message

nilto...@safetec.com.br

unread,
Jul 9, 2014, 10:33:51 AM7/9/14
to suppor...@runmyprocess.com, Adriano Silva
Hi,

I'm trying to set a timer to trigger a task after an specific period of time but the trigger returns an "Formula {timerPosterior} does not evaluate to a proper delay (number of minutes expected)".

To set the period i use a freemarker code inside a variable, like the one below:

<#assign agora = get_time("09/07/2014 08:00:00", "dd/MM/yyyy HH:mm:ss")?long>
<#assign depois = get_time("25/07/2014 08:00:00", "dd/MM/yyyy HH:mm:ss")?long>
<#assign formula = (depois - agora)>
<#assign tmp = formula / 60>
${tmp}

What might be the problem? I already tried a dozen of workarounds but nothing seems to work.

Regards.
Screen Shot 2014-07-09 at 11.33.34.png

Hamza Maghous

unread,
Jul 9, 2014, 12:23:09 PM7/9/14
to suppor...@runmyprocess.com, Adriano Silva
Hi,

In order to use your variables as numbers, you need to use the suffix ?number
so it will be  yourvariable?number instead of yourvariable



--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/33661511-a5e2-43b4-a893-de3099bdc820%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.



--

Hamza MAGHOUS

PreSales Consultant

nilto...@safetec.com.br

unread,
Jul 9, 2014, 12:52:38 PM7/9/14
to suppor...@runmyprocess.com, adrian...@safetec.com.br
Hi,

Actually i tried it a couple times but it doesn't seem to work.
I've attached part of the screen showing the error.

Regards.
Screen Shot 2014-07-09 at 13.51.20.png
Screen Shot 2014-07-09 at 13.54.50.png

Richard Manga

unread,
Jul 9, 2014, 1:14:09 PM7/9/14
to suppor...@runmyprocess.com, adrian...@safetec.com.br
Hi,

In your freemarker, please put the following code:

   <#assign agora = get_time("09/07/2014 08:00:00", "dd/MM/yyyy HH:mm:ss")?long>
<#assign depois = get_time("25/07/2014 08:00:00", "dd/MM/yyyy HH:mm:ss")?long>
<#assign formula = (depois - agora)>
<#assign tmp = formula / 60>
${tmp?number}


In the formula of Timer, please put the following:

${formulaPosterior}

Note: formulaPosterior must be the variable computed with the previous freemarker code.

Regards,

Richard.


Nilton at Safetec

unread,
Jul 9, 2014, 1:46:16 PM7/9/14
to suppor...@runmyprocess.com, Adriano Silva
Hi Richard,

It isn't working. Unfortunately i've no idea what's going on.

Imagem inline 1


You received this message because you are subscribed to a topic in the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/yVi8KYBS4no/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum...@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.



--

________________________________________________________________

Nilton Heck
 
-  Analista de Negócios | +55 (81) 3126.4111 | +55 (81) 9661.0834

Safetec Informática - Cloud for Business 

Av. Marquês de Olinda, 296, Andar 01, Recife, 50.030-000,  Recife – PE

Bidisha Das

unread,
Jul 9, 2014, 11:20:37 PM7/9/14
to suppor...@runmyprocess.com, adrian...@safetec.com.br, nilto...@safetec.com.br
Hi Nilton,
Make sure that the variable you are using in "Formula" inside timer,like in your case as per the screenshot it is "formulaPosterior",use the same variable for storing the below code:
"<#assign agora = get_time("09/07/2014 08:00:00", "dd/MM/yyyy HH:mm:ss")?long> 
<#assign depois = get_time("25/07/2014 08:00:00", "dd/MM/yyyy HH:mm:ss")?long> 
<#assign formula = (depois - agora)> 
<#assign tmp = formula / 60> 
${tmp} "

  •  Don't use the same variable"formulaPosterior" to store any other value
  •  "formulaPosterior?number" doesnot accept decimal value.

I have attached screenshots below.Hope it helps.

Thanks & Regards
Bidisha Das
Screenshot_Timer.png
Screenshot2.png

Nilton at Safetec

unread,
Jul 10, 2014, 7:31:06 AM7/10/14
to Bidisha Das, suppor...@runmyprocess.com, Adriano Silva
Hi Bidisha,

I changed the name of the variable and now - for some strange reason - it's working perfectly.

Thank you all of you guys.

Regards.
Reply all
Reply to author
Forward
0 new messages