The index.ts code example in "Create Workflow" section of the Marketplace Vendor Tutorial contains TypeScript errors that prevent successful compilation:
Missing transform import: The tutorial uses the transform function on line 33, but it's not imported from "@medusajs/framework/workflows-sdk"
TypeScript union type complexity error: When working with the useQueryGraphStep function, TypeScript throws "Expression produces a union type that is too complex to represent" error
Incorrect export name: On line 67, the export is export default createVendorAdminWorkflow but the workflow is defined as createVendorWorkflow (line 24)
These errors make it impossible for developers to follow the tutorial successfully without debugging TypeScript errors.
Closes#12301
The instructed filename now is the same as in the code-block below (`algolia-sync.ts`) and the instructions don't have naming conflicts (see next step which is instructing to create a file named `product-sync.ts`).
https://docs.medusajs.com/learn/configurations/ts-aliases
`npm run resolve:aliases` should run after `medusa build` to change out the aliases in the build output.
So instead of the current guide
`"build": "npm run resolve:aliases && medusa build"`
I should be
`"build": "medusa build && npm run resolve:aliases"`
* docs: fix index.html.md causing 404
* update next.js
* test
* test
* test
* test
* fix revalidate
* test
* test
* test
* test
* test
* test
* test
* test
* clean up
* docs: fix step name in long-running workflow documentation
Fixed inconsistency in the step name - updated 'set-step-failure-step' to 'setStepFailureStep' to match the exported function name.
Fixes#12143
* docs: fix step name in long-running workflow documentation
Changed the step ID from "setStepFailureStep" to "set-step-failure-step" as requested to follow kebab-case naming convention for step IDs.
Fixes#12143
* Update page.mdx
I think this is done. Sorry for inconvenience caused by me.
* Update page.mdx
Sorry for the inconvenience.
* Update page.mdx
Sorry for the inconvenience.
* Update page.mdx
---------
Co-authored-by: Your Name <your-email@example.com>
What:
- Added step config `skipOnPermanentFailure`. Skip all the next steps when the current step fails. If a string is used, the workflow will resume from the given step.
- Fix `continueOnPermanentFailure` to continue the execution of the flow when a step fails.
```ts
createWorkflow("some-workflow", () => {
errorStep().config({
skipOnPermanentFailure: true,
})
nextStep1() // skipped
nextStep2() // skipped
})
createWorkflow("some-workflow", () => {
errorStep().config({
skipOnPermanentFailure: "resume-from-here",
});
nextStep1(); // skipped
nextStep2(); // skipped
nextStep3().config({ name: "resume-from-here" }); // executed
nextStep4(); // executed
});
```