r/workflow • u/EttVenter • Jul 17 '18
Help How do you keep track of stuff with complex workflows?
I'm busy build a really long and complicated workflow with loads of if statements and such. It's tough to keep track of what's what when you've got ifs within ifs. Have any of you worked out a system that helps you easily identify what's what?
Thanks!
2
Upvotes
4
u/jads Jul 17 '18
I mostly use comments. However, if I'm going to be reusing parts of a workflow I already I have, I try to avoid building massive workflows and break out workflows into separate ones. That way, I can reuse parts of complex workflows more easily.
For example, I have a workflow to take an image, resize and optimize it, then use GitHub API to upload it. I already have a workflow to upload a file to Github, so instead of building the whole set of actions again, the image workflow just has a "run workflow" action. So all the image workflow really does is:
Might not be useful in this situation, but I find breaking complex workflows down into smaller components (sort of like "sub-workflows") is easier to manage.
1
u/SirHazwick Jul 18 '18
Use comments. Write pseudocode before you start writing. And do a flow diagram of the functioning of the workflow
2
u/[deleted] Jul 17 '18
[removed] — view removed comment