After the recent Workflow addition of Magic Variables I looked through my workflows for places I could clean up. And by that I mean either visually or less number of actions (or ideally both).
One workflow I had was 75 actions. It would compare your current weight to yesterday, last week, last month and last year, telling you for each of you were up or down and by how much. It would also tell you what your current BMI is. It took me quite awhile to work it out but I did get it working.
I wasn't sure what the best way was to try and update it with Magic Variables. I had almost decided it wasn't worth the time it would take when Workflow came out with an update that gave me new ideas on how I approach workflows.
I took one workflow with 75 actions and actually turned it into 3 with a combined 53 actions. The biggest hang up was on the part that compared the weight and did the math for me as well as determined if your weight went up or down. I had to repeat the same statements for every weight creating lots of room for error while I worked to re-create it.
So I decided to try and see if I could get the new Run Workflow action to work in my favor. I made a workflow that did all the math for me and from my main one I would simply call the second one for each of the dates I wanted. At the end of it I made a third workflow for BMI and call to that as well. The BMI flow is really the only one that could be used individually. I submitted it to the workflow gallery as well (I was surprised I couldn't find one there already.)
I know it sounds overly complicated to split one working workflow into three, and maybe it is. But it served as a proof of concept and a fun puzzle.
If you're interested you can get the workflows here:
If you'd like to compare these to the old workflow I had you can get it here:
Feel free to tell me what you think. Even if you think I'm crazy for doing it this way. The best way to reach me is on Twitter.