sagar....@flowian.com
unread,Dec 24, 2014, 1:22:01 AM12/24/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to suppor...@runmyprocess.com
Hi Team,
I have one javascript an need to execute at the process level.
For that i have taken activity and keep the type to "script". I have used the uploaded js file to execute the script.
But it gives me error though the script is running very fine outside that activity.
My script is as follows ...
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
function lastdaytime(endtime,mintime,maxtime)
{
var ldt=0;
if(endtime < mintime)
{
setVariable("first",1);
return 0;}
if((endtime.getDay()==0)||(endtime.getDay()==6))
{
setVariable("second",2);
return 0;
}
if(endtime > maxtime)
{
setVariable("third",3);
endtime = maxtime;
}
ldt=( endtime - mintime ) / (60000);
return ldt;
}
var a= new Date(2014,11,23,10,00,00);
var b= new Date(2014,11,23,19,00,00);
var d= new Date(2014,11,23,12,00,00);
var k=lastdaytime(d,a,b);
setVariable("V",k);
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
I don't understand why it is giving me error. I think problem is in the "if" condition.
The error message is "nullpointerexception"
Can anyone help me to sort out this problem.
Regards,
Sagar