In the Weweb academy, @Joyce talks about building an API management center and the use of global workflows.
One part I don’t understand is, when do I use a local workflow, and when do I use a global workflow?
Right now I have:
-
Workflows with no other similar workflows (but with API call inside)
-
Workflows with no other similar workflows (without API call)
-
Similar Workflows that are used multiple places but are not exactly the same (with API calls inside the workflow)
-
Similar workflows that are used at multiple places and are exactly the same (without API calls inside the workflow)
-
Similar workflows that call the same end point but have slightly different actions (example a default on page load workflow)
—
Q1: Do I build everything as a global workflow, with no local workflows, even for type 2s?
which type of workflow as seen above should be added as a global workflow and which is okay as a local one? Example maybe type 2 probably is okay with a local workflow or is it best practice to have all workflows as global workflows so we know where everything is?
Q2: When we talk about an API management center, is it a folder of workflows with only the API calls without any other actions? And then other local / global workflows will refer to that?
OR are we talking about just making sure all workflows with API calls are in a global workflow it’s sufficient?
Q3: EXAMPLE of a confusing scenario let’s say if we have type 5s (similar worjflows with API calls within), we may be calling the same API point multiple times across different workflows. Example I may have a ‘Create Post’ workflow that calls a ‘POST’ end point and this workflow also consists of other actions. But then elsewhere in the app I may need to create a post with slightly different actions but to the same end point. How do I handle this? Do I create 3 global workflows (one for the API call, one for each of the times I have to create a workflow, or something else?)
I hope this makes sense because now I have lots of global workflows and also lots of local workflows and everything just seems kinda messy