Skip to content

Commit 1ed9c7c

Browse files
author
almaasrawi
authored
fex(designer): tokens with 'body/value' should use triggerBody rather than triggerOutput (Azure#3782)
1 parent f6a9569 commit 1ed9c7c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

libs/designer/src/lib/core/utils/parameters/helper.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,11 @@ export function generateExpressionFromKey(
10001000
const result = [];
10011001
// NOTE: Use @body for tokens that come from the body path like outputs.$.Body.weather
10021002
let rootMethod = method;
1003-
if (overrideMethod && !isInsideArray && segments[0]?.value?.toString()?.toLowerCase() === OutputSource.Body) {
1003+
if (
1004+
overrideMethod &&
1005+
!isInsideArray &&
1006+
[OutputSource.Body, OutputSource.BodyValue].includes(segments[0]?.value?.toString()?.toLowerCase() ?? '')
1007+
) {
10041008
segments.shift();
10051009
rootMethod = actionName ? `${OutputSource.Body}(${convertToStringLiteral(actionName)})` : constants.TRIGGER_BODY_OUTPUT;
10061010
}

libs/parsers/src/lib/common/constants.ts

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ export const OutputSource = {
137137
Queries: 'queries',
138138
Headers: 'headers',
139139
Body: 'body',
140+
BodyValue: 'body/value',
140141
Outputs: 'outputs',
141142
};
142143

0 commit comments

Comments
 (0)