Platform
Learn
Community
Support
Partner Center
Sign up
or
Log in
logout
Account Settings
Profile
messages
Messages
logout
Logout
Platform
Home
Downloads
IPP
Licensing
Project Sizing
Learn
Training
Documentation
Evaluation Guide
What's New
Community
Home
Forums
Forge
Ideas
Members
Support
Partner Guide
Resources Library
Opportunities
Account Management
Sign up
or
Log in
Home
Forums
Forge
Ideas
Members
Dear ,
What would improve your OutSystems Community experience? Let us know by taking this 2-minute survey.
Pick up the survey
Community
›
Forums
›
Community Quick Guides
Timer Poll 1 Second Intervals
timer
Wake
Interval
Seconds
Community
›
Forums
›
Community Quick Guides
Timer Poll 1 Second Intervals
timer
Wake
Interval
Seconds
New Post
New Post
Ferdinand Malan
Posted on 2014-02-19
Ferdinand Malan
Rank: #2331
Posted on 2014-02-19
Hi Guys,
I Have a situation in which I need to poll a web service every time that the current action is completed.
Here is a screenshot of the timer in Service Centre:
However, it does not seem to be running unless I have the application open and I click on a button to poll.
How can I have this timer excecute the action on the server every time that it finishes??
Kind Regards
FC Malan
André Vieira
Posted on 2014-02-19
André Vieira
Rank: #1
Posted on 2014-02-19
Solution
You can use the WakeTimer inside the Timer Action. But I would revise this logic. This means you'll have a process consuming CPU resources all the time...
Solution
Ferdinand Malan
Posted on 2014-02-19
Ferdinand Malan
Rank: #2331
Posted on 2014-02-19
Solution
André Vieira
wrote:
You can use the WakeTimer inside the Timer Action. But I would revise this logic. This means you'll have a process consuming CPU resources all the time...
Hi Andre,
I am currently using the Wake Timer inside the Timer Action (See last action in above image). It does not seem to work that well though?
Also, yes I agree that it is consuming CPU resources all the time. But this is for our Phone System so we need to have a record of Call Activity at all times. Do you have any suggestions on what would work better?
Thanks
FC Malan
Solution
André Vieira
Posted on 2014-02-19
André Vieira
Rank: #1
Posted on 2014-02-19
Solution
I'm assuming you can have your Phone System reaching your application in any other way, is that it?
I've implemented some integrations in the past with telephony systems and when a call was pickup by the operator that system would be able to open a page from an outsystems application passing the necessary data...
Solution
Ferdinand Malan
Posted on 2014-02-20
Ferdinand Malan
Rank: #2331
Posted on 2014-02-20
Solution
Yes, we are using the 3CX phone system and for us to be aware of what's happening on the server we had to create an extension that communicates with a WCF service exposed by a windows service and then returns data to us by polling with the timer.
Do you know of a way that I can check to see if the timer is running or if it has stopped?
Thanks for the suggestion I will look into it as well.
Solution
Miguel João
Posted on 2014-02-20
Miguel João
Rank: #73
Posted on 2014-02-20
Solution
Hello Ferdinand
Regarding your pooling approach and requirements, Waking up the timer will not get you the 1 second pooling intervals you seek, because the OutSystems Scheduler pooling is 20 seconds interval. This means that your timer will only run once every 20 seconds at most.
As for the pooling approach in general, depending on the load and number of requests, it may cause exaustion of resources (threads, or even ephemeral TCP/IP ports).
If you have no alternative using callback events or requests (like André Vieira referred), then you need to adopt a different approach to the pooling:
1. If the pooling total time lapse is within minutes, you can call the WCF service, and keep pooling for the result in loop with 1 second sleeps, all within the timer.
2. Instead of timers, use BPT Process, and use the Wait with a timeout of CurrDateTime()+1 second, and on the On Close action of the Wait, you pool the phone system. BPT has much shorter pooling intervals in the Scheduler (1.5 seconds). As long as there are threads in the BPT Engine to process the activity, it will execute with a 1.5 seconds interval.
Keep in mind that pooling wiht such short time intervals is not recommended, as it exausts resources, and simle isn't a scalable solution.
Hope this information is helpful.
Cheers
Solution
Ricardo Silva
Posted on 2014-02-20
Ricardo Silva
Rank: #2
Posted on 2014-02-20
Solution
Offering some constructive criticism, one thing you could do to avoid polling is having a callback mechanism.
Instead of having the Platform constantly polling for new messages, you can add a web service on the platform which the other system calls whenever a new message / call arrives.
Hope this helps.
Solution
Ferdinand Malan
Posted on 2014-02-24
Ferdinand Malan
Rank: #2331
Posted on 2014-02-24
Solution
Miguel João
wrote:
Hello Ferdinand
Regarding your pooling approach and requirements, Waking up the timer will not get you the 1 second pooling intervals you seek, because the OutSystems Scheduler pooling is 20 seconds interval. This means that your timer will only run once every 20 seconds at most.
As for the pooling approach in general, depending on the load and number of requests, it may cause exaustion of resources (threads, or even ephemeral TCP/IP ports).
If you have no alternative using callback events or requests (like André Vieira referred), then you need to adopt a different approach to the pooling:
1. If the pooling total time lapse is within minutes, you can call the WCF service, and keep pooling for the result in loop with 1 second sleeps, all within the timer.
2. Instead of timers, use BPT Process, and use the Wait with a timeout of CurrDateTime()+1 second, and on the On Close action of the Wait, you pool the phone system. BPT has much shorter pooling intervals in the Scheduler (1.5 seconds). As long as there are threads in the BPT Engine to process the activity, it will execute with a 1.5 seconds interval.
Keep in mind that pooling wiht such short time intervals is not recommended, as it exausts resources, and simle isn't a scalable solution.
Hope this information is helpful.
Cheers
Hi Miguel,
Thanks for the sollutions.
I am sorry but I am still very new to the Outsystems Platform.
How would I go about implimenting sollution one? Do you maybe have an example of this functionality?
As for sollution two, we have someone here that deals with the BPT Process but I have no idea of how it works in practice.
Thanks for all the help.
Kind regards
FC Malan
Solution
Ferdinand Malan
Posted on 2014-02-24
Ferdinand Malan
Rank: #2331
Posted on 2014-02-24
Solution
Ricardo Silva
wrote:
Offering some constructive criticism, one thing you could do to avoid polling is having a callback mechanism.
Instead of having the Platform constantly polling for new messages, you can add a web service on the platform which the other system calls whenever a new message / call arrives.
Hope this helps.
Hi Ricardo,
Thanks a lot for the suggestion.
As stated in reply to Miguel's post. I am still very new to this platform.
How would I go about implimenting a callback mechanism?
Thanks in advance.
FC Malan
Solution
Ferdinand Malan
Posted on 2014-02-25
Ferdinand Malan
Rank: #2331
Posted on 2014-02-25
Solution
Hi Guys,
Thanks for all the input and help.
I have figgured out what you meant and it is working well now.
Thanks again for all the help and suggestions.
Solution
Miguel João
Posted on 2014-02-26
Miguel João
Rank: #73
Posted on 2014-02-26
Solution
Hello
Sorry for not checking in sooner ... I can see that you've figured out and overcome the problem.
Good to know.
Cheers
Solution
Quick Reply
attachment
Choose File
No file chosen
Submit
Login to reply
New Post
Available Forums
Technology & Integration
News and Announcements
Forge Discussions
Meta
Community Quick Guides
Usability
Installation Troubleshooting
Personal Environment Troubleshooting
Forum Notifications
Email Digest Settings
Loading...