summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN/src/main/groovy
diff options
context:
space:
mode:
authorc00149107 <chenchuanyu@huawei.com>2018-03-15 15:04:16 +0800
committerc00149107 <chenchuanyu@huawei.com>2018-03-15 15:04:16 +0800
commitf9107dc194830f5b197b9d7852810cffa7705acf (patch)
tree161324607d22103060773e8be01daf78d84334ec /bpmn/MSOInfrastructureBPMN/src/main/groovy
parentd0d3f30666bcbbdbd38b5c68dfc42d7002845feb (diff)
Add execute resource recipe task script
Add execute resource recipe task script Change-Id: Ib47a90cedbb87f23cb3b9d346862dc4f682e70d9 Issue-ID: SO-452 Signed-off-by: c00149107 <chenchuanyu@huawei.com>
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN/src/main/groovy')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy17
1 files changed, 17 insertions, 0 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
index e1462117a7..586364e46d 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy
@@ -21,6 +21,7 @@
package org.openecomp.mso.bpmn.infrastructure.scripts;
import static org.apache.commons.lang3.StringUtils.*;
+import org.apache.http.HttpResponse
import groovy.xml.XmlUtil
import groovy.json.*
@@ -563,4 +564,20 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
execution.setVariable("resourceInput", resourceInput)
utils.log("INFO", "======== COMPLETED prepareResourceRecipeRequest Process ======== ", isDebugEnabled)
}
+
+ public void executeResourceRecipe(Execution execution){
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ utils.log("INFO", "======== Start executeResourceRecipe Process ======== ", isDebugEnabled)
+ String requestId = execution.getVariable("msoRequestId")
+ String serviceInstanceId = execution.getVariable("serviceInstanceId")
+ String serviceType = execution.getVariable("serviceType")
+ ResourceInput resourceInput = execution.getVariable("resourceInput")
+ String requestAction = resourceInput.getOperationType()
+ JSONObject resourceRecipe = cutils.getResourceRecipe(execution, resourceInput.getResourceUuid(), requestAction)
+ String recipeUri = resourceRecipe.getString("orchestrationUri")
+ String recipeTimeOut = resourceRecipe.getString("recipeTimeout")
+ String recipeParamXsd = resourceRecipe.get("paramXSD")
+ HttpResponse resp = BpmnRestClient.post(recipeUri, requestId, recipeTimeout, requestAction, serviceInstanceId, serviceType, resourceInput.toString(), recipeParamXsd)
+
+ }
}