aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/MSOInfrastructureBPMN
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOInfrastructureBPMN')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy13
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateE2EServiceInstance.groovy12
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateResources.groovy6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CompareModelofE2EServiceInstance.bpmn6
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelVersions.bpmn4
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn10
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn7
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateResources.bpmn4
9 files changed, 42 insertions, 24 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
index 1464aedc5c..3903e12ba2 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
@@ -129,17 +129,20 @@ public class CreateCustomE2EServiceInstance extends AbstractServiceTaskProcessor
Map reqMap = jsonSlurper.parseText(siRequest)
//InputParams
- def userParams = reqMap.requestDetails?.requestParameters?.userParams
+ def userParamsList = reqMap.requestDetails?.requestParameters?.userParams
Map<String, String> inputMap = [:]
- if (userParams) {
- userParams.each {
- userParam -> inputMap.put(userParam.name, userParam.value.toString())
+ if (userParamsList) {
+ for (def i=0; i<userParamsList.size(); i++) {
+ def userParams1 = userParamsList.get(i)
+ userParams1.each { param -> inputMap.put(param.key, param.value)}
}
}
+
- utils.log("DEBUG", "User Input Parameters map: " + userParams.toString(), isDebugEnabled)
+ utils.log("DEBUG", "User Input Parameters map: " + inputMap.toString(), isDebugEnabled)
execution.setVariable("serviceInputParams", inputMap)
+ execution.setVariable("uuiRequest", inputMap.get("UUIRequest"))
execution.setVariable("URN_mso_adapters_openecomp_db_endpoint","http://mso.mso.testlab.openecomp.org:8080/dbadapters/RequestsDbAdapter")
//TODO
//execution.setVariable("serviceInputParams", jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams"))
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 4ad58fb669..267673d9fd 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
@@ -137,8 +137,8 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
String serviceInstanceName = execution.getVariable("serviceInstanceName")
String serviceInstanceId = execution.getVariable("serviceInstanceId")
String uuiRequest = execution.getVariable("uuiRequest")
- String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceDefId")
- String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.templateId")
+ String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceInvariantUuid")
+ String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid")
String serviceModelName = jsonUtil.getJsonValue(uuiRequest, "service.parameters.templateName")
execution.setVariable("serviceModelName", serviceModelName)
//aai serviceType and Role can be setted as fixed value now.
@@ -189,7 +189,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
try {
- utils.log("DEBUG", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
+ utils.log("INFO", " ***** Inside prepareDecomposeService of create generic e2e service ***** ", isDebugEnabled)
String modelInvariantUuid = execution.getVariable("modelInvariantUuid")
String modelUuid = execution.getVariable("modelUuid")
//here modelVersion is not set, we use modelUuid to decompose the service.
@@ -211,12 +211,12 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
public void processDecomposition(DelegateExecution execution) {
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
- utils.log("DEBUG", " ***** Inside processDecomposition() of create generic e2e service flow ***** ", isDebugEnabled)
+ utils.log("INFO", " ***** Inside processDecomposition() of create generic e2e service flow ***** ", isDebugEnabled)
try {
ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition")
} catch (Exception ex) {
String exceptionMessage = "Bpmn error encountered in create generic e2e service flow. processDecomposition() - " + ex.getMessage()
- utils.log("DEBUG", exceptionMessage, isDebugEnabled)
+ utils.log("INFO", exceptionMessage, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, exceptionMessage)
}
}
@@ -396,7 +396,7 @@ public class DoCreateE2EServiceInstance extends AbstractServiceTaskProcessor {
utils.log("INFO", " ======== STARTED preInitResourcesOperStatus Process ======== ", isDebugEnabled)
try{
String serviceId = execution.getVariable("serviceInstanceId")
- String operationId = execution.getVariable("operationId")
+ String operationId = execution.getVariable("msoRequestId")
String operationType = execution.getVariable("operationType")
String resourceTemplateUUIDs = ""
String result = "processing"
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateResources.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateResources.groovy
index a53540ac89..93f86592ab 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateResources.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateResources.groovy
@@ -137,6 +137,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor
def currentIndex = execution.getVariable("currentResourceIndex")
List<Resource> sequencedResourceList = execution.getVariable("sequencedResourceList")
Resource currentResource = sequencedResourceList.get(currentIndex)
+ execution.setVariable("resourceType", currentResource.getModelInfo().getModelName())
utils.log("INFO", "Now we deal with resouce:" + currentResource.getModelInfo().getModelName(), isDebugEnabled)
utils.log("INFO", "======== COMPLETED getCurrentResoure Process ======== ", isDebugEnabled)
}
@@ -161,6 +162,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor
utils.log("INFO", "======== Start prepareResourceRecipeRequest Process ======== ", isDebugEnabled)
ResourceInput resourceInput = new ResourceInput()
String serviceInstanceName = execution.getVariable("serviceInstanceName")
+ String resourceType = execution.getVariable("resourceType")
String resourceInstanceName = resourceType + "_" + serviceInstanceName
resourceInput.setResourceInstanceName(resourceInstanceName)
utils.log("INFO", "Prepare Resource Request resourceInstanceName:" + resourceInstanceName, isDebugEnabled)
@@ -183,8 +185,8 @@ public class DoCreateResources extends AbstractServiceTaskProcessor
String incomingRequest = execution.getVariable("uuiRequest")
//set the requestInputs from tempalte To Be Done
- String serviceModelUuid = execution.getVariable("modelUuid")
- String serviceParameters = jsonUtil.getJsonValue(incomingRequest, "service.parameters")
+ String serviceModelUuid = jsonUtil.getJsonValue(incomingRequest,"service.serviceUuid")
+ String serviceParameters = jsonUtil.getJsonValue(incomingRequest, "service.parameters")
String resourceParameters = ResourceRequestBuilder.buildResourceRequestParameters(execution, serviceModelUuid, resourceCustomizationUuid, serviceParameters)
resourceInput.setResourceParameters(resourceParameters)
execution.setVariable("resourceInput", resourceInput)
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CompareModelofE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CompareModelofE2EServiceInstance.bpmn
index 074b48a62c..7aecd23cb2 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CompareModelofE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CompareModelofE2EServiceInstance.bpmn
@@ -30,11 +30,11 @@ ex.processJavaException(execution)]]></bpmn:script>
<camunda:in source="serviceInstanceId" target="serviceInstanceId" />
<camunda:in source="serviceInstanceName" target="serviceInstanceName" />
<camunda:in source="productFamilyId" target="productFamilyId" />
- <camunda:in source="disableRollback" target="disableRollback" />
+ <camunda:in source="modelInvariantIdTarget" target="modelInvariantIdTarget" />
<camunda:in source="uuiRequest" target="uuiRequest" />
<camunda:out source="rolledBack" target="rolledBack" />
- <camunda:out source="serviceInstanceName" target="serviceInstanceName" />
- <camunda:in source="failIfExists" target="failIfExists" />
+ <camunda:out source="compareModelsResult" target="compareModelsResult" />
+ <camunda:in source="modelVersionIdTarget" target="modelVersionIdTarget" />
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
<camunda:in source="serviceType" target="serviceType" />
<camunda:in source="initialStatus" target="initialStatus" />
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
index 99244c54d2..c0637a3e1a 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateCustomE2EServiceInstance.bpmn
@@ -22,7 +22,7 @@ ex.processJavaException(execution)]]></bpmn:script>
<bpmn:sequenceFlow id="SequenceFlow_1dsbjjb" name="" sourceRef="StartEvent_0v1ffn4" targetRef="ScriptTask_0u3lw39" />
<bpmn:sequenceFlow id="SequenceFlow_1yay321" name="" sourceRef="ScriptTask_0u3lw39" targetRef="EndEvent_0eznq6x" />
</bpmn:subProcess>
- <bpmn:callActivity id="DoCreateE2EServiceInstance" name="Call DoCreateE2EServiceInstance&#10;" calledElement="DoCreateE2EServiceInstance">
+ <bpmn:callActivity id="DoCreateE2EServiceInstance" name="Call DoCreateE2EServiceInstance&#10;" calledElement="DoCreateE2EServiceInstanceV3">
<bpmn:extensionElements>
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:in source="msoRequestId" target="msoRequestId" />
@@ -41,6 +41,8 @@ ex.processJavaException(execution)]]></bpmn:script>
<camunda:in sourceExpression="1610" target="sdncVersion" />
<camunda:in source="initialStatus" target="initialStatus" />
<camunda:in source="serviceType" target="serviceType" />
+ <camunda:in source="uuiRequest" target="uuiRequest" />
+ <camunda:in source="requestAction" target="operationType" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_19eilro</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0klbpxx</bpmn:outgoing>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelVersions.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelVersions.bpmn
index 4779b0acde..3833e646c5 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelVersions.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelVersions.bpmn
@@ -50,7 +50,7 @@ dcsi.processDecomposition_Target(execution)]]></bpmn2:script>
<bpmn2:extensionElements>
<camunda:in source="msoRequestId" target="msoRequestId" />
<camunda:in source="serviceInstanceId" target="serviceInstanceId" />
- <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="serviceModelInfo_Target" target="serviceModelInfo" />
<camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
<camunda:out source="serviceDecomposition" target="serviceDecomposition" />
<camunda:out source="WorkflowException" target="WorkflowException" />
@@ -88,7 +88,7 @@ dcsi.processDecomposition_Original(execution)]]></bpmn2:script>
<bpmn2:extensionElements>
<camunda:in source="msoRequestId" target="msoRequestId" />
<camunda:in source="serviceInstanceId" target="serviceInstanceId" />
- <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
+ <camunda:in source="serviceModelInfo_Original" target="serviceModelInfo" />
<camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
<camunda:out source="serviceDecomposition" target="serviceDecomposition" />
<camunda:out source="WorkflowException" target="WorkflowException" />
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
index f5a87b0c3e..df9ef116e4 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCompareModelofE2EServiceInstance.bpmn
@@ -40,10 +40,16 @@ ex.processJavaException(execution)]]></bpmn2:script>
<bpmn2:extensionElements>
<camunda:in source="msoRequestId" target="msoRequestId" />
<camunda:in source="serviceInstanceId" target="serviceInstanceId" />
- <camunda:in source="serviceModelInfo" target="serviceModelInfo" />
<camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" />
- <camunda:out source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:out source="serviceDecomposition_Target" target="serviceDecomposition_Target" />
<camunda:out source="WorkflowException" target="WorkflowException" />
+ <camunda:in source="model-invariant-id-target" target="model-invariant-id-target" />
+ <camunda:in source="model-version-id-target" target="model-version-id-target" />
+ <camunda:in source="model-invariant-id-original" target="model-invariant-id-original" />
+ <camunda:in source="model-version-id-original" target="model-version-id-original" />
+ <camunda:out source="addResourceList" target="addResourceList" />
+ <camunda:out source="delResourceList" target="delResourceList" />
+ <camunda:out source="serviceDecomposition_Original" target="serviceDecomposition_Original" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_1rebkae</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_1pe6r93</bpmn2:outgoing>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
index d6dbf58594..5772faadf0 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateE2EServiceInstance.bpmn
@@ -22,6 +22,7 @@ dcsi.preProcessRequest(execution)
<camunda:out source="GENGS_SuccessIndicator" target="GENGS_SuccessIndicator" />
<camunda:out source="WorkflowException" target="WorkflowException" />
<camunda:in source="serviceType" target="GENGS_serviceType" />
+ <camunda:in source="serviceInstanceId" target="GENGS_serviceInstanceId" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_1i7t9hq</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
@@ -193,7 +194,7 @@ dcsi.prepareDecomposeService(execution)]]></bpmn2:script>
def dcsi= new DoCreateE2EServiceInstance()
dcsi.doServiceHoming(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:callActivity id="CallActivity_1ojtwas" name="Call DoCreateResources" calledElement="DoCreateResources">
+ <bpmn2:callActivity id="CallActivity_1ojtwas" name="Call DoCreateResources" calledElement="DoCreateResourcesV3">
<bpmn2:extensionElements>
<camunda:in source="nsServiceName" target="nsServiceName" />
<camunda:in source="nsServiceDescription" target="nsServiceDescription" />
@@ -205,6 +206,10 @@ dcsi.doServiceHoming(execution)]]></bpmn2:script>
<camunda:in source="resourceUUID" target="resourceUUID" />
<camunda:in source="resourceParameters" target="resourceParameters" />
<camunda:in source="operationType" target="operationType" />
+ <camunda:in source="addResourceList" target="addResourceList" />
+ <camunda:in source="serviceInstanceName" target="serviceInstanceName" />
+ <camunda:in source="serviceDecomposition" target="serviceDecomposition" />
+ <camunda:in source="uuiRequest" target="uuiRequest" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0bf6bzp</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0d0c20n</bpmn2:outgoing>
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateResources.bpmn b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateResources.bpmn
index 2ad563af96..9ed1431ed8 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateResources.bpmn
+++ b/bpmn/MSOInfrastructureBPMN/src/main/resources/subprocess/DoCreateResources.bpmn
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.10.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
+<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_MagIIMOUEeW8asg-vCEgWQ" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
<bpmn2:process id="DoCreateResourcesV3" name="DoCreateResourcesV3" isExecutable="true">
<bpmn2:startEvent id="createSI_startEvent" name="Start Flow">
<bpmn2:outgoing>SequenceFlow_1qiiycn</bpmn2:outgoing>
@@ -67,7 +67,7 @@ ddsi.getCurrentResoure(execution)]]></bpmn2:script>
def ddsi = new DoCreateResources()
ddsi.prepareResourceRecipeRequest(execution)]]></bpmn2:script>
</bpmn2:scriptTask>
- <bpmn2:scriptTask id="Task_12ghoph" name="Execute Resource Recipe">
+ <bpmn2:scriptTask id="Task_12ghoph" name="Execute Resource Recipe" scriptFormat="groovy">
<bpmn2:incoming>SequenceFlow_1u9k0dm</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_13c7bhn</bpmn2:outgoing>
<bpmn2:script><![CDATA[import org.openecomp.mso.bpmn.infrastructure.scripts.*