Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Due to some maintenance operations, stambia.org will be switched to read-only mode during the 13th November. It will be possible to read and download, but impossible to post on the forums or create new accounts. For any question please contact the support team.

Topic-icon Question How to detect if the process duration is too long, without interrupting it

More
14 Nov 2018 17:29 #1 by leo75
leo75 created the topic: How to detect if the process duration is too long, without interrupting it
Hi,

I have a huge process which could be very long to execute.
To prevent some delays, I'd like to send an email alert when it takes more than 2 hours, without interrupting it .
I was tinking about something like this : www.stambia.org/did-you-know/409-creating-a-loop-in-a-process , in parallel of my actual process and using the CORE_DURATION variable.
I actually can't acces the CORE_DURATION variable when the process is running.. do u have any idea?

Thanks,

Leo
More
15 Nov 2018 11:03 - 15 Nov 2018 11:05 #2 by Thomas BLETON
Thomas BLETON replied the topic: How to detect if the process duration is too long, without interrupting it
Hi,

Here is a sample tool which can be used to define timeouts.
=> "timeoutHandler.proc" is the tool
=> "timeoutHandlerUsage.proc" is a demo
This attachment is hidden for guests.
Please log in or register to see it.


This tool can be used in your process to set timeouts and raise errors or execute subsequent actions.
Its parameters are : the timeout duration, the poll interval, the name of the process Action which should be ended before the timeout is triggered.

In the demo process, I used 3 timeouts :
(1) an overall timeout of 10 seconds
(2) a timeout of 3 seconds between actions "CheckPoint1" and "CheckPoint2"
(3) a timeout of 5 seconds between actions "CheckPoint1" and "CheckPoint3"



In this screenshot, the first timeout was triggered (and subsequent action "Timeout!!" executed) because the "END" action was not reached before the timeout occurs. Note that the process was not interrupted, thanks to the "red link" which handled the timeout error gracefully.
Timeouts 2 and 3 were not triggered because the elapsed time between the specified checkpoints were < timeout. These timeouts have no "red link" so they would raise an error when they are triggered.

I hope this helps :)
Attachments:
Last Edit: 15 Nov 2018 11:05 by Thomas BLETON.
More
16 Nov 2018 10:29 - 16 Nov 2018 10:29 #3 by leo75
leo75 replied the topic: How to detect if the process duration is too long, without interrupting it
Hi Thomas,

This is exactly what I was looking for!

Thanks a lot :-)

Leo
Last Edit: 16 Nov 2018 10:29 by leo75.