Welcome Guest! Log in
×

Notice

The forum is in read only mode.
Stambia versions 2.x, 3.x, S17, S18, S19 and S20 are reaching End of Support January, 15th, 2024. Please consider upgrading to the supported Semarchy xDI versions. See Global Policy Support and the Semarchy Documentation.

The Stambia User Community is moving to Semarchy! All the applicable resources have already been moved or are currently being moved to their new location. Read more…

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
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
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
Hi Thomas,

This is exactly what I was looking for!

Thanks a lot :-)

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