fix(workflow-engine-*): subscribe response and error (#6869)

This commit is contained in:
Carlos R. L. Rodrigues
2024-03-29 08:23:41 +00:00
committed by GitHub
parent d97af91a8d
commit e603726985
6 changed files with 67 additions and 43 deletions
@@ -32,8 +32,6 @@ async function resolveProperty(property, transactionContext) {
* @internal
*/
export async function resolveValue(input, transactionContext) {
const copiedInput = deepCopy(input)
const unwrapInput = async (
inputTOUnwrap: Record<string, unknown>,
parentRef: any
@@ -66,6 +64,11 @@ export async function resolveValue(input, transactionContext) {
return parentRef
}
const copiedInput =
input?.__type === OrchestrationUtils.SymbolWorkflowWorkflowData
? deepCopy(input.output)
: deepCopy(input)
const result = copiedInput?.__type
? await resolveProperty(copiedInput, transactionContext)
: await unwrapInput(copiedInput, {})