summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2018-11-16 20:48:15 +0530
committerSeshu Kumar M <seshu.kumar.m@huawei.com>2018-11-17 03:23:23 +0000
commitdc37f5a0f911094d5c3e3a1a03d95551590ccef2 (patch)
tree5f9bb095806a576f7abf6c9db1f8c620b6bf23f7 /bpmn
parentce7d16089439d570c1c12764f7cd2372547d69f1 (diff)
Fix the sdnc groovy
Fix the sdnc groovy for setting value. Change-Id: Id002bba2bad9a3a286fbb103d285f04846f34438 Issue-ID: SO-689 Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com> (cherry picked from commit 351946d6f5ef7954fd7a09a59050d700997826eb)
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy12
1 files changed, 6 insertions, 6 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
index d0a3dddba9..94630d6433 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy
@@ -73,7 +73,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
msoLogger.info("The resourceInput is: " + resourceInput)
//Get ResourceInput Object
ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(resourceInput, ResourceInput.class)
- execution.setVariable(Prefix + "resourceInput", resourceInputObj)
+ execution.setVariable(Prefix + "resourceInput", resourceInputObj.toString())
//Deal with recipeParams
String recipeParamsFromWf = execution.getVariable("recipeParamXsd")
@@ -185,7 +185,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
* @param execution
*/
public void updateResourceInput(DelegateExecution execution) {
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(execution.getVariable(Prefix + "resourceInput"), ResourceInput.class)
String modelName = resourceInputObj.getResourceModelInfo().getModelName()
switch (modelName) {
@@ -252,7 +252,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
String serviceInstanceId = execution.getVariable(Prefix + "serviceInstanceId")
String source = execution.getVariable("source")
String sdnc_service_id = execution.getVariable(Prefix + "sdncServiceId")
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(execution.getVariable(Prefix + "resourceInput"), ResourceInput.class)
String serviceType = resourceInputObj.getServiceType()
String serviceModelInvariantUuid = resourceInputObj.getServiceModelInfo().getModelInvariantUuid()
String serviceModelUuid = resourceInputObj.getServiceModelInfo().getModelUuid()
@@ -458,7 +458,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void prepareUpdateBeforeCreateSDNCResource(DelegateExecution execution) {
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(execution.getVariable(Prefix + "resourceInput"), ResourceInput.class)
String operType = resourceInputObj.getOperationType()
String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
@@ -491,7 +491,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
}
public void prepareUpdateAfterCreateSDNCResource(execution) {
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(execution.getVariable(Prefix + "resourceInput"), ResourceInput.class)
String operType = resourceInputObj.getOperationType()
String resourceCustomizationUuid = resourceInputObj.getResourceModelInfo().getModelCustomizationUuid()
String ServiceInstanceId = resourceInputObj.getServiceInstanceId()
@@ -543,7 +543,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor {
data = data.substring(data.indexOf("<"))
def resp = new XmlSlurper().parseText(data)
- ResourceInput resourceInputObj = execution.getVariable(Prefix + "resourceInput")
+ ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(execution.getVariable(Prefix + "resourceInput"), ResourceInput.class)
String modelName = resourceInputObj.getResourceModelInfo().getModelName()
def val = ""