Commit 23019b5
fix: honor UseReturnVariable when emitting call-action assignments
formatAction emitted `$Var = call microflow/nanoflow/java/javascript/external`
whenever the action's ResultVariableName/OutputVariableName was
non-empty, ignoring UseReturnVariable. Studio Pro stores the
variable name as a UI fallback even when UseReturnVariable=false
(the action discards its return), so re-exec of described MDL
introduced phantom output variable declarations.
Symptom: microflows with two call actions pointing at the same
sub-microflow/Java action, both with UseReturnVariable=false but
both carrying the same ResultVariableName, round-tripped as two
declarations of the same output variable, triggering CE0111
"Duplicate variable name" in Studio Pro.
Fix: emit the `$Var = ` prefix only when UseReturnVariable is true.
Applies to MicroflowCallAction, NanoflowCallAction, JavaActionCallAction,
JavaScriptActionCallAction, and CallExternalAction.
Existing tests that relied on the old behavior now set UseReturnVariable
explicitly — they were exercising the wrong BSON shape.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1145f6b commit 23019b5
3 files changed
Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
280 | 283 | | |
281 | 284 | | |
282 | 285 | | |
| 286 | + | |
283 | 287 | | |
284 | 288 | | |
285 | 289 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
487 | | - | |
| 487 | + | |
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
560 | | - | |
| 560 | + | |
561 | 561 | | |
562 | 562 | | |
563 | 563 | | |
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
585 | | - | |
| 585 | + | |
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
725 | | - | |
| 725 | + | |
726 | 726 | | |
727 | 727 | | |
728 | 728 | | |
| |||
819 | 819 | | |
820 | 820 | | |
821 | 821 | | |
822 | | - | |
| 822 | + | |
823 | 823 | | |
824 | 824 | | |
825 | 825 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
344 | 345 | | |
345 | 346 | | |
346 | 347 | | |
| |||
373 | 374 | | |
374 | 375 | | |
375 | 376 | | |
| 377 | + | |
376 | 378 | | |
377 | 379 | | |
378 | 380 | | |
| |||
395 | 397 | | |
396 | 398 | | |
397 | 399 | | |
| 400 | + | |
398 | 401 | | |
399 | 402 | | |
400 | 403 | | |
| |||
949 | 952 | | |
950 | 953 | | |
951 | 954 | | |
| 955 | + | |
952 | 956 | | |
953 | 957 | | |
954 | 958 | | |
| |||
970 | 974 | | |
971 | 975 | | |
972 | 976 | | |
| 977 | + | |
973 | 978 | | |
974 | 979 | | |
975 | 980 | | |
| |||
1108 | 1113 | | |
1109 | 1114 | | |
1110 | 1115 | | |
| 1116 | + | |
1111 | 1117 | | |
1112 | 1118 | | |
1113 | 1119 | | |
| |||
0 commit comments