Workflow getting stuck at "Wait for condition"

prasad48
Tera Guru

I am using below code in my workflow step.If i try the code in background scripts it is working fine.But my workflow condition is not moving to next step.Please suggest

var todayDate= new GlideDateTime();

todayDate=todayDate.getDate();

var getFebDate= new GlideDateTime();

getFebDate.setValue("2017-03-01");

getFebDate=getFebDate.getDate();

if(todayDate >= getFebDate)

answer=true;

else

answer=false;

1 ACCEPTED SOLUTION

santoshsahoonis
Kilo Guru

The wait for Condition only gets executed when the record is updated. So, your workflow will not work.


You can instead use a Timer activity and make it wait for 0 sec, if current date is after 1st feb or the difference in seconds.


View solution in original post

3 REPLIES 3

santoshsahoonis
Kilo Guru

The wait for Condition only gets executed when the record is updated. So, your workflow will not work.


You can instead use a Timer activity and make it wait for 0 sec, if current date is after 1st feb or the difference in seconds.


Do we have any alternate solution to skip the step. Because it is already in production.


Easiest way would be to initiate an update event   for the records that are stuck.



Just try and add a work note/comment to the records. Then the activity will execute the activity.