New feature 'Exception' is great!

General discussions about Automagic and automation in general

Moderator: Martin

Post Reply
LightTempler
Posts: 53
Joined: 17 Mar 2013 16:08

New feature 'Exception' is great!

Post by LightTempler » 09 Apr 2013 21:14

Great solution for the exception theme, works very well!
(Checked with 'Download from Dropbox')
A little bit tricky to find, but I got it :-)

Thanks a lot for the many new features.
LiTe

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: New feature 'Exception' is great!

Post by MURTUMA » 16 Apr 2013 18:33

Finally I found that myself. For others, look in the same place, where you can delete links between objects in editor.

Still, could someone explain this feature and its possible functions for me?

LightTempler
Posts: 53
Joined: 17 Mar 2013 16:08

Re: New feature 'Exception' is great!

Post by LightTempler » 17 Apr 2013 14:15

You can branch the flow into an 'error condition' tree part.
Like "on error goto THERE and do THIS". Your own error handling
instead of the message in Android 's notification bar.

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

Re: New feature 'Exception' is great!

Post by Martin » 17 Apr 2013 14:30

You can test this feature using a flow that produces some errors:

-trigger is not required
-condition 'Expression' without a script (the condition will fail when executed)
-->true: action 'Vibrate'

-manually execute the flow (menu->Execute). You should get an error in the notification area and the flow stops at the condition.
-select the connection between condition and action, press the edit-button and change the type to 'Exception'
-note that the appearance of the connection changed to a red dashed line
-manually execute the flow again. Action 'Vibrate' should be executed since you defined that this action should handle an exception case.

This exception feature can be handy when you have actions that can fail under some conditions (no network available, network seems to be available but data can not be transferred etc.) to define your own retry-strategy or to show a custom error message.

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: New feature 'Exception' is great!

Post by MURTUMA » 18 Apr 2013 10:34

Thanks! You helped to understand it a lot.

ZSasha
Posts: 103
Joined: 11 Oct 2013 03:48

Re: New feature 'Exception' is great!

Post by ZSasha » 15 Oct 2013 03:50

Hello,

I'm using "Exception" to keep my flow going even if it can't determine its location by using gps or wifi.
In that case user may (and should) receive something anyway so "Exception" works fine.

However because it is not possible to put two links from object "A" to object "B" I have to create two similar objects "B" just to be able to handle both normal flow and "Exception" flow.
(please see attached flow if my explanations are unclear - it is just a draft but you'll see the idea).


Is there any better way of doing this? Something like "ignore errors and keep going" option for a section?

Thank you.
exported_data_20131015_164459.xml
(6.92 KiB) Downloaded 335 times

User avatar
MURTUMA
Posts: 697
Joined: 05 Mar 2013 22:43

Re: New feature 'Exception' is great!

Post by MURTUMA » 15 Oct 2013 06:15

You can create multiple links, but they have to be different type.

Create the first link and change it to "exception". Then press first element. Now you see various buttons around out. Drag the plus button to the second element. This creates the second link you need.

Pro tip:If you tap the link, you'll see dots around the elements it's linked to. Pressing those dots will change the position where the link connects to elements. Changing these will help you to make much more clear and readable flows.

http://automagic4android.com/flow.php?i ... 5db178a57b

ZSasha
Posts: 103
Joined: 11 Oct 2013 03:48

Re: New feature 'Exception' is great!

Post by ZSasha » 15 Oct 2013 20:20

Hi MURTUMA,

I realised that it might be a "glitch" of the GUI - I actually can put both "normal" and "exception" link from element A to element B, but the "exceptional" link should be created first - after that you are able to put "normal" one.

However if you create a "normal" one (which is by default and anticipated) FIRST - then you are not able to put "exception" to the same element.

P.S.: Thank you for the tip, it is definitely helpful!!

Post Reply