Time a process flow and act when time is exceeded

queue
studio
transaction
timespan

#1

Is it possible to build in some kind of timer that starts when a transaction item is picked up and that acts when a certain amount of time has passed? Then timer then resets when the next item is picked up.

Thx for your insights.


#2

Yes.
You just need to have a timespan variable and a variable to store the current time to when you pick up the item. Then, you can basically do
(Now - startTime) >= timespan
as a condition, then perform your actions and reset startTime to Now before getting next item again.

timespan could be set to something like 00:05:00, for 5 minutes
startTime would be a DateTime type

I hope I have clear.

Thanks.


#3

The idea would be to send an email to the developer when the time has exceeded, because these tasks are sequential would it the be possible to stop the email from being sent if the time hasn’t exceeded its value?


#4

Yeah, like I said you can use a condition like this:

if (Now - startTime) <= timespan

or

if (Now - startTime) <= 01:00:00

Send the email in the True side, and in the False side do something else.

Initialize startTime = Now as a dateTime variable type, and assign that right after you get each item to store the initial time.

Regards.