From 4af9896f7e0f54ba9c7c95ee2366a7fb14ef8c42 Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Thu, 1 Mar 2018 18:37:56 +0100 Subject: Fix issue with bmpnText The bpmnText is not provided by the UI anymore so it has been replaced by db template values. Issue-ID: CLAMP-115 Change-Id: Ifb3abb081560191e50b3267a0ceea0775d93b1ee Signed-off-by: Determe, Sebastien (sd378r) --- .../org/onap/clamp/clds/service/CldsService.java | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/main/java/org/onap/clamp/clds/service/CldsService.java b/src/main/java/org/onap/clamp/clds/service/CldsService.java index 02b4d5f45..a9b1b771a 100644 --- a/src/main/java/org/onap/clamp/clds/service/CldsService.java +++ b/src/main/java/org/onap/clamp/clds/service/CldsService.java @@ -34,9 +34,7 @@ import java.io.InputStream; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.Date; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Properties; import java.util.UUID; import java.util.concurrent.TimeUnit; @@ -348,6 +346,9 @@ public class CldsService extends SecureServiceBase { if (template != null) { cldsModel.setTemplateId(template.getId()); cldsModel.setDocText(template.getPropText()); + // This is to provide the Bpmn XML when Template part in UI is + // disabled + cldsModel.setBpmnText(template.getBpmnText()); } } cldsModel.save(cldsDao, getUserId()); @@ -428,6 +429,9 @@ public class CldsService extends SecureServiceBase { if (template != null) { model.setTemplateId(template.getId()); model.setDocText(template.getPropText()); + // This is to provide the Bpmn XML when Template part in UI is + // disabled + model.setBpmnText(template.getBpmnText()); } } // save model to db @@ -462,21 +466,8 @@ public class CldsService extends SecureServiceBase { logger.info("PUT isInsertTestEvent={}", isInsertTestEvent); // determine if requested action is permitted model.validateAction(actionCd); - // input variables for Camel process - Map variables = new HashMap<>(); - variables.put("actionCd", actionCd); - variables.put("modelProp", prop.getBytes()); - variables.put("modelBpmnProp", bpmnJson); - variables.put("modelName", modelName); - variables.put("controlName", controlName); - variables.put("docText", docText.getBytes()); - variables.put("isTest", isTest); - variables.put("userid", userId); - variables.put("isInsertTestEvent", isInsertTestEvent); logger.info("modelProp - " + prop); logger.info("docText - " + docText); - // ModelProperties modelProperties = new ModelProperties(modelName, - // controlName, actionCd, isTest, modelBpmnProp, modelProp); try { String result = camelProxy.submit(actionCd, prop, bpmnJson, modelName, controlName, docText, isTest, userId, isInsertTestEvent); -- cgit 1.2.3-korg