docs: improvements + additions to workflow docs (#9182)

Improve existing workflow docs + add missing docs
This commit is contained in:
Shahed Nasser
2024-09-20 15:38:32 +00:00
committed by GitHub
parent a4b5d66b3e
commit 6584e911e0
18 changed files with 678 additions and 406 deletions
@@ -10,7 +10,7 @@ In this chapter, youll learn how to run workflow steps in parallel.
If your workflow has steps that dont rely on one anothers results, run them in parallel using the `parallelize` utility function imported from the `@medusajs/workflows-sdk`.
The workflow waits until all steps passed to the `parallelize` function finish executing before continuing with the rest of its implementation.
The workflow waits until all steps passed to the `parallelize` function finish executing before continuing to the next step.
For example:
@@ -56,4 +56,6 @@ const myWorkflow = createWorkflow(
The `parallelize` function accepts the steps to run in parallel as a parameter.
It returns an array of the steps' results. The results are ordered based on the `parallelize` parameters' order.
It returns an array of the steps' results in the same order they're passed to the `parallelize` function.
So, `prices` is the result of `createPricesStep`, and `productSalesChannel` is the result of `attachProductToSalesChannelStep`.