From 57532c3e2f1d57364b89510dd307c4b64cd8c4e5 Mon Sep 17 00:00:00 2001 From: Benjamin Weder Date: Sat, 25 Nov 2023 13:57:30 +0100 Subject: [PATCH] Use CSAR name for on-demand deployment --- .../extensions/opentosca/replacement/OnDemandTransformator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/bpmn-q/modeler-component/extensions/opentosca/replacement/OnDemandTransformator.js b/components/bpmn-q/modeler-component/extensions/opentosca/replacement/OnDemandTransformator.js index 0a75f165..277977b5 100644 --- a/components/bpmn-q/modeler-component/extensions/opentosca/replacement/OnDemandTransformator.js +++ b/components/bpmn-q/modeler-component/extensions/opentosca/replacement/OnDemandTransformator.js @@ -70,14 +70,14 @@ function createDeploymentScript( ) { return ` var inputParams = ${JSON.stringify(inputParams)}; -var csarName = "ondemand_" + (Math.random().toString().substring(3)); +var urlParts = execution.getVariable("completeModelUrl_" + "${taskId}").split("/"); var reconstructedVMs= ${JSON.stringify(reconstructedVMs)}; ${fetchMethod} var createCsarResponse = fetch('POST', "${opentoscaEndpoint}", JSON.stringify({ enrich: 'false', - name: csarName, + name: urlParts[urlParts.length - 1] + ".csar", url: execution.getVariable("completeModelUrl_" + "${taskId}") + "?csar" }))