Page 1 of 1
Entering/Exiting problem in Location based flow
Posted: 20 Jun 2014 18:00
by skiptannen
I'm struggling with getting a simple location based flow working. I have two flows based on the trigger Periodic Location Update - the first one (Arrive Location) simply creates a notification when arriving at a predetermined location, and the other one (Leave Location) creates a notification when leaving a predetermined location. The Arrive Location flow works fine, but I have never gotten the Leave Location flow to work. The flows and parameters are identical, except the Arrive Location flow has "Entering" checked in the condition Location and "Exiting" is checked in the Leave Location flow.
I've done some reading in the forums, gone over the explanations for the various triggers and conditions, and played around with different settings, but I can't figure out what's going on here. I've attached the two flows and I would sure appreciate some help on this - I'm still a bit of a newbie, but there's either a concept I'm missing or something else is going on.
Thank you.
Re: Entering/Exiting problem in Location based flow
Posted: 21 Jun 2014 07:29
by Martin
Hi,
The condition Location needs to be executed at least once with a location inside the area of interest so that it can determine if the location was exited later. I assume the the flow was never executed with a location inside the garden center or variable global_myTaskList did not contain a task at this point in time. You could try to switch the order of the two conditions so that the location condition is executed first and has a chance to properly initialise regardless of the task list.
You could also use a trigger Location with both Entering/Exiting checked and then use a condition Location Entering to distinguish between the two cases which would allow to keep everything in one flow. The modern version (experimental) is usually quite battery saving.
Regards,
Martin
Re: Entering/Exiting problem in Location based flow
Posted: 23 Jun 2014 14:31
by skiptannen
Thanks for the suggestions, Martin. After messing around with a number of different settings, I finally got it working. I found that the trigger Periodic Location Update set to High Accuracy (Experimental) would capture the coordinates, then I could test and branch off with the condition Location set up with Ignore Previous State and Inside unchecked. I think using the High Accuracy (Experimental) provider in the trigger was the secret sauce.
Thanks again.
Re: Entering/Exiting problem in Location based flow
Posted: 27 Jun 2014 05:51
by cimbrum
Martin wrote:Hi,
The condition Location needs to be executed at least once with a location inside the area of interest so that it can determine if the location was exited later. I assume the the flow was never executed with a location inside the garden center or variable global_myTaskList did not contain a task at this point in time. You could try to switch the order of the two conditions so that the location condition is executed first and has a chance to properly initialise regardless of the task list.
You could also use a trigger Location with both Entering/Exiting checked and then use a condition Location Entering to distinguish between the two cases which would allow to keep everything in one flow. The modern version (experimental) is usually quite battery saving.
Regards,
Martin
Thanks, I encountered this issue, too! But you should help us with little pop-up messages (or something like else) if some additional operations are required on different triggers, etc. I never thought I have to execute the Location trigger at least once (!) onto a desired location.