Page 1 of 1

Stop the input dialog action if timeout occurred.

Posted: 24 Dec 2018 10:23
by wfrcrd
It's possibile?
If yes, how?

I've made another flow wich stop the main one some seconds before the input dialog timeout occurr,
but it's an ugly workaround.

Thank you !

Re: Stop the input dialog action if timeout occurred.

Posted: 24 Dec 2018 13:43
by Martin
Could you please clarify what you want to achieve?

Action Input Dialog has an option to specify a timeout. The variable operation will be set to value timeout when the dialog is closed by a timeout. You can use a condition Expression to check this and stop the flow (for example using script: operation=="timeout").

Regards,
Martin

Re: Stop the input dialog action if timeout occurred.

Posted: 24 Dec 2018 14:19
by wfrcrd
Sorry for my bad english:
if timeout occurred value is filled with "default" and the flow continues.
I'd like to stop the flow if a timeout occurred, and if it's possible , even if the "cancel" button (on the dialog window) is pressed.
( I'm re-reading the help page...)

So as you said I need a condition expression to check if "operation" is ="timeout" or "cancel" and in one of this case stop the flow.

Thank you for your patience!

Re: Stop the input dialog action if timeout occurred.

Posted: 24 Dec 2018 17:08
by Desmanto
As Martin pointed out, the key is in the {operation}. This variable can have 3 possible value
1. "ok", You put in proper input (before timeout) and press OK
2. "cancel", You press cancel button (before timeout) or press back button.
3. "timeout", you didn't put anything or press OK or cancel until timeout

If you like to continue the flow, ONLY if you put proper input (before timeout), use expression

Code: Select all

operation == "ok"
I use this kind of expression so far, for 25+ times, not including the variant of it. I usually put it after the input dialog, to protect the rest of the flow from executing, if timeout or I cancel it.

Re: Stop the input dialog action if timeout occurred.

Posted: 25 Dec 2018 00:05
by anuraag
@Martin can you add option to change Variable name in input dialog. Sometimes i use more than 1 input dialog and need to change default Variable by using script/expression.

Re: Stop the input dialog action if timeout occurred.

Posted: 29 Dec 2018 14:20
by Martin
@anuraag This is on my list of features under consideration. For the time being you have to add an action Script after the input dialog action and assign the variables to another variable before you show the next dialog.

Re: Stop the input dialog action if timeout occurred.

Posted: 30 Dec 2018 11:47
by Desmanto
+1 for this. Although we can simply assign it first to other value, sometimes, giving it direct variable name is simpler.

Meanwhile, most of my flow which need multiple input dialog dialog consecutively, usually protected by the operation == "ok", but added up another value assignment. So if I have 3 input dialog, I usually have 3 expression also after each input dialog, with at least 2 of them (sometimes just all of them) have the value assignment.

Code: Select all

choice_level1 = value;
operation == "ok";
2nd expression

Code: Select all

choice_level2 = value;
operation == "ok";
3rd expression

Code: Select all

choice_level3 = value;
operation == "ok";
later you can usee choice_level1, 2, 3 in the next step.

Re: Stop the input dialog action if timeout occurred.

Posted: 30 Dec 2018 11:59
by anuraag
I am doing same now. Changing variable name inside expression.

It will be also nice to have an option inside input dialog to abort/stop flow on cancel/timeout. This will help us to no more use additional expression.