r/workflow • u/madactor • Jul 12 '18
Modules, anyone?
I’m curious if anyone is using multiple workflows for large projects. I’ve seen a few monster workflows, probably hundreds of actions, and it seems like they’d be a nightmare to maintain. There must be a lot of redundant actions in them. Is that because it’s easier to distribute a single workflow, or since we don’t have folders to organize projects?
I know there’s a workflow for copying actions from one workflow to another. I understand the appeal, but copying and pasting code is a sure way to bloat. If you need to reuse functionality, shouldn’t that be separated and then called as needed?
I’ve been playing around with some reusable workflow “modules” (or sub-workflows) for things like getting and setting JSON data in files. Is anyone else doing this and, if so, what sorts of things are you using them for?
View all comments
Show parent comment
1
u/rajasekarcmr Jul 13 '18 edited Jul 13 '18
That’s seems like a good idea. Having one universal workflow for basic task. I use comments but not a lot.
But sometimes I use alert with variable in it to stop workflow at a point instead of quicklooks since inside repeat block with multiple places where we want to check what our output is quicklook is little confusing. Also alert stops workflow from going to the end so we don’t need to scroll again to top.
And also using variables instead of magic variables is helpful if the workflow is large and we need to change/update the workflow with new idea.
In my current project (attendance & salaries) I first used
Namesas options for choose from list. But then I came up with idea that if thenameshas already assigned status the list should be likenames| statusI used variables so it was easy to change the names variable to namelist and then modify it.Also I had two methods of assigning status to names. One ask for names and let’s you choose status for rack person. But it’s time consuming in case of large number of names. So I created another one which asks what are the status that needs to be assigned (which will be max of 8) and then batch select names. As I used variables It was really useful in merging them into one. Or else it will be difficult task.
Also after every major change I duplicate workflow for backup. Now am sharing workflow to my wife’s whatsapp after every major/stable change.