feat(orchestration,workflows-sdk,core-flows): workflow cancel (#6778)
This commit is contained in:
committed by
GitHub
parent
3e85f4dd93
commit
7e93eda1a4
@@ -2,7 +2,7 @@ import {
|
||||
TransactionStepsDefinition,
|
||||
WorkflowManager,
|
||||
} from "@medusajs/orchestration"
|
||||
import { OrchestrationUtils, isString } from "@medusajs/utils"
|
||||
import { OrchestrationUtils, deepCopy, isString } from "@medusajs/utils"
|
||||
import { ulid } from "ulid"
|
||||
import { StepResponse, resolveValue } from "./helpers"
|
||||
import { proxify } from "./helpers/proxy"
|
||||
@@ -168,8 +168,8 @@ function applyStep<
|
||||
stepOutput?.__type ===
|
||||
OrchestrationUtils.SymbolWorkflowStepResponse
|
||||
? stepOutput.compensateInput &&
|
||||
JSON.parse(JSON.stringify(stepOutput.compensateInput))
|
||||
: stepOutput && JSON.parse(JSON.stringify(stepOutput))
|
||||
deepCopy(stepOutput.compensateInput)
|
||||
: stepOutput && deepCopy(stepOutput)
|
||||
|
||||
const args = [invokeResult, executionContext]
|
||||
const output = await compensateFn.apply(this, args)
|
||||
|
||||
Reference in New Issue
Block a user