Timer tick event not triggering
I am trying to put a timer in my automation that should check that if a certain process is taking more than 5 minutes. If the process is taking more than 5 minutes BOT should kill the application.
To solve this problem I created a timer object in Global Container. Set the interval to 300000.
Created a new event automation that that upon tick event it will launch an automation that would kill the application that was running and taking to long to finish it's process.
Within main process automation (in question taking long time) I placed a stop, resetstate, and start methods of timer object.
Once the timer starts if it reaches said 5 min (300000) it should go to the tick event and kill the application.
I also attempted to put the timer within a windows form and did the same as above yet it still would not kill the application.
I also attempted to use system.timer instead of the component with no success.
The problem that I am encountering is that the timer.tick event is not getting generated.
Observation: This timer ticks event gets generated when i put a debugger point and do debugging.
Any help would be appreciated,
Thank You,
Randy
RandyM83,
A few things I've noticed with the timer component (Pega SP1 8.0.2003.0):
1. If I call Stop/Start/ResetState or change the enabled property to False, The timer will never fire another tick event even if I call Start or change the enabled property back to True.
2. The enabled property is disabled by default. Change that to true before debugging.
Suggestion, create another global variable for handling the Timer enabled/disabled usage and place it directly after the tick event. Your timer event will always fire, but the variable flag will determine if it should continue the thread or not.
Hope that helps.