From 7b1debfe12fc096f7b4e20f13bdeb925c96085c1 Mon Sep 17 00:00:00 2001 From: Adrien de Peretti Date: Fri, 18 Jul 2025 11:25:02 +0200 Subject: [PATCH] fix(wfe): add missing state in inmemory notify on run finished (#12987) --- .changeset/healthy-insects-dress.md | 5 +++++ .../src/services/workflow-orchestrator.ts | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changeset/healthy-insects-dress.md diff --git a/.changeset/healthy-insects-dress.md b/.changeset/healthy-insects-dress.md new file mode 100644 index 0000000000..33643b747a --- /dev/null +++ b/.changeset/healthy-insects-dress.md @@ -0,0 +1,5 @@ +--- +"@medusajs/workflow-engine-inmemory": patch +--- + +fix(wfe): add missing state in inmemory notify on run finished diff --git a/packages/modules/workflow-engine-inmemory/src/services/workflow-orchestrator.ts b/packages/modules/workflow-engine-inmemory/src/services/workflow-orchestrator.ts index 2e01eb9f3f..bbf3ca1565 100644 --- a/packages/modules/workflow-engine-inmemory/src/services/workflow-orchestrator.ts +++ b/packages/modules/workflow-engine-inmemory/src/services/workflow-orchestrator.ts @@ -213,6 +213,7 @@ export class WorkflowOrchestratorService { eventType: "onFinish", workflowId, transactionId: context.transactionId, + state: ret.transaction.getFlow().state as TransactionState, result, errors, })