Merge "bmpn sonar issue fix IssueId: SO-118"
authorchuanyu chen <chenchuanyu@huawei.com>
Thu, 14 Sep 2017 02:59:17 +0000 (02:59 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 14 Sep 2017 02:59:17 +0000 (02:59 +0000)
adapters/mso-requests-db-adapter/WebContent/WEB-INF/jboss-deployment-structure.xml
bpmn/MSOInfrastructureBPMN/src/main/groovy/org/openecomp/mso/bpmn/infrastructure/scripts/DoCreateServiceInstance.groovy
bpmn/MSOInfrastructureBPMN/src/main/resources/process/CreateGenericALaCarteServiceInstance.bpmn
pom.xml

index 88d5024..f7fc214 100644 (file)
@@ -5,12 +5,17 @@
                        <module name="org.apache.log4j" />\r
                        <module name="org.slf4j" />\r
                        <module name="org.slf4j.impl" />\r
+                       <module name="org.jboss.resteasy.resteasy-jackson-provider" />\r
+                       <module name="org.jboss.resteasy.resteasy-jettison-provider" />\r
                </exclusions>\r
                <dependencies>\r
                            <module name="org.jboss.jandex" slot="main" />\r
                 <module name="org.javassist" slot="main" />\r
                 <module name="org.antlr" slot="main" />\r
                 <module name="org.dom4j" slot="main" />\r
+                <module name="org.jboss.resteasy.resteasy-jackson2-provider" services="import" />\r
+                <!-- This module contain the ProviderBase class: -->\r
+                <module name="com.fasterxml.jackson.jaxrs.jackson-jaxrs-json-provider" export="true" />\r
                </dependencies>\r
        </deployment>\r
 </jboss-deployment-structure>\r
index 54d30d6..0eb16a2 100644 (file)
@@ -248,13 +248,15 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
                        if (siParamsXml == null)
                                siParamsXml = ""
                        execution.setVariable("siParamsXml", siParamsXml)
-       
+
                        //AAI PUT
-                       String oStatus= "Active"
+                       String oStatus = execution.getVariable("initialStatus") ?: ""
                        if ("TRANSPORT".equalsIgnoreCase(serviceType))
                        {
                                oStatus = "Created"
                        }
+
+                       String statusLine = isBlank(oStatus) ? "" : "<orchestration-status>${oStatus}</orchestration-status>"
                                
                        AaiUtil aaiUriUtil = new AaiUtil(this)
                        String aai_uri = aaiUriUtil.getBusinessCustomerUri(execution)
@@ -264,7 +266,7 @@ public class DoCreateServiceInstance extends AbstractServiceTaskProcessor {
                                        <service-instance-name>${serviceInstanceName}</service-instance-name>
                                        <service-type>${serviceType}</service-type>
                                        <service-role>${serviceRole}</service-role>
-                                       <orchestration-status>${oStatus}</orchestration-status>
+                                       ${statusLine}
                                    <model-invariant-id>${modelInvariantUuid}</model-invariant-id>
                                    <model-version-id>${modelUuid}</model-version-id>
                                        </service-instance>""".trim()
index dbd40c0..acf380f 100644 (file)
@@ -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.4.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.8.2" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
   <bpmn2:process id="CreateGenericALaCarteServiceInstance" name="CreateGenericALaCarteServiceInstance" isExecutable="true">
     <bpmn2:startEvent id="createSI_startEvent" name="Create SI Start Flow">
       <bpmn2:outgoing>SequenceFlow_0lp2z7l</bpmn2:outgoing>
@@ -39,6 +39,7 @@ ex.processJavaException(execution)]]></bpmn2:script>
         <camunda:in source="globalSubscriberId" target="globalSubscriberId" />
         <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" />
         <camunda:in sourceExpression="1610" target="sdncVersion" />
+        <camunda:in source="initialStatus" target="initialStatus" />
       </bpmn2:extensionElements>
       <bpmn2:incoming>SequenceFlow_0eto8sn</bpmn2:incoming>
       <bpmn2:outgoing>SequenceFlow_1lj31zp</bpmn2:outgoing>
diff --git a/pom.xml b/pom.xml
index 9601fe8..6e372fa 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                                        <source>1.8</source>
                                </configuration>
                        </plugin>
-                       <!-- license plugin -->
-                       <plugin>
-                               <groupId>org.codehaus.mojo</groupId>
-                               <artifactId>license-maven-plugin</artifactId>
-                               <version>1.10</version>
-                               <configuration>
-                                       <addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
-                                       <processStartTag>============LICENSE_START=======================================================</processStartTag>
-                                       <processEndTag>============LICENSE_END=========================================================</processEndTag>
-                                       <sectionDelimiter>================================================================================</sectionDelimiter>
-                                       <licenseName>apache_v2</licenseName>
-                                       <inceptionYear>2017</inceptionYear>
-                                       <organizationName>AT&amp;T Intellectual Property. All rights reserved.</organizationName>
-                                       <projectName>ECOMP MSO</projectName>
-                                       <canUpdateCopyright>true</canUpdateCopyright>
-                                       <canUpdateDescription>true</canUpdateDescription>
-                                       <canUpdateLicense>true</canUpdateLicense>
-                                       <emptyLineAfterHeader>true</emptyLineAfterHeader>
-                               </configuration>
-                               <executions>
-                                       <execution>
-                                               <id>first</id>
-                                               <goals>
-                                                       <goal>update-file-header</goal>
-                                               </goals>
-                                               <phase>process-sources</phase>
-                                               <configuration>
-                                                       <licenseName>apache_v2</licenseName>
-                                                       <includes>
-                                                               <include>*.java</include>
-                                                               <include>*.groovy</include>
-                                                       </includes>
-                                                       <excludes>
-                                                               <exclude>*.json</exclude>
-                                                       </excludes>
-                                               </configuration>
-                                       </execution>
-                               </executions>
-                       </plugin>
                </plugins>
        </build>
        <!-- *********************************************************************************************************** -->