diff --git a/GUI/src/services/service-builder.ts b/GUI/src/services/service-builder.ts index 38ce2786..355c5b54 100644 --- a/GUI/src/services/service-builder.ts +++ b/GUI/src/services/service-builder.ts @@ -426,7 +426,7 @@ export function getYamlContent( } if (parentNode.data.stepType === StepType.MultiChoiceQuestion) { - return handleMultiChoiceQuestion(finishedFlow, parentStepName, parentNode, childNode); + return handleMultiChoiceQuestion(finishedFlow, parentStepName, parentNode, childNode, name); } if (parentNode.data.stepType === StepType.DynamicChoices) { @@ -711,7 +711,12 @@ function handleMultiChoiceQuestion( parentStepName: string, parentNode: Node, childNode: Node | undefined, + serviceName: string, ) { + parentNode.data.multiChoiceQuestion?.buttons.forEach( + (b) => (b.payload = b.payload.replaceAll('/_mcq_', `/${serviceName}_mcq_`)), + ); + return finishedFlow.set(parentStepName, { assign: { buttons: parentNode?.data?.multiChoiceQuestion?.buttons ?? [],