Sleep action problem

Post your questions and help other users.

Moderator: Martin

Post Reply
maxxyypoo
Posts: 23
Joined: 28 Jan 2015 08:47

Sleep action problem

Post by maxxyypoo » 02 May 2015 17:33

If you have some action and then split the tree into two streams. On one side u have a sleep for 5 seconds and then any action (on screen notification for example), when on other side you have something else (like execute other action and then one more action) so the second action on the second stream will NOT be executed UNTIL the 5 seconds from the first stream run out. Please help me out I've faces this problem many times.
Attachments
flow_Lockscreen_toggle_new_20150502_103105.xml
Here is an exact flow that u can see the problem in. The right hand side does not execute second action UNTIL 5 seconds run out.
(5.87 KiB) Downloaded 712 times

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Sleep action problem

Post by Martin » 04 May 2015 18:13

Hi,

This is expected behavior of a flow.
You can avoid this by splitting the flow into two flows which will be executed in parallel so one sleep action in one flow does not block other actions in the other flow.

Regards,
Martin

maxxyypoo
Posts: 23
Joined: 28 Jan 2015 08:47

Re: Sleep action problem

Post by maxxyypoo » 04 May 2015 18:26

Oh so sleep doesn't delay the next action in the sequence, it just puts the whole flow to sleep. OK makes sense, but would be nice if there was a delay as well. Because it makes it cleaner with longer flows instead of having 5 flows that are actually one flow. But up to you. Thank you for explanation! :)

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Sleep action problem

Post by Martin » 04 May 2015 18:37

This behavior is not limited to action Sleep but is enforced for all actions/conditions in a flow, however it might be less noticeable when the actions in a flow run very quickly.
I know that this behavior is not desired sometimes but it greatly simplifies debugging and makes it way easier for me to provide support so it's unlikely that I will change it.

maxxyypoo
Posts: 23
Joined: 28 Jan 2015 08:47

Re: Sleep action problem

Post by maxxyypoo » 04 May 2015 18:41

K no problem :)

Post Reply