Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(orchestration,workflows): pipe oncomplete and workflow preparation #4697

Merged
merged 16 commits into from
Aug 8, 2023

Conversation

carlos-r-l-rodrigues
Copy link
Contributor

@carlos-r-l-rodrigues carlos-r-l-rodrigues commented Aug 4, 2023

What:
Add pipe onComplete callback and preparation function to exportWorkflow
It also exposes the current DistributedTransaction instance to the transaction handler

@carlos-r-l-rodrigues carlos-r-l-rodrigues requested a review from a team as a code owner August 4, 2023 20:45
@changeset-bot
Copy link

changeset-bot bot commented Aug 4, 2023

🦋 Changeset detected

Latest commit: 1651959

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@medusajs/orchestration Minor
@medusajs/workflows Minor
@medusajs/medusa Patch
@medusajs/modules-sdk Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Aug 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
medusa-docs ⬜️ Ignored (Inspect) Visit Preview Aug 8, 2023 11:06am

Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT!

@@ -26,7 +26,8 @@ export type WorkflowResult<TResult = unknown> = {

export const exportWorkflow = <TData = unknown, TResult = unknown>(
workflowId: Workflows,
defaultResult?: string
defaultResult?: string,
dataPreparation?: (data: TData) => Promise<unknown>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment: Nice, I like it!

@olivermrbl
Copy link
Contributor

@adrien2p, OK to merge?

Copy link
Member

@adrien2p adrien2p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@olivermrbl olivermrbl merged commit c0ca002 into develop Aug 8, 2023
@olivermrbl olivermrbl deleted the feat/pipi-oncomplete-wirkflow-preparation branch August 8, 2023 11:06
@github-actions github-actions bot mentioned this pull request Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants