aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy66
1 files changed, 19 insertions, 47 deletions
diff --git a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
index 2029d15d5c..d5c6a88c4c 100644
--- a/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
+++ b/bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateVFCNetworkServiceInstance.groovy
@@ -58,55 +58,27 @@ public class CreateGenericE2EServiceInstance extends AbstractServiceTaskProcesso
* generate the operation id
*/
public void preProcessRequest (Execution execution) {
- /* def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
+ def isDebugEnabled=execution.getVariable("isDebugLogEnabled")
String msg = ""
utils.log("DEBUG", " *** preProcessRequest() *** ", isDebugEnabled)
- try {
-
- String siRequest = execution.getVariable("bpmnRequest")
- utils.logAudit(siRequest)
-
- String requestId = execution.getVariable("mso-request-id")
- execution.setVariable("msoRequestId", requestId)
- utils.log("DEBUG", "Input Request:" + siRequest + " reqId:" + requestId, isDebugEnabled)
-
- String serviceInstanceId = execution.getVariable("serviceInstanceId")
- if (isBlank(serviceInstanceId)) {
- serviceInstanceId = UUID.randomUUID().toString()
- }
- utils.log("DEBUG", "Generated new Service Instance:" + serviceInstanceId, isDebugEnabled)
- serviceInstanceId = UriUtils.encode(serviceInstanceId,"UTF-8")
- execution.setVariable("serviceInstanceId", serviceInstanceId)
-
+ try {
+ String globalSubscriberId = execution.getVariable("globalSubscriberId")
+ utils.log("DEBUG", "globalSubscriberId:" + globalSubscriberId, isDebugEnabled)
+ String serviceType = execution.getVariable("serviceType")
+ utils.log("DEBUG", "serviceType:" + serviceType, isDebugEnabled)
+ String serviceId = execution.getVariable("serviceId")
+ utils.log("DEBUG", "serviceId:" + serviceId, isDebugEnabled)
String operationId = execution.getVariable("operationId")
- if (isBlank(operationId)) {
- operationId = UUID.randomUUID().toString()
- }
- utils.log("DEBUG", "Generated new Service Instance Operation:" + operationId, isDebugEnabled)
- serviceInstanceId = UriUtils.encode(operationId,"UTF-8")
- execution.setVariable("operationId", operationId)
- //subscriberInfo, TBD , there is no globalSubscriberId in R1 for E2E Service.
- //requestInfo TBD , there is no requestDetails for R1 E2E service
-
- //TBD need to insert operationInfo to RequestDb
-
- //set service Instance Name
- execution.setVariable("serviceInstanceName", jsonUtil.getJsonValue(siRequest, "service.name"))
- execution.setVariable("serviceDescription", jsonUtil.getJsonValue(siRequest, "service.description"))
- execution.setVariable("templateId", jsonUtil.getJsonValue(siRequest, "service.templateId"))
-
- //serviceParamters
- String serviceParamters = jsonUtil.getJsonValue(siRequest, "service.parameters")
- if (isBlank(serviceParamters)) {
- msg = "Input service paramters is null"
- utils.log("DEBUG", msg, isDebugEnabled)
- exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
- } else
- {
- execution.setVariable("serviceParamters", serviceParamters)
- }
-
- utils.log("DEBUG", "service parameters:" + serviceParamters, isDebugEnabled)
+ utils.log("DEBUG", "serviceType:" + serviceType, isDebugEnabled)
+ String nodeTemplateUUID = execution.getVariable("nodeTemplateUUID")
+ utils.log("DEBUG", "globalSubscriberId:" + globalSubscriberId, isDebugEnabled)
+ String siRequest = execution.getVariable("nodeParamters")
+ utils.log("DEBUG", "Input Request:" + siRequest, isDebugEnabled)
+ String nsOperationKey = "{\"globalSubscriberId\":" + globalSubscriberId + ",\"serviceType:\""
+ + serviceType + ",\"serviceId\":" + serviceId + ",\"operationId\":" + operationId
+ +",\"nodeTemplateUUID\":" + nodeTemplateUUID + "}";
+ execution.setVariable("nsOperationKey", nsOperationKey);
+
} catch (BpmnError e) {
throw e;
} catch (Exception ex){
@@ -114,7 +86,7 @@ public class CreateGenericE2EServiceInstance extends AbstractServiceTaskProcesso
utils.log("DEBUG", msg, isDebugEnabled)
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg)
}
- utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)*/
+ utils.log("DEBUG"," ***** Exit preProcessRequest *****", isDebugEnabled)
}
36699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.onap.so</groupId>
    <artifactId>mso-api-handlers</artifactId>
    <version>1.6.0-SNAPSHOT</version>
  </parent>

  <artifactId>mso-requests-db</artifactId>
  <name>mso-requests-db</name>
  <description>MSO Requests Database definition and Hibernate objects</description>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>
  <dependencies>
    <dependency>
      <groupId>uk.co.blackpepper.bowman</groupId>
      <artifactId>bowman-client</artifactId>
      <version>0.3.0</version>
    </dependency>
    <dependency>
      <groupId>org.onap.so</groupId>
      <artifactId>common</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-common</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <packaging>jar</packaging>
  <build>
    <finalName>${project.artifactId}</finalName>
  </build>
</project>