- ModelProperties modelProp = new ModelProperties(cldsModel.getName(), "test", "PUT", false,
- cldsBpmnTransformer.doXslTransformToString(cldsTemplate.getBpmnText()), "{}");
- String policyName = searchForPolicyName(blueprintArtifact);
- String inputParams = "";
- if (policyName.contains("*")) {
- // It's a filter must add a specific prefix
- cldsModel.setControlNamePrefix(policyName);
- } else {
- cldsModel.setControlNamePrefix(CONTROL_NAME_PREFIX);
- inputParams = "{\"name\":\"deployParameters\",\"value\":{\n" + "\"policy_id\": \""
- + modelProp.getPolicyNameForDcaeDeploy(refProp) + "\"" + "}}";
- }
- cldsModel.setPropText("{\"global\":[{\"name\":\"service\",\"value\":[\""
- + blueprintArtifact.getBlueprintInvariantServiceUuid() + "\"]},{\"name\":\"vf\",\"value\":[\""
- + blueprintArtifact.getResourceAttached().getResourceInvariantUUID()
- + "\"]},{\"name\":\"actionSet\",\"value\":[\"vnfRecipe\"]},{\"name\":\"location\",\"value\":[\"DC1\"]},"
- + inputParams + "]}");
+ cldsModel.setControlNamePrefix(CONTROL_NAME_PREFIX);
+ // We must save it otherwise object won't be created in db
+ // and proptext will always be null
+ cldsModel.setPropText("{\"global\":[]}");
+ // Must save first to have the generated id available to generate
+ // the policyId