Upstash Workflow supports executing multiple steps in parallel.
Since each step returns a Promise, you can execute multiple steps concurrently by using Promise.all().
This behavior works out of the box. No additional configuration is required.
app/api/workflow/route.ts
import { serve } from "@upstash/workflow/nextjs";
import { checkInventory, brewCoffee, printReceipt } from "@/utils";
export const { POST } = serve(async (context) => {
  // 👇 Execute steps in parallel
  const [coffeeBeansAvailable, cupsAvailable, milkAvailable] =
    await Promise.all([
      context.run("check-coffee-beans", () => checkInventory("coffee-beans")),
      context.run("check-cups", () => checkInventory("cups")),
      context.run("check-milk", () => checkInventory("milk")),
    ]);
});
The workflow executes three steps in parallel
context.call() and a context.run() in parallel.
Whether executing sequentially or in parallel, you should always
await all promises in a workflow.
Leaving promises unawaited may cause unexpected behavior.