diff options
Diffstat (limited to 'bpmn')
25 files changed, 2219 insertions, 2132 deletions
diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml index bd0e86496a..891a57d0f2 100644 --- a/bpmn/MSOCommonBPMN/pom.xml +++ b/bpmn/MSOCommonBPMN/pom.xml @@ -1,410 +1,410 @@ <?xml version="1.0"?> -<project - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" - xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.so</groupId> - <artifactId>bpmn</artifactId> - <version>1.4.0-SNAPSHOT</version> - </parent> - <artifactId>MSOCommonBPMN</artifactId> - <name>MSOCommonBPMN</name> - <packaging>jar</packaging> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" + xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>bpmn</artifactId> + <version>1.4.0-SNAPSHOT</version> + </parent> + <artifactId>MSOCommonBPMN</artifactId> + <name>MSOCommonBPMN</name> + <packaging>jar</packaging> - <properties> - <maven.compiler.target>1.8</maven.compiler.target> - <maven.compiler.source>1.8</maven.compiler.source> - </properties> + <properties> + <maven.compiler.target>1.8</maven.compiler.target> + <maven.compiler.source>1.8</maven.compiler.source> + </properties> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <executions> - <execution> - <id>test-compile</id> - <phase>compile</phase> - <goals> - <goal>testCompile</goal> - </goals> - <configuration> - <skip>false</skip> - </configuration> - </execution> - </executions> - </plugin> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <executions> + <execution> + <id>test-compile</id> + <phase>compile</phase> + <goals> + <goal>testCompile</goal> + </goals> + <configuration> + <skip>false</skip> + </configuration> + </execution> + </executions> + </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>3.0.2</version> - <executions> - <execution> - <goals> - <goal>test-jar</goal> - </goals> - <configuration> - <skip>false</skip> - <excludes> - <exclude>**/validation/*</exclude> - </excludes> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-codegen-plugin</artifactId> - <version>2.5.2</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-eclipse-plugin</artifactId> - <version>2.8</version> - <configuration> - <additionalProjectnatures> - <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature> - </additionalProjectnatures> - <sourceIncludes> - <sourceInclude>**/*.groovy</sourceInclude> - </sourceIncludes> - </configuration> - </plugin> - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <execution> - <id>compile</id> - <phase>compile</phase> - <configuration> - <tasks> - <mkdir dir="${basedir}/src/main/groovy" /> - <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc"> - <classpath refid="maven.compile.classpath" /> - </taskdef> - <mkdir dir="${project.build.outputDirectory}" /> - <groovyc destdir="${project.build.outputDirectory}" - srcdir="${basedir}/src/main/groovy/" listfiles="true"> - <classpath refid="maven.compile.classpath" /> - </groovyc> - </tasks> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - <execution> - <id>test-compile</id> - <phase>test-compile</phase> - <configuration> - <tasks> - <mkdir dir="${basedir}/src/test/groovy" /> - <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc"> - <classpath refid="maven.test.classpath" /> - </taskdef> - <mkdir dir="${project.build.testOutputDirectory}" /> - <groovyc destdir="${project.build.testOutputDirectory}" - srcdir="${basedir}/src/test/groovy/" listfiles="true"> - <classpath refid="maven.test.classpath" /> - </groovyc> - </tasks> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <executions> - <execution> - <id>default-test</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/AllTestSuites.java</include> - </includes> - </configuration> - </execution> - <execution> - <id>non-spring-tests</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/NonSpringSuite.java</include> - </includes> - </configuration> - </execution> - <execution> - <id>groovy-tests</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/AllGroovyTestSuites.java</include> - </includes> - </configuration> - </execution> - </executions> - <configuration> - <parallel>suites</parallel> - </configuration> - </plugin> - </plugins> - <pluginManagement> - <plugins> - <!--This plugin's configuration is used to store Eclipse m2e settings + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>3.0.2</version> + <executions> + <execution> + <goals> + <goal>test-jar</goal> + </goals> + <configuration> + <skip>false</skip> + <excludes> + <exclude>**/validation/*</exclude> + </excludes> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-codegen-plugin</artifactId> + <version>2.5.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <version>2.8</version> + <configuration> + <additionalProjectnatures> + <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature> + </additionalProjectnatures> + <sourceIncludes> + <sourceInclude>**/*.groovy</sourceInclude> + </sourceIncludes> + </configuration> + </plugin> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>compile</id> + <phase>compile</phase> + <configuration> + <tasks> + <mkdir dir="${basedir}/src/main/groovy" /> + <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc"> + <classpath refid="maven.compile.classpath" /> + </taskdef> + <mkdir dir="${project.build.outputDirectory}" /> + <groovyc destdir="${project.build.outputDirectory}" srcdir="${basedir}/src/main/groovy/" + listfiles="true"> + <classpath refid="maven.compile.classpath" /> + </groovyc> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + <execution> + <id>test-compile</id> + <phase>test-compile</phase> + <configuration> + <tasks> + <mkdir dir="${basedir}/src/test/groovy" /> + <taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc"> + <classpath refid="maven.test.classpath" /> + </taskdef> + <mkdir dir="${project.build.testOutputDirectory}" /> + <groovyc destdir="${project.build.testOutputDirectory}" srcdir="${basedir}/src/test/groovy/" + listfiles="true"> + <classpath refid="maven.test.classpath" /> + </groovyc> + </tasks> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <executions> + <execution> + <id>default-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/AllTestSuites.java</include> + </includes> + </configuration> + </execution> + <execution> + <id>non-spring-tests</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/NonSpringSuite.java</include> + </includes> + </configuration> + </execution> + <execution> + <id>groovy-tests</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/AllGroovyTestSuites.java</include> + </includes> + </configuration> + </execution> + </executions> + <configuration> + <parallel>suites</parallel> + </configuration> + </plugin> + </plugins> + <pluginManagement> + <plugins> + <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId> org.apache.maven.plugins </groupId> - <artifactId> + <artifactId> maven-antrun-plugin </artifactId> - <versionRange> + <versionRange> [1.3,) </versionRange> - <goals> - <goal>run</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore></ignore> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> - <dependencyManagement> - <dependencies> - <dependency> - <!-- Import dependency management from camunda --> - <groupId>org.camunda.bpm</groupId> - <artifactId>camunda-bom</artifactId> - <version>${camunda.version}</version> - <scope>import</scope> - <type>pom</type> - </dependency> - </dependencies> - </dependencyManagement> - <dependencies> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter</artifactId> - <version>${camunda.springboot.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework.cloud</groupId> - <artifactId>spring-cloud-contract-wiremock</artifactId> - <version>1.2.4.RELEASE</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.extension.mockito</groupId> - <artifactId>camunda-bpm-mockito</artifactId> - <version>3.2.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.connect</groupId> - <artifactId>camunda-connect-connectors-all</artifactId> - </dependency> - <dependency> - <groupId>commons-beanutils</groupId> - <artifactId>commons-beanutils</artifactId> - <version>1.9.3</version> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-actuator</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - </dependency> - <dependency> - <!-- Needed for InMemoryH2Test --> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy-all</artifactId> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCoreBPMN</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>mso-catalog-db</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>mso-requests-db</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>common</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so.adapters</groupId> - <artifactId>mso-adapters-rest-interface</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> - </dependency> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.6</version> - </dependency> - <dependency> - <groupId>com.jayway.jsonpath</groupId> - <artifactId>json-path</artifactId> - </dependency> - <dependency> - <groupId>javax.ws.rs</groupId> - <artifactId>javax.ws.rs-api</artifactId> - <version>${jax.ws.rs}</version> - </dependency> + <goals> + <goal>run</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore> + </ignore> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> + <dependencyManagement> + <dependencies> + <dependency> + <!-- Import dependency management from camunda --> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-bom</artifactId> + <version>${camunda.version}</version> + <scope>import</scope> + <type>pom</type> + </dependency> + </dependencies> + </dependencyManagement> + <dependencies> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter</artifactId> + <version>${camunda.springboot.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-contract-wiremock</artifactId> + <version>1.2.4.RELEASE</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.extension.mockito</groupId> + <artifactId>camunda-bpm-mockito</artifactId> + <version>3.2.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.connect</groupId> + <artifactId>camunda-connect-connectors-all</artifactId> + </dependency> + <dependency> + <groupId>commons-beanutils</groupId> + <artifactId>commons-beanutils</artifactId> + <version>1.9.3</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-actuator</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <!-- Needed for InMemoryH2Test --> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy-all</artifactId> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCoreBPMN</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>mso-catalog-db</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>mso-requests-db</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>common</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so.adapters</groupId> + <artifactId>mso-adapters-rest-interface</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + </dependency> + <dependency> + <groupId>commons-lang</groupId> + <artifactId>commons-lang</artifactId> + <version>2.6</version> + </dependency> + <dependency> + <groupId>com.jayway.jsonpath</groupId> + <artifactId>json-path</artifactId> + </dependency> + <dependency> + <groupId>javax.ws.rs</groupId> + <artifactId>javax.ws.rs-api</artifactId> + <version>${jax.ws.rs}</version> + </dependency> - <dependency> - <groupId>org.onap.appc.client</groupId> - <artifactId>client-lib</artifactId> - <version>1.5.0-SNAPSHOT</version> - <exclusions> - <exclusion> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - </exclusion> - <exclusion> - <groupId>org.powermock</groupId> - <artifactId>powermock-module-junit4</artifactId> - </exclusion> - <exclusion> - <groupId>org.powermock</groupId> - <artifactId>powermock-api-mockito</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.onap.appc.client</groupId> - <artifactId>client-kit</artifactId> - <version>1.5.0-SNAPSHOT</version> - <exclusions> - <exclusion> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.aspectj</groupId> - <artifactId>aspectjrt</artifactId> - </dependency> - <dependency> - <groupId>org.json</groupId> - <artifactId>json</artifactId> - </dependency> - <dependency> - <groupId>org.glassfish.jersey.core</groupId> - <artifactId>jersey-common</artifactId> - </dependency> - <dependency> - <groupId>org.glassfish.jersey.core</groupId> - <artifactId>jersey-client</artifactId> - </dependency> - <dependency> - <groupId>org.glassfish.jersey.inject</groupId> - <artifactId>jersey-hk2</artifactId> - <version>2.26</version> - </dependency> - <dependency> - <groupId>org.glassfish.jersey.media</groupId> - <artifactId>jersey-media-json-jackson</artifactId> - </dependency> - <dependency> - <groupId>org.onap.sdc.sdc-tosca</groupId> - <artifactId>sdc-tosca</artifactId> - <version>1.4.4</version> - </dependency> - <dependency> - <groupId>org.onap.sdc.jtosca</groupId> - <artifactId>jtosca</artifactId> - <version>1.4.4</version> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>uk.co.blackpepper.bowman</groupId> - <artifactId>bowman-client</artifactId> - <version>0.3.0</version> - </dependency> - <dependency> - <groupId>pl.pragmatists</groupId> - <artifactId>JUnitParams</artifactId> - <version>1.1.0</version> - </dependency> - <dependency> - <groupId>ch.vorburger.mariaDB4j</groupId> - <artifactId>mariaDB4j</artifactId> - <version>2.2.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework.cloud</groupId> - <artifactId>spring-cloud-contract-wiremock</artifactId> - <version>1.2.4.RELEASE</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.assertj</groupId> - <artifactId>assertj-core</artifactId> - <version>3.11.1</version> - <scope>test</scope> - </dependency> - </dependencies> + <dependency> + <groupId>org.onap.appc.client</groupId> + <artifactId>client-lib</artifactId> + <version>1.5.0-SNAPSHOT</version> + <exclusions> + <exclusion> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + </exclusion> + <exclusion> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-junit4</artifactId> + </exclusion> + <exclusion> + <groupId>org.powermock</groupId> + <artifactId>powermock-api-mockito</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.onap.appc.client</groupId> + <artifactId>client-kit</artifactId> + <version>1.5.0-SNAPSHOT</version> + <exclusions> + <exclusion> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.aspectj</groupId> + <artifactId>aspectjrt</artifactId> + </dependency> + <dependency> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-common</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.core</groupId> + <artifactId>jersey-client</artifactId> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.inject</groupId> + <artifactId>jersey-hk2</artifactId> + <version>2.26</version> + </dependency> + <dependency> + <groupId>org.glassfish.jersey.media</groupId> + <artifactId>jersey-media-json-jackson</artifactId> + </dependency> + <dependency> + <groupId>org.onap.sdc.sdc-tosca</groupId> + <artifactId>sdc-tosca</artifactId> + <version>1.4.4</version> + </dependency> + <dependency> + <groupId>org.onap.sdc.jtosca</groupId> + <artifactId>jtosca</artifactId> + <version>1.4.4</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>uk.co.blackpepper.bowman</groupId> + <artifactId>bowman-client</artifactId> + <version>0.3.0</version> + </dependency> + <dependency> + <groupId>pl.pragmatists</groupId> + <artifactId>JUnitParams</artifactId> + <version>1.1.0</version> + </dependency> + <dependency> + <groupId>ch.vorburger.mariaDB4j</groupId> + <artifactId>mariaDB4j</artifactId> + <version>2.2.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-contract-wiremock</artifactId> + <version>1.2.4.RELEASE</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.11.1</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java index de77ca66e7..2d066285a4 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java @@ -749,7 +749,7 @@ public class BBInputSetup implements JavaDelegate { instanceGroup.setModelInfoInstanceGroup( this.mapperLayer.mapCatalogInstanceGroupToInstanceGroup(null, catalogInstanceGroup)); instanceGroup.getModelInfoInstanceGroup().setFunction(vnfcInstanceGroupCust.getFunction()); - instanceGroup.setDescription(vnfcInstanceGroupCust.getDescription()); + instanceGroup.getModelInfoInstanceGroup().setDescription(vnfcInstanceGroupCust.getDescription()); genericVnf.getInstanceGroups().add(instanceGroup); } } diff --git a/bpmn/MSOCoreBPMN/pom.xml b/bpmn/MSOCoreBPMN/pom.xml index 6fe3168dc7..12bc9980bf 100644 --- a/bpmn/MSOCoreBPMN/pom.xml +++ b/bpmn/MSOCoreBPMN/pom.xml @@ -1,126 +1,126 @@ <?xml version="1.0"?> <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"> - <parent> - <groupId>org.onap.so</groupId> - <artifactId>bpmn</artifactId> - <version>1.4.0-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - <artifactId>MSOCoreBPMN</artifactId> - <packaging>jar</packaging> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>bpmn</artifactId> + <version>1.4.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>MSOCoreBPMN</artifactId> + <packaging>jar</packaging> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <executions> - <execution> - <id>test-compile</id> - <phase>compile</phase> - <goals> - <goal>testCompile</goal> - </goals> - <configuration> - <skip>false</skip> - </configuration> - </execution> - </executions> - </plugin> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <executions> + <execution> + <id>test-compile</id> + <phase>compile</phase> + <goals> + <goal>testCompile</goal> + </goals> + <configuration> + <skip>false</skip> + </configuration> + </execution> + </executions> + </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>3.0.2</version> - <executions> - <execution> - <id>tests-jar</id> - <phase>package</phase> - <goals> - <goal>test-jar</goal> - </goals> - <configuration> - <skip>false</skip> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>3.0.2</version> + <executions> + <execution> + <id>tests-jar</id> + <phase>package</phase> + <goals> + <goal>test-jar</goal> + </goals> + <configuration> + <skip>false</skip> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> - <dependencies> - <!-- latest commons-fileupload --> - <dependency> - <groupId>commons-fileupload</groupId> - <artifactId>commons-fileupload</artifactId> - <version>1.3.3</version> - </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> - </dependency> - <dependency> - <groupId>org.camunda.connect</groupId> - <artifactId>camunda-connect-connectors-all</artifactId> - <version>1.0.5</version> - </dependency> - <dependency> - <groupId>org.camunda.bpm</groupId> - <artifactId>camunda-engine-plugin-connect</artifactId> - <version>${camunda.version}</version> - </dependency> - <dependency> - <groupId>org.camunda.bpm</groupId> - <artifactId>camunda-engine</artifactId> - <version>${camunda.version}</version> - </dependency> - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy-all</artifactId> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>net.sf.saxon</groupId> - <artifactId>Saxon-HE</artifactId> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>common</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.json</groupId> - <artifactId>json</artifactId> - <version>20160212</version> - </dependency> - <dependency> - <groupId>org.xmlunit</groupId> - <artifactId>xmlunit-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.github.fge</groupId> - <artifactId>json-schema-validator</artifactId> - <version>2.2.6</version> - </dependency> - <dependency> - <groupId>com.github.fge</groupId> - <artifactId>json-schema-core</artifactId> - <version>1.2.4</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - </dependency> - <dependency> - <groupId>org.yaml</groupId> - <artifactId>snakeyaml</artifactId> - </dependency> - </dependencies> + <dependencies> + <!-- latest commons-fileupload --> + <dependency> + <groupId>commons-fileupload</groupId> + <artifactId>commons-fileupload</artifactId> + <version>1.3.3</version> + </dependency> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>javax.servlet-api</artifactId> + </dependency> + <dependency> + <groupId>org.camunda.connect</groupId> + <artifactId>camunda-connect-connectors-all</artifactId> + <version>1.0.5</version> + </dependency> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-engine-plugin-connect</artifactId> + <version>${camunda.version}</version> + </dependency> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-engine</artifactId> + <version>${camunda.version}</version> + </dependency> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy-all</artifactId> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>net.sf.saxon</groupId> + <artifactId>Saxon-HE</artifactId> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>common</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + <version>20160212</version> + </dependency> + <dependency> + <groupId>org.xmlunit</groupId> + <artifactId>xmlunit-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.github.fge</groupId> + <artifactId>json-schema-validator</artifactId> + <version>2.2.6</version> + </dependency> + <dependency> + <groupId>com.github.fge</groupId> + <artifactId>json-schema-core</artifactId> + <version>1.2.4</version> + </dependency> + <dependency> + <groupId>org.springframework</groupId> + <artifactId>spring-beans</artifactId> + </dependency> + <dependency> + <groupId>org.yaml</groupId> + <artifactId>snakeyaml</artifactId> + </dependency> + </dependencies> </project> diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml index 2abea6e31f..4dd7a467ea 100644 --- a/bpmn/mso-infrastructure-bpmn/pom.xml +++ b/bpmn/mso-infrastructure-bpmn/pom.xml @@ -1,276 +1,277 @@ <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"> - <parent> - <groupId>org.onap.so</groupId> - <artifactId>bpmn</artifactId> - <version>1.4.0-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - <artifactId>mso-infrastructure-bpmn</artifactId> - <packaging>jar</packaging> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>unpack</id> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <skip>true</skip> - <artifactItems> - <artifactItem> - <groupId>org.onap.so</groupId> - <artifactId>MSOCommonBPMN</artifactId> - <version>${project.version}</version> - <type>jar</type> - <overWrite>false</overWrite> - <outputDirectory>${project.build.outputDirectory}</outputDirectory> - <includes>**/*.bpmn</includes> - </artifactItem> - <artifactItem> - <groupId>org.onap.so</groupId> - <artifactId>so-bpmn-building-blocks</artifactId> - <version>${project.version}</version> - <type>jar</type> - <overWrite>false</overWrite> - <outputDirectory>${project.build.outputDirectory}</outputDirectory> - <includes>**/*.bpmn</includes> - </artifactItem> - <artifactItem> - <groupId>org.onap.so</groupId> - <artifactId>so-bpmn-infrastructure-flows</artifactId> - <version>${project.version}</version> - <type>jar</type> - <overWrite>false</overWrite> - <outputDirectory>${project.build.outputDirectory}</outputDirectory> - <includes>**/*.bpmn</includes> - </artifactItem> - </artifactItems> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <executions> - <execution> - <id>integration-test</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <skip>true</skip> - <includes> - <include>**/IntegrationTestSuite.java</include> - </includes> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <executions> - <execution> - <id>test-compile</id> - <phase>compile</phase> - <goals> - <goal>testCompile</goal> - </goals> - <configuration> - <skip>false</skip> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <executions> - <execution> - <id>tests</id> - </execution> - <execution> - <id>original</id> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-maven-plugin</artifactId> - <version>${springboot.version}</version> - <configuration> - <mainClass>org.onap.so.bpmn.infrastructure.MSOInfrastructureApplication</mainClass> - </configuration> - <executions> - <execution> - <goals> - <goal>repackage</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>extract-docker-file</id> - </execution> - </executions> - </plugin> - <plugin> - <groupId>io.fabric8</groupId> - <artifactId>fabric8-maven-plugin</artifactId> - <executions> - <execution> - <id>start</id> - </execution> - </executions> - </plugin> - </plugins> - </build> - <dependencyManagement> - <dependencies> - <dependency> - <!-- Import dependency management from Spring Boot --> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-dependencies</artifactId> - <version>${springboot.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - <dependencies> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter</artifactId> - <version>${camunda.springboot.version}</version> - </dependency> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter-rest</artifactId> - <version>${camunda.springboot.version}</version> - </dependency> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId> - <version>${camunda.springboot.version}</version> - <exclusions> - <exclusion> - <groupId>org.camunda.bpmn</groupId> - <artifactId>camunda-engine-rest-core</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-data-jpa</artifactId> - <exclusions> - <exclusion> - <groupId>org.apache.tomcat</groupId> - <artifactId>tomcat-jdbc</artifactId> - </exclusion> - </exclusions> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-jdbc</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>so-bpmn-infrastructure-common</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCommonBPMN</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCommonBPMN</artifactId> - <version>${project.version}</version> - <type>test-jar</type> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>so-bpmn-building-blocks</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>so-bpmn-infrastructure-flows</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.cloud</groupId> - <artifactId>spring-cloud-contract-wiremock</artifactId> - <version>1.2.4.RELEASE</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>ch.vorburger.mariaDB4j</groupId> - <artifactId>mariaDB4j</artifactId> - <version>2.2.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>io.micrometer</groupId> - <artifactId>micrometer-core</artifactId> - </dependency> - <dependency> - <groupId>io.micrometer</groupId> - <artifactId>micrometer-registry-prometheus</artifactId> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>so-bpmn-tasks</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>cxf-logging</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.camunda.bpm.extension.mockito</groupId> - <artifactId>camunda-bpm-mockito</artifactId> - <version>3.2.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.extension</groupId> - <artifactId>camunda-bpm-assert</artifactId> - <version>2.0-alpha2</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.assertj</groupId> - <artifactId>assertj-core</artifactId> - <version>1.7.0</version> - <scope>test</scope> - </dependency> - </dependencies> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>bpmn</artifactId> + <version>1.4.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>mso-infrastructure-bpmn</artifactId> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>unpack</id> + <goals> + <goal>unpack</goal> + </goals> + <configuration> + <skip>true</skip> + <artifactItems> + <artifactItem> + <groupId>org.onap.so</groupId> + <artifactId>MSOCommonBPMN</artifactId> + <version>${project.version}</version> + <type>jar</type> + <overWrite>false</overWrite> + <outputDirectory>${project.build.outputDirectory}</outputDirectory> + <includes>**/*.bpmn</includes> + </artifactItem> + <artifactItem> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-building-blocks</artifactId> + <version>${project.version}</version> + <type>jar</type> + <overWrite>false</overWrite> + <outputDirectory>${project.build.outputDirectory}</outputDirectory> + <includes>**/*.bpmn</includes> + </artifactItem> + <artifactItem> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-infrastructure-flows</artifactId> + <version>${project.version}</version> + <type>jar</type> + <overWrite>false</overWrite> + <outputDirectory>${project.build.outputDirectory}</outputDirectory> + <includes>**/*.bpmn</includes> + </artifactItem> + </artifactItems> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <executions> + <execution> + <id>integration-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <skip>true</skip> + <includes> + <include>**/IntegrationTestSuite.java</include> + </includes> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <executions> + <execution> + <id>test-compile</id> + <phase>compile</phase> + <goals> + <goal>testCompile</goal> + </goals> + <configuration> + <skip>false</skip> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <id>tests</id> + </execution> + <execution> + <id>original</id> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <version>${springboot.version}</version> + <configuration> + <mainClass>org.onap.so.bpmn.infrastructure.MSOInfrastructureApplication</mainClass> + </configuration> + <executions> + <execution> + <goals> + <goal>repackage</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>extract-docker-file</id> + </execution> + </executions> + </plugin> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>fabric8-maven-plugin</artifactId> + <executions> + <execution> + <id>start</id> + </execution> + </executions> + </plugin> + </plugins> + </build> + <dependencyManagement> + <dependencies> + <dependency> + <!-- Import dependency management from Spring Boot --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-dependencies</artifactId> + <version>${springboot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + <dependencies> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter-rest</artifactId> + <version>${camunda.springboot.version}</version> + <exclusions> + <exclusion> + <groupId>org.camunda.bpmn</groupId> + <artifactId>camunda-engine-rest-core</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId> + <version>${camunda.springboot.version}</version> + <exclusions> + <exclusion> + <groupId>org.camunda.bpmn</groupId> + <artifactId>camunda-engine-rest-core</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + <exclusions> + <exclusion> + <groupId>org.apache.tomcat</groupId> + <artifactId>tomcat-jdbc</artifactId> + </exclusion> + </exclusions> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-jdbc</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-infrastructure-common</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCommonBPMN</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCommonBPMN</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-building-blocks</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-infrastructure-flows</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-contract-wiremock</artifactId> + <version>1.2.4.RELEASE</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>ch.vorburger.mariaDB4j</groupId> + <artifactId>mariaDB4j</artifactId> + <version>2.2.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>io.micrometer</groupId> + <artifactId>micrometer-core</artifactId> + </dependency> + <dependency> + <groupId>io.micrometer</groupId> + <artifactId>micrometer-registry-prometheus</artifactId> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-tasks</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>cxf-logging</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.camunda.bpm.extension.mockito</groupId> + <artifactId>camunda-bpm-mockito</artifactId> + <version>3.2.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.extension</groupId> + <artifactId>camunda-bpm-assert</artifactId> + <version>2.0-alpha2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>1.7.0</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/bpmn/pom.xml b/bpmn/pom.xml index dc309253d4..9beb02e329 100644 --- a/bpmn/pom.xml +++ b/bpmn/pom.xml @@ -1,96 +1,96 @@ <?xml version="1.0" encoding="UTF-8"?> <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> + 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> + <parent> <groupId>org.onap.so</groupId> <artifactId>so</artifactId> <version>1.4.0-SNAPSHOT</version> - </parent> + </parent> - <artifactId>bpmn</artifactId> - <name>BPMN Subsystem</name> - <description>BPMN Subsystem for MSO</description> - <packaging>pom</packaging> + <artifactId>bpmn</artifactId> + <name>BPMN Subsystem</name> + <description>BPMN Subsystem for MSO</description> + <packaging>pom</packaging> - <properties> - <camunda.version>7.10.0</camunda.version> - <camunda.bpm.assert.version>1.2</camunda.bpm.assert.version> - <camunda.bpm.webapp.artifact>camunda-webapp-jboss-standalone</camunda.bpm.webapp.artifact> - <h2.version>1.4.196</h2.version> - <groovy.version>2.4.8</groovy.version> - <saxon.version>9.5.1-8</saxon.version> - <xmlunit.version>2.4.0</xmlunit.version> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <sdnc.northbound.version>1.5.1-SNAPSHOT</sdnc.northbound.version> - </properties> + <properties> + <camunda.version>7.10.0</camunda.version> + <camunda.bpm.assert.version>1.2</camunda.bpm.assert.version> + <camunda.bpm.webapp.artifact>camunda-webapp-jboss-standalone</camunda.bpm.webapp.artifact> + <h2.version>1.4.196</h2.version> + <groovy.version>2.4.8</groovy.version> + <saxon.version>9.5.1-8</saxon.version> + <xmlunit.version>2.4.0</xmlunit.version> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <sdnc.northbound.version>1.5.1-SNAPSHOT</sdnc.northbound.version> + </properties> - <modules> - <module>MSOCoreBPMN</module> + <modules> + <module>MSOCoreBPMN</module> - <module>MSOCommonBPMN</module> - <module>so-bpmn-infrastructure-common</module> - <module>so-bpmn-tasks</module> - <module>so-bpmn-building-blocks</module> - <module>so-bpmn-infrastructure-flows</module> - <module>mso-infrastructure-bpmn</module> - </modules> + <module>MSOCommonBPMN</module> + <module>so-bpmn-infrastructure-common</module> + <module>so-bpmn-tasks</module> + <module>so-bpmn-building-blocks</module> + <module>so-bpmn-infrastructure-flows</module> + <module>mso-infrastructure-bpmn</module> + </modules> - <!-- Define artifact versions for child modules --> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy-all</artifactId> - <version>${groovy.version}</version> - </dependency> - <dependency> - <groupId>net.sf.saxon</groupId> - <artifactId>Saxon-HE</artifactId> - <version>${saxon.version}</version> - </dependency> - <dependency> - <groupId>org.xmlunit</groupId> - <artifactId>xmlunit-core</artifactId> - <version>${xmlunit.version}</version> - </dependency> - <dependency> - <groupId>javax.activation</groupId> - <artifactId>activation</artifactId> - <version>1.1.1</version> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>org.assertj</groupId> - <artifactId>assertj-core</artifactId> - <version>3.11.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.extension.mockito</groupId> - <artifactId>camunda-bpm-mockito</artifactId> - <version>4.0.0</version> - <scope>test</scope> - </dependency> - </dependencies> - </dependencyManagement> + <!-- Define artifact versions for child modules --> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy-all</artifactId> + <version>${groovy.version}</version> + </dependency> + <dependency> + <groupId>net.sf.saxon</groupId> + <artifactId>Saxon-HE</artifactId> + <version>${saxon.version}</version> + </dependency> + <dependency> + <groupId>org.xmlunit</groupId> + <artifactId>xmlunit-core</artifactId> + <version>${xmlunit.version}</version> + </dependency> + <dependency> + <groupId>javax.activation</groupId> + <artifactId>activation</artifactId> + <version>1.1.1</version> + <scope>compile</scope> + </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>3.11.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.extension.mockito</groupId> + <artifactId>camunda-bpm-mockito</artifactId> + <version>4.0.0</version> + <scope>test</scope> + </dependency> + </dependencies> + </dependencyManagement> - <dependencies> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpcore</artifactId> - </dependency> - <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-data-jpa</artifactId> - <optional>true</optional> - </dependency> - </dependencies> + <dependencies> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpcore</artifactId> + </dependency> + <dependency> + <groupId>org.apache.httpcomponents</groupId> + <artifactId>httpclient</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + <optional>true</optional> + </dependency> + </dependencies> </project> diff --git a/bpmn/so-bpmn-building-blocks/pom.xml b/bpmn/so-bpmn-building-blocks/pom.xml index 09706746af..a867613890 100644 --- a/bpmn/so-bpmn-building-blocks/pom.xml +++ b/bpmn/so-bpmn-building-blocks/pom.xml @@ -1,156 +1,156 @@ <?xml version="1.0"?> <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"> - <parent> - <groupId>org.onap.so</groupId> - <artifactId>bpmn</artifactId> - <version>1.4.0-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - <artifactId>so-bpmn-building-blocks</artifactId> - <packaging>jar</packaging> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - </properties> - <build> - <plugins> - <plugin> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-codegen-plugin</artifactId> - <version>2.5.2</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <executions> - <execution> - <id>default-test</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/AllTestSuites.java</include> - </includes> - </configuration> - </execution> - </executions> - <configuration> - <parallel>suites</parallel> - </configuration> - </plugin> - </plugins> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>bpmn</artifactId> + <version>1.4.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>so-bpmn-building-blocks</artifactId> + <packaging>jar</packaging> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + </properties> + <build> + <plugins> + <plugin> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-codegen-plugin</artifactId> + <version>2.5.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <executions> + <execution> + <id>default-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/AllTestSuites.java</include> + </includes> + </configuration> + </execution> + </executions> + <configuration> + <parallel>suites</parallel> + </configuration> + </plugin> + </plugins> - <pluginManagement> - <plugins> - <!--This plugin's configuration is used to store Eclipse m2e settings + <pluginManagement> + <plugins> + <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId> org.apache.maven.plugins </groupId> - <artifactId> + <artifactId> maven-antrun-plugin </artifactId> - <versionRange> + <versionRange> [1.3,) </versionRange> - <goals> - <goal>run</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore /> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> - <dependencies> - <dependency> - <groupId>org.camunda.bpm</groupId> - <artifactId>camunda-engine</artifactId> - <version>${camunda.version}</version> - </dependency> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter</artifactId> - <version>${camunda.springboot.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId> - <version>${camunda.springboot.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.extension.mockito</groupId> - <artifactId>camunda-bpm-mockito</artifactId> - <version>3.2.1</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.extension</groupId> - <artifactId>camunda-bpm-assert</artifactId> - <version>2.0-alpha2</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.assertj</groupId> - <artifactId>assertj-core</artifactId> - <version>1.7.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCommonBPMN</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>so-bpmn-tasks</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>so-bpmn-infrastructure-common</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>commons-net</groupId> - <artifactId>commons-net</artifactId> - <version>3.6</version> - </dependency> - <dependency> - <groupId>ch.vorburger.mariaDB4j</groupId> - <artifactId>mariaDB4j</artifactId> - <version>2.2.3</version> - <scope>test</scope> - </dependency> + <goals> + <goal>run</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore /> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> + <dependencies> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-engine</artifactId> + <version>${camunda.version}</version> + </dependency> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter</artifactId> + <version>${camunda.springboot.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId> + <version>${camunda.springboot.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.extension.mockito</groupId> + <artifactId>camunda-bpm-mockito</artifactId> + <version>3.2.1</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.extension</groupId> + <artifactId>camunda-bpm-assert</artifactId> + <version>2.0-alpha2</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>1.7.0</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCommonBPMN</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-tasks</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-infrastructure-common</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>commons-net</groupId> + <artifactId>commons-net</artifactId> + <version>3.6</version> + </dependency> + <dependency> + <groupId>ch.vorburger.mariaDB4j</groupId> + <artifactId>mariaDB4j</artifactId> + <version>2.2.3</version> + <scope>test</scope> + </dependency> - </dependencies> + </dependencies> </project> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn index ea762c8719..7bb97939dd 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/AssignVnfBB.bpmn @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.8.2"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.11.3"> <bpmn:process id="AssignVnfBB" name="AssignVnfBB" isExecutable="true"> <bpmn:startEvent id="Start_AssignVnfBB"> <bpmn:outgoing>SequenceFlow_0zaz9o2</bpmn:outgoing> @@ -24,7 +24,7 @@ <bpmn:sequenceFlow id="SequenceFlow_1nle8kc" sourceRef="Task_createInstanceGroups" targetRef="ExclusiveGateway_02tchpp" /> <bpmn:sequenceFlow id="SequenceFlow_11jum90" name="no" sourceRef="ExclusiveGateway_02tchpp" targetRef="ExclusiveGateway_1blf52g" /> <bpmn:sequenceFlow id="SequenceFlow_1uiok7v" name="yes" sourceRef="ExclusiveGateway_02tchpp" targetRef="Task_callHoming"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("callHoming")}]]></bpmn:conditionExpression> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression"><![CDATA[${execution.getVariable("homing")}]]></bpmn:conditionExpression> </bpmn:sequenceFlow> <bpmn:sequenceFlow id="SequenceFlow_0v8d14a" sourceRef="Task_callHoming" targetRef="ExclusiveGateway_1blf52g" /> <bpmn:callActivity id="Task_callHoming" name="Call Homing" calledElement="HomingBB"> diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn index cd62636b77..b66ecfa329 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/HomingBB.bpmn @@ -1,10 +1,9 @@ <?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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="_vwRmIBsREeeIQtzUKIjH4g" targetNamespace="http://camunda.org/schema/1.0/bpmn" exporter="Camunda Modeler" exporterVersion="1.7.1" 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:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="_vwRmIBsREeeIQtzUKIjH4g" 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="HomingBB" name="HomingBB" isExecutable="true"> <bpmn2:startEvent id="start"> - <bpmn2:outgoing>SequenceFlow_1x9usa6</bpmn2:outgoing> + <bpmn2:outgoing>SequenceFlow_0jtjlbu</bpmn2:outgoing> </bpmn2:startEvent> - <bpmn2:sequenceFlow id="SequenceFlow_1x9usa6" sourceRef="start" targetRef="sniroOofCheck" /> <bpmn2:subProcess id="bpmnErrorSubprocess" name="Error Handling Subprocess" triggeredByEvent="true"> <bpmn2:endEvent id="endBpmnError"> <bpmn2:incoming>SequenceFlow_1rf4vs8</bpmn2:incoming> @@ -43,7 +42,7 @@ ex.processJavaException(execution)]]></bpmn2:script> <bpmn2:sequenceFlow id="SequenceFlow_0kamg53" name="" sourceRef="startJavaError" targetRef="processJavaException" /> <bpmn2:sequenceFlow id="SequenceFlow_1o7154s" name="" sourceRef="processJavaException" targetRef="endJavaError" /> </bpmn2:subProcess> - <bpmn2:callActivity id="receiveAsyncCallback" name="Receive Async Callback" calledElement="ReceiveWorkflowMessage" camunda:modelerTemplate="receiveWorkflowMessage"> + <bpmn2:callActivity id="receiveAsyncCallback" name="Receive Async Callback" camunda:modelerTemplate="receiveWorkflowMessage" calledElement="ReceiveWorkflowMessage"> <bpmn2:extensionElements> <camunda:in source="true" target="isDebugLogEnabled" /> <camunda:out source="WorkflowException" target="WorkflowException" /> @@ -52,278 +51,145 @@ ex.processJavaException(execution)]]></bpmn2:script> <camunda:in source="asyncTimeout" target="RCVWFMSG_timeout" /> <camunda:out source="WorkflowResponse" target="asyncResponse" /> </bpmn2:extensionElements> - <bpmn2:incoming>SequenceFlow_1qbnm82</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_1fipbmk</bpmn2:outgoing> + <bpmn2:incoming>SequenceFlow_0qrwjzu</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_03cy5y5</bpmn2:outgoing> </bpmn2:callActivity> - <bpmn2:sequenceFlow id="SequenceFlow_1fipbmk" sourceRef="receiveAsyncCallback" targetRef="sniroOofCheck2" /> - <bpmn2:sequenceFlow id="SequenceFlow_01apjvo" sourceRef="processSniroSolution" targetRef="ExclusiveGateway_1kvzxpb" /> <bpmn2:endEvent id="end"> - <bpmn2:incoming>SequenceFlow_1urt5i6</bpmn2:incoming> + <bpmn2:incoming>SequenceFlow_138xgla</bpmn2:incoming> <bpmn2:terminateEventDefinition /> </bpmn2:endEvent> - <bpmn2:sequenceFlow id="SequenceFlow_0lc15i7" sourceRef="callSniro" targetRef="ExclusiveGateway_1ckp059" /> - <bpmn2:sequenceFlow id="SequenceFlow_1dtador" name="Sniro" sourceRef="sniroOofCheck" targetRef="callSniro" /> - <bpmn2:sequenceFlow id="SequenceFlow_1qbnm82" sourceRef="ExclusiveGateway_1ckp059" targetRef="receiveAsyncCallback" /> - <bpmn2:sequenceFlow id="SequenceFlow_08k112s" name="Sniro" sourceRef="sniroOofCheck2" targetRef="processSniroSolution" /> - <bpmn2:sequenceFlow id="SequenceFlow_0m6nhqg" name="Oof" sourceRef="sniroOofCheck" targetRef="callOof"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${execution.getVariable("homingService") == "oof"}]]></bpmn2:conditionExpression> - </bpmn2:sequenceFlow> - <bpmn2:sequenceFlow id="SequenceFlow_0kvax6n" sourceRef="callOof" targetRef="ExclusiveGateway_1ckp059" /> - <bpmn2:sequenceFlow id="SequenceFlow_0oixz4g" name="Oof" sourceRef="sniroOofCheck2" targetRef="processOofSolution"> - <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${execution.getVariable("homingService") == "oof"}]]></bpmn2:conditionExpression> - </bpmn2:sequenceFlow> - <bpmn2:sequenceFlow id="SequenceFlow_0ph4paa" sourceRef="processOofSolution" targetRef="ExclusiveGateway_1kvzxpb" /> - <bpmn2:sequenceFlow id="SequenceFlow_1urt5i6" sourceRef="ExclusiveGateway_1kvzxpb" targetRef="end" /> - <bpmn2:serviceTask id="callSniro" name=" SNIRO Post (demands) " camunda:expression="${SniroHoming.callSniro(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_1dtador</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0lc15i7</bpmn2:outgoing> + <bpmn2:serviceTask id="callHoming" name="Homing Post (Send demand) " camunda:expression="${HomingV2.callHoming(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> + <bpmn2:incoming>SequenceFlow_0jtjlbu</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_0qrwjzu</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="processSniroSolution" name=" Process Solution " camunda:expression="${SniroHoming.processSolution(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), asyncResponse)}"> - <bpmn2:incoming>SequenceFlow_08k112s</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_01apjvo</bpmn2:outgoing> + <bpmn2:serviceTask id="processHomingSolution" name="Homing Process Solution " camunda:expression="${HomingV2.processSolution(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), asyncResponse)}"> + <bpmn2:incoming>SequenceFlow_03cy5y5</bpmn2:incoming> + <bpmn2:outgoing>SequenceFlow_138xgla</bpmn2:outgoing> </bpmn2:serviceTask> - <bpmn2:serviceTask id="callOof" name=" OOF Post (demands) " camunda:expression="${OofHoming.callSniro(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> - <bpmn2:incoming>SequenceFlow_0m6nhqg</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0kvax6n</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:serviceTask id="processOofSolution" name=" Process Solution " camunda:expression="${OofHoming.processSolution(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")), asyncResponse)}"> - <bpmn2:incoming>SequenceFlow_0oixz4g</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_0ph4paa</bpmn2:outgoing> - </bpmn2:serviceTask> - <bpmn2:inclusiveGateway id="sniroOofCheck" name="Homing Service? " default="SequenceFlow_1dtador"> - <bpmn2:incoming>SequenceFlow_1x9usa6</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_1dtador</bpmn2:outgoing> - <bpmn2:outgoing>SequenceFlow_0m6nhqg</bpmn2:outgoing> - </bpmn2:inclusiveGateway> - <bpmn2:inclusiveGateway id="ExclusiveGateway_1ckp059"> - <bpmn2:incoming>SequenceFlow_0lc15i7</bpmn2:incoming> - <bpmn2:incoming>SequenceFlow_0kvax6n</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_1qbnm82</bpmn2:outgoing> - </bpmn2:inclusiveGateway> - <bpmn2:inclusiveGateway id="sniroOofCheck2" name="Homing Service?" default="SequenceFlow_08k112s"> - <bpmn2:incoming>SequenceFlow_1fipbmk</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_08k112s</bpmn2:outgoing> - <bpmn2:outgoing>SequenceFlow_0oixz4g</bpmn2:outgoing> - </bpmn2:inclusiveGateway> - <bpmn2:inclusiveGateway id="ExclusiveGateway_1kvzxpb"> - <bpmn2:incoming>SequenceFlow_01apjvo</bpmn2:incoming> - <bpmn2:incoming>SequenceFlow_0ph4paa</bpmn2:incoming> - <bpmn2:outgoing>SequenceFlow_1urt5i6</bpmn2:outgoing> - </bpmn2:inclusiveGateway> + <bpmn2:sequenceFlow id="SequenceFlow_0jtjlbu" sourceRef="start" targetRef="callHoming" /> + <bpmn2:sequenceFlow id="SequenceFlow_0qrwjzu" sourceRef="callHoming" targetRef="receiveAsyncCallback" /> + <bpmn2:sequenceFlow id="SequenceFlow_03cy5y5" sourceRef="receiveAsyncCallback" targetRef="processHomingSolution" /> + <bpmn2:sequenceFlow id="SequenceFlow_138xgla" sourceRef="processHomingSolution" targetRef="end" /> </bpmn2:process> <bpmn2:error id="Error_10hit0u" name="MSO Workflow Exception" errorCode="MSOWorkflowException" /> <bpmn2:error id="Error_1lwpypa" name="Java Lang Exception" errorCode="java.lang.Exception" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="HomingBB"> <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="start"> - <dc:Bounds x="135" y="275" width="36" height="36" /> + <dc:Bounds x="153" y="275" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="108" y="311" width="90" height="20" /> + <dc:Bounds x="126" y="311" width="90" height="20" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1x9usa6_di" bpmnElement="SequenceFlow_1x9usa6"> - <di:waypoint xsi:type="dc:Point" x="171" y="293" /> - <di:waypoint xsi:type="dc:Point" x="291" y="293" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="186" y="278" width="90" height="0" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="SubProcess_16p12qo_di" bpmnElement="bpmnErrorSubprocess" isExpanded="true"> - <dc:Bounds x="254" y="496" width="409" height="168" /> + <dc:Bounds x="312" y="405" width="409" height="168" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="SubProcess_12gjiy8_di" bpmnElement="javaExceptionSubProcess" isExpanded="true"> - <dc:Bounds x="284" y="679" width="350" height="159" /> + <dc:Bounds x="342" y="588" width="350" height="159" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_07tjq3v_di" bpmnElement="endBpmnError"> - <dc:Bounds x="579" y="570" width="36" height="36" /> + <dc:Bounds x="637" y="479" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="552" y="611" width="90" height="0" /> + <dc:Bounds x="610" y="520" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="StartEvent_1qiitb2_di" bpmnElement="startBpmnError"> - <dc:Bounds x="299" y="570" width="36" height="36" /> + <dc:Bounds x="357" y="479" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="272" y="611" width="90" height="0" /> + <dc:Bounds x="330" y="520" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_03hs6s9_di" bpmnElement="processMsoWorkflowException"> - <dc:Bounds x="406" y="548" width="100" height="80" /> + <dc:Bounds x="464" y="457" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_19gqykh_di" bpmnElement="processJavaException"> - <dc:Bounds x="410" y="727" width="100" height="80" /> + <dc:Bounds x="468" y="636" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="StartEvent_1fbpeuw_di" bpmnElement="startJavaError"> - <dc:Bounds x="318" y="749" width="36" height="36" /> + <dc:Bounds x="376" y="658" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="291" y="790" width="90" height="0" /> + <dc:Bounds x="349" y="699" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0jbvnr0_di" bpmnElement="endJavaError"> - <dc:Bounds x="567" y="749" width="36" height="36" /> + <dc:Bounds x="625" y="658" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="540" y="790" width="90" height="0" /> + <dc:Bounds x="598" y="699" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1rf4vs8_di" bpmnElement="SequenceFlow_1rf4vs8"> - <di:waypoint xsi:type="dc:Point" x="506" y="588" /> - <di:waypoint xsi:type="dc:Point" x="579" y="588" /> + <di:waypoint xsi:type="dc:Point" x="564" y="497" /> + <di:waypoint xsi:type="dc:Point" x="637" y="497" /> <bpmndi:BPMNLabel> - <dc:Bounds x="498" y="573" width="90" height="0" /> + <dc:Bounds x="556" y="482" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_00nlh7l_di" bpmnElement="SequenceFlow_00nlh7l"> - <di:waypoint xsi:type="dc:Point" x="335" y="588" /> - <di:waypoint xsi:type="dc:Point" x="363" y="588" /> - <di:waypoint xsi:type="dc:Point" x="363" y="588" /> - <di:waypoint xsi:type="dc:Point" x="406" y="588" /> + <di:waypoint xsi:type="dc:Point" x="393" y="497" /> + <di:waypoint xsi:type="dc:Point" x="421" y="497" /> + <di:waypoint xsi:type="dc:Point" x="421" y="497" /> + <di:waypoint xsi:type="dc:Point" x="464" y="497" /> <bpmndi:BPMNLabel> - <dc:Bounds x="333" y="588" width="90" height="0" /> + <dc:Bounds x="391" y="497" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0kamg53_di" bpmnElement="SequenceFlow_0kamg53"> - <di:waypoint xsi:type="dc:Point" x="354" y="767" /> - <di:waypoint xsi:type="dc:Point" x="410" y="767" /> + <di:waypoint xsi:type="dc:Point" x="412" y="676" /> + <di:waypoint xsi:type="dc:Point" x="468" y="676" /> <bpmndi:BPMNLabel> - <dc:Bounds x="337" y="752" width="90" height="0" /> + <dc:Bounds x="395" y="661" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1o7154s_di" bpmnElement="SequenceFlow_1o7154s"> - <di:waypoint xsi:type="dc:Point" x="510" y="767" /> - <di:waypoint xsi:type="dc:Point" x="567" y="767" /> + <di:waypoint xsi:type="dc:Point" x="568" y="676" /> + <di:waypoint xsi:type="dc:Point" x="625" y="676" /> <bpmndi:BPMNLabel> - <dc:Bounds x="494" y="752" width="90" height="0" /> + <dc:Bounds x="552" y="661" width="90" height="0" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="CallActivity_031b5m3_di" bpmnElement="receiveAsyncCallback"> - <dc:Bounds x="547" y="253" width="100" height="80" /> + <dc:Bounds x="464" y="253" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1fipbmk_di" bpmnElement="SequenceFlow_1fipbmk"> - <di:waypoint xsi:type="dc:Point" x="647" y="293" /> - <di:waypoint xsi:type="dc:Point" x="677" y="293" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="617" y="272" width="90" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_01apjvo_di" bpmnElement="SequenceFlow_01apjvo"> - <di:waypoint xsi:type="dc:Point" x="847" y="214" /> - <di:waypoint xsi:type="dc:Point" x="885" y="214" /> - <di:waypoint xsi:type="dc:Point" x="885" y="268" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="821" y="193" width="90" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="EndEvent_07i1a5x_di" bpmnElement="end"> - <dc:Bounds x="1034" y="275" width="36" height="36" /> + <dc:Bounds x="837" y="275" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1006" y="315" width="90" height="12" /> + <dc:Bounds x="809" y="315" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0lc15i7_di" bpmnElement="SequenceFlow_0lc15i7"> - <di:waypoint xsi:type="dc:Point" x="462" y="214" /> - <di:waypoint xsi:type="dc:Point" x="500" y="214" /> - <di:waypoint xsi:type="dc:Point" x="500" y="267" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="436" y="193" width="90" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1dtador_di" bpmnElement="SequenceFlow_1dtador"> - <di:waypoint xsi:type="dc:Point" x="316" y="268" /> - <di:waypoint xsi:type="dc:Point" x="316" y="214" /> - <di:waypoint xsi:type="dc:Point" x="362" y="214" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="322.2567567567568" y="221" width="25" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1qbnm82_di" bpmnElement="SequenceFlow_1qbnm82"> - <di:waypoint xsi:type="dc:Point" x="525" y="292" /> - <di:waypoint xsi:type="dc:Point" x="547" y="292" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="536" y="271" width="0" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_08k112s_di" bpmnElement="SequenceFlow_08k112s"> - <di:waypoint xsi:type="dc:Point" x="702" y="268" /> - <di:waypoint xsi:type="dc:Point" x="702" y="214" /> - <di:waypoint xsi:type="dc:Point" x="747" y="214" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="707.7837837837837" y="221" width="25" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0m6nhqg_di" bpmnElement="SequenceFlow_0m6nhqg"> - <di:waypoint xsi:type="dc:Point" x="316" y="318" /> - <di:waypoint xsi:type="dc:Point" x="316" y="368" /> - <di:waypoint xsi:type="dc:Point" x="362" y="368" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="323" y="344" width="19" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0kvax6n_di" bpmnElement="SequenceFlow_0kvax6n"> - <di:waypoint xsi:type="dc:Point" x="462" y="368" /> - <di:waypoint xsi:type="dc:Point" x="500" y="368" /> - <di:waypoint xsi:type="dc:Point" x="500" y="317" /> + <bpmndi:BPMNShape id="ServiceTask_0rcv8sl_di" bpmnElement="callHoming"> + <dc:Bounds x="292" y="253" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ServiceTask_0fs2fyg_di" bpmnElement="processHomingSolution"> + <dc:Bounds x="649" y="253" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0jtjlbu_di" bpmnElement="SequenceFlow_0jtjlbu"> + <di:waypoint xsi:type="dc:Point" x="189" y="293" /> + <di:waypoint xsi:type="dc:Point" x="292" y="293" /> <bpmndi:BPMNLabel> - <dc:Bounds x="481" y="347" width="0" height="12" /> + <dc:Bounds x="240.5" y="272" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0oixz4g_di" bpmnElement="SequenceFlow_0oixz4g"> - <di:waypoint xsi:type="dc:Point" x="702" y="318" /> - <di:waypoint xsi:type="dc:Point" x="702" y="368" /> - <di:waypoint xsi:type="dc:Point" x="747" y="368" /> + <bpmndi:BPMNEdge id="SequenceFlow_0qrwjzu_di" bpmnElement="SequenceFlow_0qrwjzu"> + <di:waypoint xsi:type="dc:Point" x="392" y="293" /> + <di:waypoint xsi:type="dc:Point" x="464" y="293" /> <bpmndi:BPMNLabel> - <dc:Bounds x="708.3513513513514" y="345" width="19" height="12" /> + <dc:Bounds x="428" y="272" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0ph4paa_di" bpmnElement="SequenceFlow_0ph4paa"> - <di:waypoint xsi:type="dc:Point" x="847" y="368" /> - <di:waypoint xsi:type="dc:Point" x="885" y="368" /> - <di:waypoint xsi:type="dc:Point" x="885" y="318" /> + <bpmndi:BPMNEdge id="SequenceFlow_03cy5y5_di" bpmnElement="SequenceFlow_03cy5y5"> + <di:waypoint xsi:type="dc:Point" x="564" y="293" /> + <di:waypoint xsi:type="dc:Point" x="649" y="293" /> <bpmndi:BPMNLabel> - <dc:Bounds x="866" y="347" width="0" height="12" /> + <dc:Bounds x="606.5" y="272" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1urt5i6_di" bpmnElement="SequenceFlow_1urt5i6"> - <di:waypoint xsi:type="dc:Point" x="910" y="293" /> - <di:waypoint xsi:type="dc:Point" x="1034" y="293" /> + <bpmndi:BPMNEdge id="SequenceFlow_138xgla_di" bpmnElement="SequenceFlow_138xgla"> + <di:waypoint xsi:type="dc:Point" x="749" y="293" /> + <di:waypoint xsi:type="dc:Point" x="837" y="293" /> <bpmndi:BPMNLabel> - <dc:Bounds x="972" y="272" width="0" height="12" /> + <dc:Bounds x="793" y="272" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ServiceTask_0388svf_di" bpmnElement="callSniro"> - <dc:Bounds x="362" y="174" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_1o0vjzl_di" bpmnElement="processSniroSolution"> - <dc:Bounds x="747" y="174" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_0rcv8sl_di" bpmnElement="callOof"> - <dc:Bounds x="362" y="328" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ServiceTask_0fs2fyg_di" bpmnElement="processOofSolution"> - <dc:Bounds x="747" y="328" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="InclusiveGateway_0ssv6eg_di" bpmnElement="sniroOofCheck"> - <dc:Bounds x="291" y="268" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="344" y="283" width="43" height="36" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="InclusiveGateway_0pf91to_di" bpmnElement="ExclusiveGateway_1ckp059"> - <dc:Bounds x="475" y="267" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="500" y="321" width="0" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="InclusiveGateway_17vx4ua_di" bpmnElement="sniroOofCheck2"> - <dc:Bounds x="677" y="268" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="730" y="281" width="43" height="24" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="InclusiveGateway_1610p1j_di" bpmnElement="ExclusiveGateway_1kvzxpb"> - <dc:Bounds x="860" y="268" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="885" y="322" width="0" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn2:definitions> diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java index 2a0fef0caa..5ef4d7ea98 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/BaseBPMNTest.java @@ -34,7 +34,7 @@ import org.junit.After; import org.junit.Before; import org.junit.runner.RunWith; import org.onap.so.TestApplication; -import org.onap.so.bpmn.buildingblock.SniroHomingV2; +import org.onap.so.bpmn.buildingblock.HomingV2; import org.onap.so.bpmn.common.DelegateExecutionImpl; import org.onap.so.bpmn.common.validation.BuildingBlockValidatorRunner; import org.onap.so.bpmn.infrastructure.aai.tasks.AAICommonTasks; @@ -230,7 +230,7 @@ public abstract class BaseBPMNTest { protected SDNCClient sdncClient; @MockBean - protected SniroHomingV2 sniroHoming; + protected HomingV2 homing; @MockBean protected NamingServiceDeleteTasks namingServiceDeleteTasks; diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java index 9943e39ef6..f46331fdd4 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/AssignVnfBBTest.java @@ -33,7 +33,7 @@ import org.onap.so.bpmn.common.BuildingBlockExecution; public class AssignVnfBBTest extends BaseBPMNTest { @Test public void sunnyDayAssignVnfBBTest() throws InterruptedException, IOException { - variables.put("callHoming", true); + variables.put("homing", true); mockSubprocess("SDNCHandler", "My Mock Process Name", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("AssignVnfBB", variables); assertThat(pi).isNotNull(); diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java index f1bb1462d6..bca4d3a979 100644 --- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java +++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java @@ -25,12 +25,9 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; import org.camunda.bpm.engine.delegate.BpmnError; import org.camunda.bpm.engine.runtime.ProcessInstance; -import org.junit.Ignore; import org.junit.Test; import org.onap.so.bpmn.BaseBPMNTest; -import org.onap.so.bpmn.buildingblock.SniroHomingV2; import org.onap.so.bpmn.common.BuildingBlockExecution; -import org.springframework.boot.test.mock.mockito.MockBean; public class HomingBBTest extends BaseBPMNTest { @@ -40,28 +37,28 @@ public class HomingBBTest extends BaseBPMNTest { mockSubprocess("ReceiveWorkflowMessage", "Mock ReceiveWorkflowMessage", "GenericStub"); ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables); assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassedInOrder("start", "sniroOofCheck", "callSniro", "ExclusiveGateway_1ckp059", - "receiveAsyncCallback", "sniroOofCheck2", "processSniroSolution", "ExclusiveGateway_1kvzxpb", "end"); + assertThat(pi).isStarted().hasPassedInOrder("start", "callHoming", "receiveAsyncCallback", + "processHomingSolution", "end"); assertThat(pi).isEnded(); } @Test public void testHomingV2_error_bpmnError() { - doThrow(new BpmnError("MSOWorkflowException")).when(sniroHoming).callSniro(any(BuildingBlockExecution.class)); + doThrow(new BpmnError("MSOWorkflowException")).when(homing).callHoming(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables); assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassed("start", "sniroOofCheck", "startBpmnError", "bpmnErrorSubprocess", + assertThat(pi).isStarted().hasPassed("start", "callHoming", "startBpmnError", "bpmnErrorSubprocess", "processMsoWorkflowException", "endBpmnError").hasNotPassed("callReceiveAsync"); assertThat(pi).isEnded(); } @Test public void testHomingV2_error_javaException() { - doThrow(new RuntimeException("Test")).when(sniroHoming).callSniro(any(BuildingBlockExecution.class)); + doThrow(new RuntimeException("Test")).when(homing).callHoming(any(BuildingBlockExecution.class)); ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables); assertThat(pi).isNotNull(); - assertThat(pi).isStarted().hasPassed("start", "sniroOofCheck", "callSniro", "startJavaError", - "processJavaException", "javaExceptionSubProcess", "endJavaError").hasNotPassed("callReceiveAsync"); + assertThat(pi).isStarted().hasPassed("start", "callHoming", "startJavaError", "processJavaException", + "javaExceptionSubProcess", "endJavaError").hasNotPassed("callReceiveAsync"); assertThat(pi).isEnded(); } diff --git a/bpmn/so-bpmn-infrastructure-common/pom.xml b/bpmn/so-bpmn-infrastructure-common/pom.xml index e3ba0284dc..74df3a2c2e 100644 --- a/bpmn/so-bpmn-infrastructure-common/pom.xml +++ b/bpmn/so-bpmn-infrastructure-common/pom.xml @@ -1,324 +1,325 @@ <?xml version="1.0"?> -<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"> - <parent> - <groupId>org.onap.so</groupId> - <artifactId>bpmn</artifactId> - <version>1.4.0-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - <artifactId>so-bpmn-infrastructure-common</artifactId> - <packaging>jar</packaging> - <build> - <plugins> - <plugin> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-codegen-plugin</artifactId> - <version>2.5.2</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-eclipse-plugin</artifactId> - <version>2.8</version> - <configuration> - <additionalProjectnatures> - <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature> - </additionalProjectnatures> - <sourceIncludes> - <sourceInclude>**/*.groovy</sourceInclude> - </sourceIncludes> - </configuration> - </plugin> - <plugin> - <groupId>org.codehaus.gmaven</groupId> - <artifactId>gmaven-plugin</artifactId> - <version>1.5</version> - <dependencies> - <dependency> - <groupId>org.codehaus.gmaven.runtime</groupId> - <artifactId>gmaven-runtime-2.0</artifactId> - <version>1.5</version> - </dependency> - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy</artifactId> - <version>${groovy.version}</version> - </dependency> - </dependencies> - <configuration> - <debug>false</debug> - <verbose>true</verbose> - <stacktrace>true</stacktrace> - <defaultScriptExtension>.groovy</defaultScriptExtension> - <providerSelection>2.0</providerSelection> - </configuration> - <executions> - <execution> - <goals> - <goal>testCompile</goal> - <goal>compile</goal> - </goals> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - </plugin> - <plugin> - <artifactId>maven-failsafe-plugin</artifactId> - <version>2.6</version> - <executions> - <execution> - <goals> - <goal>integration-test</goal> - <goal>verify</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - <pluginManagement> - <plugins> - <!--This plugin's configuration is used to store Eclipse m2e settings +<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"> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>bpmn</artifactId> + <version>1.4.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>so-bpmn-infrastructure-common</artifactId> + <packaging>jar</packaging> + <build> + <plugins> + <plugin> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-codegen-plugin</artifactId> + <version>2.5.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-eclipse-plugin</artifactId> + <version>2.8</version> + <configuration> + <additionalProjectnatures> + <projectnature>org.eclipse.jdt.groovy.core.groovyNature</projectnature> + </additionalProjectnatures> + <sourceIncludes> + <sourceInclude>**/*.groovy</sourceInclude> + </sourceIncludes> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.gmaven</groupId> + <artifactId>gmaven-plugin</artifactId> + <version>1.5</version> + <dependencies> + <dependency> + <groupId>org.codehaus.gmaven.runtime</groupId> + <artifactId>gmaven-runtime-2.0</artifactId> + <version>1.5</version> + </dependency> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy</artifactId> + <version>${groovy.version}</version> + </dependency> + </dependencies> + <configuration> + <debug>false</debug> + <verbose>true</verbose> + <stacktrace>true</stacktrace> + <defaultScriptExtension>.groovy</defaultScriptExtension> + <providerSelection>2.0</providerSelection> + </configuration> + <executions> + <execution> + <goals> + <goal>testCompile</goal> + <goal>compile</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + <plugin> + <artifactId>maven-failsafe-plugin</artifactId> + <version>2.6</version> + <executions> + <execution> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + <pluginManagement> + <plugins> + <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId> org.apache.maven.plugins </groupId> - <artifactId> + <artifactId> maven-antrun-plugin </artifactId> - <versionRange> + <versionRange> [1.3,) </versionRange> - <goals> - <goal>run</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore/> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <executions> - <execution> - <id>default-test</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/AllTestsTestSuite.java</include> - </includes> - </configuration> - </execution> - <execution> - <id>tasks-test</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/AllTasksTestsTestSuite.java</include> - </includes> - </configuration> - </execution> - </executions> - <configuration> - <parallel>suites</parallel> - </configuration> - </plugin> - </plugins> - </pluginManagement> - <finalName>${project.artifactId}-${project.version}</finalName> - </build> + <goals> + <goal>run</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore /> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <executions> + <execution> + <id>default-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/AllTestsTestSuite.java</include> + </includes> + </configuration> + </execution> + <execution> + <id>tasks-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/AllTasksTestsTestSuite.java</include> + </includes> + </configuration> + </execution> + </executions> + <configuration> + <parallel>suites</parallel> + </configuration> + </plugin> + </plugins> + </pluginManagement> + <finalName>${project.artifactId}-${project.version}</finalName> + </build> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.camunda.bpm</groupId> - <artifactId>camunda-bom</artifactId> - <version>${camunda.version}</version> - <scope>import</scope> - <type>pom</type> - </dependency> - </dependencies> - </dependencyManagement> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-bom</artifactId> + <version>${camunda.version}</version> + <scope>import</scope> + <type>pom</type> + </dependency> + </dependencies> + </dependencyManagement> - <dependencies> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter</artifactId> - <version>${camunda.springboot.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId> - <version>${camunda.springboot.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-spring-boot-starter-jaxws</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-spring-boot-starter-jaxrs</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-service-description-swagger</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - </dependency> - <dependency> - <groupId>com.fasterxml.uuid</groupId> - <artifactId>java-uuid-generator</artifactId> - </dependency> - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy-all</artifactId> - </dependency> - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCoreBPMN</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCommonBPMN</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCoreBPMN</artifactId> - <version>${project.version}</version> - <classifier>tests</classifier> - <scope>test</scope> - </dependency> - <dependency> - <groupId>javax.ws.rs</groupId> - <artifactId>javax.ws.rs-api</artifactId> - <version>${jax.ws.rs}</version> - </dependency> - <dependency> - <groupId>org.camunda.spin</groupId> - <artifactId>camunda-spin-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.spin</groupId> - <artifactId>camunda-spin-dataformat-all</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <artifactId>camunda-spin-dataformat-all</artifactId> - <groupId>org.camunda.spin</groupId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm</groupId> - <artifactId>camunda-engine-plugin-spin</artifactId> - </dependency> + <dependencies> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter</artifactId> + <version>${camunda.springboot.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId> + <version>${camunda.springboot.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-spring-boot-starter-jaxws</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-spring-boot-starter-jaxrs</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-rs-service-description-swagger</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + </dependency> + <dependency> + <groupId>com.fasterxml.uuid</groupId> + <artifactId>java-uuid-generator</artifactId> + </dependency> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy-all</artifactId> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCoreBPMN</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCommonBPMN</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCoreBPMN</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> + <dependency> + <groupId>javax.ws.rs</groupId> + <artifactId>javax.ws.rs-api</artifactId> + <version>${jax.ws.rs}</version> + </dependency> + <dependency> + <groupId>org.camunda.spin</groupId> + <artifactId>camunda-spin-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.spin</groupId> + <artifactId>camunda-spin-dataformat-all</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <artifactId>camunda-spin-dataformat-all</artifactId> + <groupId>org.camunda.spin</groupId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-engine-plugin-spin</artifactId> + </dependency> - <dependency> - <groupId>org.camunda.bpm</groupId> - <artifactId>camunda-engine-plugin-connect</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>javax.annotation-api</artifactId> - </dependency> - <dependency> - <groupId>org.onap.msb.java-sdk</groupId> - <artifactId>msb-java-sdk</artifactId> - <version>1.1.1</version> - <exclusions> - <exclusion> - <groupId>com.eclipsesource.jaxrs</groupId> - <artifactId>jersey-all</artifactId> - </exclusion> - </exclusions> - </dependency> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-engine-plugin-connect</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>javax.annotation-api</artifactId> + </dependency> + <dependency> + <groupId>org.onap.msb.java-sdk</groupId> + <artifactId>msb-java-sdk</artifactId> + <version>1.1.1</version> + <exclusions> + <exclusion> + <groupId>com.eclipsesource.jaxrs</groupId> + <artifactId>jersey-all</artifactId> + </exclusion> + </exclusions> + </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-configuration-processor</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - </dependency> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-core</artifactId> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </dependency> - <dependency> - <groupId>org.mariadb.jdbc</groupId> - <artifactId>mariadb-java-client</artifactId> - </dependency> - <dependency> - <groupId>ch.vorburger.mariaDB4j</groupId> - <artifactId>mariaDB4j</artifactId> - <version>2.2.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCommonBPMN</artifactId> - <version>${project.version}</version> - <classifier>tests</classifier> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter-test</artifactId> - <version>${camunda.springboot.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.assertj</groupId> - <artifactId>assertj-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.extension.mockito</groupId> - <artifactId>camunda-bpm-mockito</artifactId> - </dependency> - </dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-configuration-processor</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + </dependency> + <dependency> + <groupId>ch.vorburger.mariaDB4j</groupId> + <artifactId>mariaDB4j</artifactId> + <version>2.2.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCommonBPMN</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter-test</artifactId> + <version>${camunda.springboot.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.extension.mockito</groupId> + <artifactId>camunda-bpm-mockito</artifactId> + </dependency> + </dependencies> </project> 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 65fa0511ac..3e059e53bf 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 @@ -29,6 +29,10 @@ import org.json.JSONObject import org.json.XML import org.onap.aai.domain.yang.ServiceInstance import org.onap.aai.domain.yang.ServiceInstances +import org.onap.aai.domain.yang.v13.Metadata +import org.onap.aai.domain.yang.v13.Metadatum +import org.onap.aai.domain.yang.v13.Pnf +import org.onap.aai.domain.yang.v13.Pnfs import org.onap.so.bpmn.common.recipe.ResourceInput import org.onap.so.bpmn.common.resource.ResourceRequestBuilder import org.onap.so.bpmn.common.scripts.AaiUtil @@ -39,6 +43,7 @@ import org.onap.so.bpmn.core.json.JsonUtils import org.onap.so.bpmn.core.UrnPropertiesReader import org.onap.so.client.aai.AAIObjectPlurals import org.onap.so.client.aai.AAIResourcesClient +import org.onap.so.client.aai.AAIObjectType import org.onap.so.client.aai.entities.uri.AAIResourceUri import org.onap.so.client.aai.entities.uri.AAIUriFactory import org.slf4j.Logger @@ -147,6 +152,16 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { execution.setVariable("isActivateRequired", "true") break + case ~/[\w\s\W]*OLT[\w\s\W]*/ : + operationType = "AccessConnectivity" + execution.setVariable("isActivateRequired", "false") + break + + case ~/[\w\s\W]*EdgeInternetProfile[\w\s\W]*/ : + operationType = "InternetProfile" + execution.setVariable("isActivateRequired", "false") + break + default: break } @@ -183,6 +198,20 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { return new JSONObject(paramMap).toString(); } + private List<Metadatum> getMetaDatum(String customerId, + String serviceType, String serId) { + logger.debug("Enter getPnfInstance") + AAIResourcesClient client = new AAIResourcesClient() + + // think how AAI queried for PNF name using the name + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE_METADATA, + customerId, serviceType, serId) + logger.debug("uri for pnf get:" + uri.toString()) + + Metadata metadata = client.get(uri).asBean(Metadata.class).get() + return metadata.getMetadatum() + } + /** * This method updates the resource input by collecting required info from AAI * @param execution @@ -191,7 +220,66 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { ResourceInput resourceInputObj = ResourceRequestBuilder.getJsonObject(execution.getVariable(Prefix + "resourceInput"), ResourceInput.class) String modelName = resourceInputObj.getResourceModelInfo().getModelName() + + def resourceInputTmp = execution.getVariable(Prefix + "resourceInput") + String serInput = jsonUtil.getJsonValue(resourceInputTmp, "requestsInputs") + switch (modelName) { + case ~/[\w\s\W]*OLT[\w\s\W]*/ : + // get the required properties and update in resource input + + def resourceInput = resourceInputObj.getResourceParameters() + String incomingRequest = resourceInputObj.getRequestsInputs() + String serviceParameters = JsonUtils.getJsonValue(incomingRequest, "service.parameters") + String requestInputs = JsonUtils.getJsonValue(serviceParameters, "requestInputs") + String cvlan = "10" + String svlan = "100" + String accessId = "AC9.0234.0337" + String manufacturer = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.ont_ont_manufacturer") + String ontsn = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.ont_ont_serial_num") + + String uResourceInput = jsonUtil.addJsonValue(resourceInput, "requestInputs.CVLAN", cvlan) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.SVLAN", svlan) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.accessID", accessId) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.manufacturer", manufacturer) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ONTSN", ontsn) + + msoLogger.debug("old resource input:" + resourceInputObj.toString()) + resourceInputObj.setResourceParameters(uResourceInput) + execution.setVariable(Prefix + "resourceInput", resourceInputObj.toString()) + msoLogger.debug("new resource Input :" + resourceInputObj.toString()) + break + + case ~/[\w\s\W]*EdgeInternetProfile[\w\s\W]*/ : + // get the required properties and update in resource input + def resourceInput = resourceInputObj.getResourceParameters() + String incomingRequest = resourceInputObj.getRequestsInputs() + String serviceParameters = JsonUtils.getJsonValue(incomingRequest, "service.parameters") + String requestInputs = JsonUtils.getJsonValue(serviceParameters, "requestInputs") + JSONObject inputParameters = new JSONObject(requestInputs) + + String cvlan = "100" + String svlan = "1000" + String manufacturer = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.ont_ont_manufacturer") + String accessId = "AC9.0234.0337" + String ontsn = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.ont_ont_serial_num") + + String uResourceInput = jsonUtil.addJsonValue(resourceInput, "requestInputs.c_vlan", cvlan) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.s_vlan", svlan) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.manufacturer", manufacturer) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_access_id", accessId) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ont_sn", ontsn) + msoLogger.debug("old resource input:" + resourceInputObj.toString()) + resourceInputObj.setResourceParameters(uResourceInput) + execution.setVariable(Prefix + "resourceInput", resourceInputObj.toString()) + msoLogger.debug("new resource Input :" + resourceInputObj.toString()) + break + + case ~/[\w\s\W]*SOTNConnectivity[\w\s\W]*/: def resourceInput = resourceInputObj.getResourceParameters() diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy new file mode 100644 index 0000000000..90c2b923b0 --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy @@ -0,0 +1,84 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 - 2019 Huawei Intellectual Property. All rights reserved. + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============LICENSE_END========================================================= + */ + +package org.onap.so.bpmn.infrastructure.scripts + +import org.apache.commons.lang3.StringUtils +import org.camunda.bpm.engine.delegate.DelegateExecution +import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor +import org.onap.so.bpmn.common.scripts.CatalogDbUtils +import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.core.json.JsonUtils +import org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +public class HandlePNF extends AbstractServiceTaskProcessor{ + private static final Logger logger = LoggerFactory.getLogger( HandlePNF.class); + + ExceptionUtil exceptionUtil = new ExceptionUtil() + JsonUtils jsonUtil = new JsonUtils() + CatalogDbUtils cutils = new CatalogDbUtils() + + @Override + void preProcessRequest(DelegateExecution execution) { + msoLogger.debug("Start preProcess for HandlePNF") + + // set correlation ID + def resourceInput = execution.getVariable("resourceInput") + String serInput = jsonUtil.getJsonValue(resourceInput, "requestsInputs") + String correlationId = jsonUtil.getJsonValue(serInput, "service.parameters.requestInputs.ont_ont_pnf_name") + if (!StringUtils.isEmpty(correlationId)) { + execution.setVariable(ExecutionVariableNames.CORRELATION_ID, correlationId) + msoLogger.debug("Found correlation id : " + correlationId) + } else { + msoLogger.error("== correlation id is empty ==") + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "correlation id is not provided") + } + + // next task will set the uuid + msoLogger.debug("exit preProcess for HandlePNF") + } + + void postProcessRequest(DelegateExecution execution) { + msoLogger.debug("start postProcess for HandlePNF") + + msoLogger.debug("exit postProcess for HandlePNF") + } + + public void sendSyncResponse (DelegateExecution execution) { + msoLogger.debug(" *** sendSyncResponse *** ") + + try { + String operationStatus = "finished" + // RESTResponse for main flow + String resourceOperationResp = """{"operationStatus":"${operationStatus}"}""".trim() + msoLogger.debug(" sendSyncResponse to APIH:" + "\n" + resourceOperationResp) + sendWorkflowResponse(execution, 202, resourceOperationResp) + execution.setVariable("sentSyncResponse", true) + + } catch (Exception ex) { + String msg = "Exception in sendSyncResponse:" + ex.getMessage() + msoLogger.debug(msg) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + msoLogger.debug(" ***** Exit sendSyncResponse *****") + } +} diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/PnfNotificationEvent.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/PnfNotificationEvent.java deleted file mode 100644 index 267ddbf6a7..0000000000 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/PnfNotificationEvent.java +++ /dev/null @@ -1,42 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. - * ================================================================================ - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - * ============LICENSE_END========================================================= - */ - -package org.onap.so.bpmn.infrastructure.pnf; - -import org.springframework.context.ApplicationEvent; - -public class PnfNotificationEvent extends ApplicationEvent { - - private String pnfCorrelationId; - - /** - * Create a new ApplicationEvent. - * - * @param source the object on which the event initially occurred (never {@code null}) - */ - public PnfNotificationEvent(Object source, String pnfCorrelationId) { - super(source); - this.pnfCorrelationId = pnfCorrelationId; - } - - public String getPnfCorrelationId() { - return pnfCorrelationId; - } -} diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java index e2dc375cd1..94ceddae97 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClient.java @@ -23,40 +23,30 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate; import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.engine.delegate.DelegateExecution; import org.camunda.bpm.engine.delegate.JavaDelegate; -import org.onap.so.bpmn.infrastructure.pnf.PnfNotificationEvent; +import org.camunda.bpm.engine.runtime.Execution; import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationListener; import org.springframework.stereotype.Component; @Component -public class InformDmaapClient implements JavaDelegate, ApplicationListener<PnfNotificationEvent> { +public class InformDmaapClient implements JavaDelegate { private Logger logger = LoggerFactory.getLogger(getClass()); private DmaapClient dmaapClient; - private DelegateExecution execution; @Override public void execute(DelegateExecution execution) { String pnfCorrelationId = (String) execution.getVariable(ExecutionVariableNames.PNF_CORRELATION_ID); RuntimeService runtimeService = execution.getProcessEngineServices().getRuntimeService(); + String processBusinessKey = execution.getProcessBusinessKey(); dmaapClient.registerForUpdate(pnfCorrelationId, () -> runtimeService.createMessageCorrelation("WorkflowMessage") - .processInstanceBusinessKey(execution.getProcessBusinessKey()).correlateWithResult()); - this.execution = execution; + .processInstanceBusinessKey(processBusinessKey).correlateWithResult()); } @Autowired public void setDmaapClient(DmaapClient dmaapClient) { this.dmaapClient = dmaapClient; } - - @Override - public void onApplicationEvent(PnfNotificationEvent event) { - logger.info("Received application event for pnfCorrelationId: {}", event.getPnfCorrelationId()); - RuntimeService runtimeService = execution.getProcessEngineServices().getRuntimeService(); - runtimeService.createMessageCorrelation("WorkflowMessage") - .processInstanceBusinessKey(execution.getProcessBusinessKey()).correlateWithResult(); - } } diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java index 2869111485..96562fe90f 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java +++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java @@ -35,11 +35,9 @@ import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.util.EntityUtils; -import org.onap.so.bpmn.infrastructure.pnf.PnfNotificationEvent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.ApplicationEventPublisher; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; @@ -55,11 +53,8 @@ public class PnfEventReadyDmaapClient implements DmaapClient { private volatile ScheduledThreadPoolExecutor executor; private volatile boolean dmaapThreadListenerIsRunning; - private ApplicationEventPublisher applicationEventPublisher; - @Autowired - public PnfEventReadyDmaapClient(Environment env, ApplicationEventPublisher applicationEventPublisher) { - this.applicationEventPublisher = applicationEventPublisher; + public PnfEventReadyDmaapClient(Environment env) { httpClient = HttpClientBuilder.create().build(); pnfCorrelationIdToThreadMap = new ConcurrentHashMap<>(); topicListenerDelayInSeconds = env.getProperty("pnf.dmaap.topicListenerDelayInSeconds", Integer.class); @@ -135,9 +130,11 @@ public class PnfEventReadyDmaapClient implements DmaapClient { } private void informAboutPnfReadyIfPnfCorrelationIdFound(String pnfCorrelationId) { - unregister(pnfCorrelationId); - PnfNotificationEvent pnfNotificationEvent = new PnfNotificationEvent(this, pnfCorrelationId); - applicationEventPublisher.publishEvent(pnfNotificationEvent); + Runnable runnable = unregister(pnfCorrelationId); + if (runnable != null) { + logger.debug("dmaap listener gets pnf ready event for pnfCorrelationId: {}", pnfCorrelationId); + runnable.run(); + } } } } diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java index c67b44e44a..e755214362 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CancelDmaapSubscriptionTest.java @@ -20,15 +20,17 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate; -import org.camunda.bpm.engine.delegate.DelegateExecution; -import org.junit.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +import org.camunda.bpm.engine.delegate.DelegateExecution; +import org.junit.Test; public class CancelDmaapSubscriptionTest { + private static final String TEST_PNF_CORRELATION_ID = "testPnfCorrelationId"; + @Test public void shouldCancelSubscription() throws Exception { // given @@ -37,7 +39,7 @@ public class CancelDmaapSubscriptionTest { delegate.setDmaapClient(dmaapClientTest); DelegateExecution delegateExecution = mock(DelegateExecution.class); when(delegateExecution.getVariable(eq(ExecutionVariableNames.PNF_CORRELATION_ID))) - .thenReturn("testPnfCorrelationId"); + .thenReturn(TEST_PNF_CORRELATION_ID); when(delegateExecution.getProcessBusinessKey()).thenReturn("testBusinessKey"); dmaapClientTest.registerForUpdate("testPnfCorrelationId", () -> { }); diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java index 96c3db0ccc..df060ed014 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/InformDmaapClientTest.java @@ -20,6 +20,13 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.inOrder; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.when; import org.camunda.bpm.engine.ProcessEngineServices; import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.engine.delegate.DelegateExecution; @@ -27,14 +34,8 @@ import org.camunda.bpm.engine.runtime.MessageCorrelationBuilder; import org.junit.Before; import org.junit.Test; import org.mockito.InOrder; -import org.onap.so.bpmn.infrastructure.pnf.PnfNotificationEvent; -import static org.assertj.core.api.Assertions.assertThat; -import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.eq; -import static org.mockito.Mockito.*; public class InformDmaapClientTest { - @Before public void setUp() throws Exception { informDmaapClient = new InformDmaapClient(); @@ -73,19 +74,6 @@ public class InformDmaapClientTest { inOrder.verify(messageCorrelationBuilder).correlateWithResult(); } - @Test - public void onApplicationEvent_validPnfNotificationEvent_expectedOutput() { - - PnfNotificationEvent pnfNotificationEvent = new PnfNotificationEvent(this, "testPnfCorrelationId"); - - informDmaapClient.execute(delegateExecution); - informDmaapClient.onApplicationEvent(pnfNotificationEvent); - - InOrder inOrder = inOrder(messageCorrelationBuilder); - inOrder.verify(messageCorrelationBuilder).processInstanceBusinessKey("testBusinessKey"); - inOrder.verify(messageCorrelationBuilder).correlateWithResult(); - } - private DelegateExecution mockDelegateExecution() { DelegateExecution delegateExecution = mock(DelegateExecution.class); when(delegateExecution.getVariable(eq(ExecutionVariableNames.PNF_CORRELATION_ID))) diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java index 9f31e2a5df..19e08d9d59 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java +++ b/bpmn/so-bpmn-infrastructure-common/src/test/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClientTest.java @@ -23,12 +23,10 @@ package org.onap.so.bpmn.infrastructure.pnf.dmaap; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; import static org.mockito.ArgumentMatchers.any; -import static org.mockito.ArgumentMatchers.anyObject; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyZeroInteractions; import static org.mockito.Mockito.when; @@ -49,12 +47,9 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.ArgumentCaptor; -import org.mockito.InjectMocks; import org.mockito.Mock; import org.mockito.junit.MockitoJUnitRunner; -import org.onap.so.bpmn.infrastructure.pnf.PnfNotificationEvent; import org.onap.so.bpmn.infrastructure.pnf.dmaap.PnfEventReadyDmaapClient.DmaapTopicListenerThread; -import org.springframework.context.ApplicationEventPublisher; import org.springframework.core.env.Environment; @RunWith(MockitoJUnitRunner.class) @@ -85,9 +80,6 @@ public class PnfEventReadyDmaapClientTest { private Runnable threadMockToNotifyCamundaFlow; private ScheduledThreadPoolExecutor executorMock; - @Mock - private ApplicationEventPublisher applicationEventPublisher; - @Before public void init() throws NoSuchFieldException, IllegalAccessException { when(env.getProperty(eq("pnf.dmaap.port"), eq(Integer.class))).thenReturn(PORT); @@ -99,7 +91,7 @@ public class PnfEventReadyDmaapClientTest { when(env.getProperty(eq("pnf.dmaap.consumerGroup"))).thenReturn(CONSUMER_GROUP); when(env.getProperty(eq("pnf.dmaap.topicListenerDelayInSeconds"), eq(Integer.class))) .thenReturn(TOPIC_LISTENER_DELAY_IN_SECONDS); - testedObject = new PnfEventReadyDmaapClient(env, applicationEventPublisher); + testedObject = new PnfEventReadyDmaapClient(env); testedObjectInnerClassThread = testedObject.new DmaapTopicListenerThread(); httpClientMock = mock(HttpClient.class); threadMockToNotifyCamundaFlow = mock(Runnable.class); @@ -131,10 +123,7 @@ public class PnfEventReadyDmaapClientTest { assertEquals(captor1.getValue().getURI().getPath(), "/" + URI_PATH_PREFIX + "/" + EVENT_TOPIC_TEST + "/" + CONSUMER_GROUP + "/" + CONSUMER_ID + ""); - /** - * Two PNF returned from HTTP request. - */ - verify(applicationEventPublisher, times(2)).publishEvent(any(PnfNotificationEvent.class)); + verify(threadMockToNotifyCamundaFlow).run(); verify(executorMock).shutdown(); } diff --git a/bpmn/so-bpmn-infrastructure-flows/pom.xml b/bpmn/so-bpmn-infrastructure-flows/pom.xml index ce7f0d9148..d0c16fc1cc 100644 --- a/bpmn/so-bpmn-infrastructure-flows/pom.xml +++ b/bpmn/so-bpmn-infrastructure-flows/pom.xml @@ -1,321 +1,322 @@ <?xml version="1.0"?> -<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"> - <parent> - <groupId>org.onap.so</groupId> - <artifactId>bpmn</artifactId> - <version>1.4.0-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - <artifactId>so-bpmn-infrastructure-flows</artifactId> - <packaging>jar</packaging> +<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"> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>bpmn</artifactId> + <version>1.4.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>so-bpmn-infrastructure-flows</artifactId> + <packaging>jar</packaging> - <properties> - <camunda.bpm.assert.version>2.0-alpha2</camunda.bpm.assert.version> - <assertj.core.version>1.7.0</assertj.core.version> - <grpc.version>1.17.1</grpc.version> - <camunda.mockito.version>3.2.1</camunda.mockito.version> - </properties> + <properties> + <camunda.bpm.assert.version>2.0-alpha2</camunda.bpm.assert.version> + <assertj.core.version>1.7.0</assertj.core.version> + <grpc.version>1.17.1</grpc.version> + <camunda.mockito.version>3.2.1</camunda.mockito.version> + </properties> - <build> - <plugins> - <plugin> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-codegen-plugin</artifactId> - <version>2.5.2</version> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - </plugin> - <plugin> - <artifactId>maven-failsafe-plugin</artifactId> - <version>2.6</version> - <executions> - <execution> - <goals> - <goal>integration-test</goal> - <goal>verify</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - <pluginManagement> - <plugins> - <!--This plugin's configuration is used to store Eclipse m2e settings + <build> + <plugins> + <plugin> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-codegen-plugin</artifactId> + <version>2.5.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + <plugin> + <artifactId>maven-failsafe-plugin</artifactId> + <version>2.6</version> + <executions> + <execution> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + <pluginManagement> + <plugins> + <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId> org.apache.maven.plugins </groupId> - <artifactId> + <artifactId> maven-antrun-plugin </artifactId> - <versionRange> + <versionRange> [1.3,) </versionRange> - <goals> - <goal>run</goal> - </goals> - </pluginExecutionFilter> - <action> - <ignore/> - </action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <executions> - <execution> - <id>default-test</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/AllTestsTestSuite.java</include> - </includes> - </configuration> - </execution> - <execution> - <id>tasks-test</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/AllTasksTestsTestSuite.java</include> - </includes> - </configuration> - </execution> - <execution> - <id>bpmn-test</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/AllBPMNTestSuites.java</include> - </includes> - </configuration> - </execution> - </executions> - <configuration> - <parallel>suites</parallel> - </configuration> - </plugin> - </plugins> - </pluginManagement> - <finalName>${project.artifactId}-${project.version}</finalName> - </build> + <goals> + <goal>run</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore /> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <executions> + <execution> + <id>default-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/AllTestsTestSuite.java</include> + </includes> + </configuration> + </execution> + <execution> + <id>tasks-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/AllTasksTestsTestSuite.java</include> + </includes> + </configuration> + </execution> + <execution> + <id>bpmn-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/AllBPMNTestSuites.java</include> + </includes> + </configuration> + </execution> + </executions> + <configuration> + <parallel>suites</parallel> + </configuration> + </plugin> + </plugins> + </pluginManagement> + <finalName>${project.artifactId}-${project.version}</finalName> + </build> - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.camunda.bpm</groupId> - <artifactId>camunda-bom</artifactId> - <version>${camunda.version}</version> - <scope>import</scope> - <type>pom</type> - </dependency> - </dependencies> - </dependencyManagement> + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-bom</artifactId> + <version>${camunda.version}</version> + <scope>import</scope> + <type>pom</type> + </dependency> + </dependencies> + </dependencyManagement> - <dependencies> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter</artifactId> - <version>${camunda.springboot.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId> - <version>${camunda.springboot.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.extension.mockito</groupId> - <artifactId>camunda-bpm-mockito</artifactId> - <version>${camunda.mockito.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-web</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-data-jpa</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-spring-boot-starter-jaxws</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-spring-boot-starter-jaxrs</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cxf</groupId> - <artifactId>cxf-rt-rs-service-description-swagger</artifactId> - <version>${cxf.version}</version> - </dependency> - <dependency> - <groupId>com.h2database</groupId> - <artifactId>h2</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <version>1.10.19</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.fasterxml.uuid</groupId> - <artifactId>java-uuid-generator</artifactId> - </dependency> - <dependency> - <groupId>org.codehaus.groovy</groupId> - <artifactId>groovy-all</artifactId> - </dependency> - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - <version>3.4</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCoreBPMN</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCoreBPMN</artifactId> - <version>${project.version}</version> - <classifier>tests</classifier> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCommonBPMN</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCommonBPMN</artifactId> - <version>${project.version}</version> - <classifier>tests</classifier> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>so-bpmn-building-blocks</artifactId> - <version>${project.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>javax.ws.rs</groupId> - <artifactId>javax.ws.rs-api</artifactId> - <version>${jax.ws.rs}</version> - </dependency> - <dependency> - <groupId>org.camunda.spin</groupId> - <artifactId>camunda-spin-core</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.spin</groupId> - <artifactId>camunda-spin-dataformat-all</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <artifactId>camunda-spin-dataformat-all</artifactId> - <groupId>org.camunda.spin</groupId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm</groupId> - <artifactId>camunda-engine-plugin-spin</artifactId> - </dependency> + <dependencies> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter</artifactId> + <version>${camunda.springboot.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId> + <version>${camunda.springboot.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.extension.mockito</groupId> + <artifactId>camunda-bpm-mockito</artifactId> + <version>${camunda.mockito.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-spring-boot-starter-jaxws</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-spring-boot-starter-jaxrs</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-rs-service-description-swagger</artifactId> + <version>${cxf.version}</version> + </dependency> + <dependency> + <groupId>com.h2database</groupId> + <artifactId>h2</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>1.10.19</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.fasterxml.uuid</groupId> + <artifactId>java-uuid-generator</artifactId> + </dependency> + <dependency> + <groupId>org.codehaus.groovy</groupId> + <artifactId>groovy-all</artifactId> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + <version>3.4</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCoreBPMN</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCoreBPMN</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCommonBPMN</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCommonBPMN</artifactId> + <version>${project.version}</version> + <classifier>tests</classifier> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-building-blocks</artifactId> + <version>${project.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>javax.ws.rs</groupId> + <artifactId>javax.ws.rs-api</artifactId> + <version>${jax.ws.rs}</version> + </dependency> + <dependency> + <groupId>org.camunda.spin</groupId> + <artifactId>camunda-spin-core</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.spin</groupId> + <artifactId>camunda-spin-dataformat-all</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <artifactId>camunda-spin-dataformat-all</artifactId> + <groupId>org.camunda.spin</groupId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-engine-plugin-spin</artifactId> + </dependency> - <dependency> - <groupId>org.camunda.bpm</groupId> - <artifactId>camunda-engine-plugin-connect</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.extension</groupId> - <artifactId>camunda-bpm-assert</artifactId> - <version>${camunda.bpm.assert.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.assertj</groupId> - <artifactId>assertj-core</artifactId> - <version>${assertj.core.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>javax.annotation</groupId> - <artifactId>javax.annotation-api</artifactId> - <version>1.3</version> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-configuration-processor</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - </dependency> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-core</artifactId> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </dependency> - <dependency> - <groupId>org.mariadb.jdbc</groupId> - <artifactId>mariadb-java-client</artifactId> - </dependency> - <dependency> - <groupId>ch.vorburger.mariaDB4j</groupId> - <artifactId>mariaDB4j</artifactId> - <version>2.2.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>io.grpc</groupId> - <artifactId>grpc-testing</artifactId> - <version>${grpc.version}</version> - <scope>test</scope> - </dependency> + <dependency> + <groupId>org.camunda.bpm</groupId> + <artifactId>camunda-engine-plugin-connect</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.extension</groupId> + <artifactId>camunda-bpm-assert</artifactId> + <version>${camunda.bpm.assert.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>${assertj.core.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>javax.annotation</groupId> + <artifactId>javax.annotation-api</artifactId> + <version>1.3</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-configuration-processor</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-core</artifactId> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </dependency> + <dependency> + <groupId>org.mariadb.jdbc</groupId> + <artifactId>mariadb-java-client</artifactId> + </dependency> + <dependency> + <groupId>ch.vorburger.mariaDB4j</groupId> + <artifactId>mariaDB4j</artifactId> + <version>2.2.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>io.grpc</groupId> + <artifactId>grpc-testing</artifactId> + <version>${grpc.version}</version> + <scope>test</scope> + </dependency> - </dependencies> + </dependencies> </project> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/HandlePNF.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/HandlePNF.bpmn new file mode 100644 index 0000000000..c81b289737 --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/HandlePNF.bpmn @@ -0,0 +1,119 @@ +<?xml version="1.0" encoding="UTF-8"?> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.16.2"> + <bpmn:process id="HandlePNF" name="HandlePNF" isExecutable="true"> + <bpmn:startEvent id="createNS_StartEvent_pnf_disc" name="start PNF handling"> + <bpmn:outgoing>SequenceFlow_1c92ks3_activate</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:scriptTask id="Task_13sx2bp_activate" name="Pre Process Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1c92ks3_activate</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_17xr584</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_12q67gd</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def handlePNF = new HandlePNF() +handlePNF.preProcessRequest(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_1c92ks3_activate" sourceRef="createNS_StartEvent_pnf_disc" targetRef="Task_13sx2bp_activate" /> + <bpmn:sequenceFlow id="SequenceFlow_17xr584" sourceRef="Task_13sx2bp_activate" targetRef="Task_0kv28gm" /> + <bpmn:sequenceFlow id="SequenceFlow_0pujwl4" sourceRef="Task_0657l04" targetRef="PostProcessPNFDiscovery" /> + <bpmn:endEvent id="EndEvent_0pigsdfk3" name="end PNF hadler"> + <bpmn:incoming>SequenceFlow_02fi1yn</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1la8oih" sourceRef="PostProcessPNFDiscovery" targetRef="Task_1r8h7of" /> + <bpmn:callActivity id="Task_0657l04" name="invoke pnf handler" calledElement="CreateAndActivatePnfResource"> + <bpmn:extensionElements> + <camunda:in source="correlationId" target="correlationId" /> + <camunda:in source="pnfUuid" target="pnfUuid" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_1apj1fn</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0pujwl4</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:scriptTask id="PostProcessPNFDiscovery" name="Post Process Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0pujwl4</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1la8oih</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1ezf4gu</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def handlePNF = new HandlePNF() +handlePNF.postProcessRequest(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_12q67gd" sourceRef="Task_13sx2bp_activate" targetRef="Task_0kv28gm" /> + <bpmn:sequenceFlow id="SequenceFlow_1apj1fn" sourceRef="Task_0kv28gm" targetRef="Task_0657l04" /> + <bpmn:serviceTask id="Task_0kv28gm" name="Generate PNF uuid" camunda:delegateExpression="${GeneratePnfUuidDelegate}"> + <bpmn:incoming>SequenceFlow_12q67gd</bpmn:incoming> + <bpmn:incoming>SequenceFlow_17xr584</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1apj1fn</bpmn:outgoing> + </bpmn:serviceTask> + <bpmn:sequenceFlow id="SequenceFlow_1ezf4gu" sourceRef="PostProcessPNFDiscovery" targetRef="Task_1r8h7of" /> + <bpmn:sequenceFlow id="SequenceFlow_02fi1yn" sourceRef="Task_1r8h7of" targetRef="EndEvent_0pigsdfk3" /> + <bpmn:scriptTask id="Task_1r8h7of" name="Send Sync Response" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1ezf4gu</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1la8oih</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_02fi1yn</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def handlePNF = new HandlePNF() +handlePNF.sendSyncResponse(execution)</bpmn:script> + </bpmn:scriptTask> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="HandlePNF"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createNS_StartEvent_pnf_disc"> + <dc:Bounds x="-464" y="306" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="-466" y="352" width="47" height="27" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_14l9mlv_di" bpmnElement="Task_13sx2bp_activate"> + <dc:Bounds x="-341" y="284" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1c92ks3_di" bpmnElement="SequenceFlow_1c92ks3_activate"> + <di:waypoint x="-428" y="324" /> + <di:waypoint x="-341" y="324" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_17xr584_di" bpmnElement="SequenceFlow_17xr584"> + <di:waypoint x="-241" y="324" /> + <di:waypoint x="-180" y="324" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0pujwl4_di" bpmnElement="SequenceFlow_0pujwl4"> + <di:waypoint x="81" y="324" /> + <di:waypoint x="156" y="324" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_0pigdk3_di" bpmnElement="EndEvent_0pigsdfk3"> + <dc:Bounds x="543" y="306" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="524" y="349" width="78" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1la8oih_di" bpmnElement="SequenceFlow_1la8oih"> + <di:waypoint x="256" y="324" /> + <di:waypoint x="353" y="324" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1sxp6qj_di" bpmnElement="Task_0657l04"> + <dc:Bounds x="-19" y="284" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0qqb00i_di" bpmnElement="PostProcessPNFDiscovery"> + <dc:Bounds x="156" y="284" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_12q67gd_di" bpmnElement="SequenceFlow_12q67gd"> + <di:waypoint x="-241" y="324" /> + <di:waypoint x="-180" y="324" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1apj1fn_di" bpmnElement="SequenceFlow_1apj1fn"> + <di:waypoint x="-80" y="324" /> + <di:waypoint x="-19" y="324" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ServiceTask_1y3h50n_di" bpmnElement="Task_0kv28gm"> + <dc:Bounds x="-180" y="284" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1ezf4gu_di" bpmnElement="SequenceFlow_1ezf4gu"> + <di:waypoint x="256" y="324" /> + <di:waypoint x="353" y="324" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_02fi1yn_di" bpmnElement="SequenceFlow_02fi1yn"> + <di:waypoint x="453" y="324" /> + <di:waypoint x="543" y="324" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1yqlrg7_di" bpmnElement="Task_1r8h7of"> + <dc:Bounds x="353" y="284" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java index b0517ace3d..f51ea006d2 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java +++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java @@ -36,6 +36,7 @@ import java.util.UUID; import org.camunda.bpm.engine.runtime.Execution; import org.camunda.bpm.engine.runtime.ProcessInstance; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers; import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader; @@ -51,8 +52,10 @@ import org.springframework.beans.factory.annotation.Autowired; /** * Basic Integration test for createVcpeResCustService_Simplified.bpmn workflow. */ +@Ignore public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { + private static final long WORKFLOW_WAIT_TIME = 1000L; private Logger logger = LoggerFactory.getLogger(getClass()); private static final String TEST_PROCESSINSTANCE_KEY = "CreateVcpeResCustService_simplified"; @@ -101,7 +104,7 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { } @Test - public void workflow_validInput_expectedOuput() { + public void workflow_validInput_expectedOuput() throws InterruptedException { mockCatalogDb(); mockRequestDb(); @@ -112,26 +115,25 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { runtimeService.startProcessInstanceByKey(TEST_PROCESSINSTANCE_KEY, testBusinessKey, variables); assertThat(pi).isNotNull(); - Execution execution = runtimeService.createExecutionQuery().processDefinitionKey("CreateAndActivatePnfResource") - .activityId("WaitForDmaapPnfReadyNotification").singleResult(); + Thread.sleep(WORKFLOW_WAIT_TIME); - if (!execution.isSuspended() && !execution.isEnded()) { - try { + Execution execution = runtimeService.createExecutionQuery().processInstanceBusinessKey(testBusinessKey) + .messageEventSubscriptionName("WorkflowMessage").singleResult(); - runtimeService.signal(execution.getId()); - } catch (Exception e) { - logger.info(e.getMessage(), e); - } + assertThat(execution).isNotNull(); + + int waitCount = 10; + while (!pi.isEnded() && waitCount >= 0) { + Thread.sleep(WORKFLOW_WAIT_TIME); + waitCount--; } - assertThat(pi).isStarted().hasPassedInOrder("createVCPE_startEvent", "preProcessRequest_ScriptTask", + assertThat(pi).isEnded().hasPassedInOrder("createVCPE_startEvent", "preProcessRequest_ScriptTask", "sendSyncAckResponse_ScriptTask", "ScriptTask_0cdtchu", "DecomposeService", "ScriptTask_0lpv2da", "ScriptTask_1y241p8", "CallActivity_1vc4jeh", "ScriptTask_1y5lvl7", "GeneratePnfUuid", "Task_14l19kv", "Pnf_Con", "setPONR_ScriptTask", "postProcessAndCompletionRequest_ScriptTask", "callCompleteMsoProcess_CallActivity", "ScriptTask_2", "CreateVCPE_EndEvent"); - assertThat(pi).isEnded(); - List<ExecutionServiceInput> detailedMessages = grpcNettyServer.getDetailedMessages(); assertThat(detailedMessages).hasSize(2); try { @@ -144,6 +146,8 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { } private void checkConfigAssign(ExecutionServiceInput executionServiceInput) { + + logger.info("Checking the configAssign request"); ActionIdentifiers actionIdentifiers = executionServiceInput.getActionIdentifiers(); /** @@ -173,6 +177,8 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest { } private void checkConfigDeploy(ExecutionServiceInput executionServiceInput) { + + logger.info("Checking the configDeploy request"); ActionIdentifiers actionIdentifiers = executionServiceInput.getActionIdentifiers(); /** diff --git a/bpmn/so-bpmn-tasks/pom.xml b/bpmn/so-bpmn-tasks/pom.xml index 42073ed08a..bf129dfc56 100644 --- a/bpmn/so-bpmn-tasks/pom.xml +++ b/bpmn/so-bpmn-tasks/pom.xml @@ -1,169 +1,169 @@ <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"> - <parent> - <groupId>org.onap.so</groupId> - <artifactId>bpmn</artifactId> - <version>1.4.0-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - <artifactId>so-bpmn-tasks</artifactId> - <packaging>jar</packaging> - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> - <maven.compiler.target>1.8</maven.compiler.target> - <maven.compiler.source>1.8</maven.compiler.source> - </properties> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <executions> - <execution> - <id>default-test</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/UnitTestSuite.java</include> - </includes> - </configuration> - </execution> - <execution> - <id>integration-test</id> - <goals> - <goal>test</goal> - </goals> - <configuration> - <includes> - <include>**/IntegrationTestSuite.java</include> - </includes> - </configuration> - </execution> - </executions> - <configuration> - <parallel>suites</parallel> - </configuration> - </plugin> - <plugin> - <groupId>io.swagger</groupId> - <artifactId>swagger-codegen-maven-plugin</artifactId> - <version>2.3.1</version> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - <configuration> - <inputSpec>${project.basedir}/src/main/resources/naming-service/swagger.json</inputSpec> - <apiPackage>org.onap.namingservice.api</apiPackage> - <modelPackage>org.onap.namingservice.model</modelPackage> - <invokerPackage>org.onap.namingservice.invoker</invokerPackage> - </configuration> - </execution> - </executions> - <configuration> - <inputSpec>${project.basedir}/src/main/resources/swagger.json</inputSpec> - <language>java</language> - <configOptions> - <sourceFolder>src/gen/java/main</sourceFolder> - <serializableModel>true</serializableModel> - </configOptions> - <output>${project.build.directory}/generated-sources</output> - <generateApis>false</generateApis> - <library>jersey2</library> - <generateSupportingFiles>false</generateSupportingFiles> - </configuration> - </plugin> - </plugins> - </build> - <dependencyManagement> - <dependencies> - <dependency> - <!-- Import dependency management from Spring Boot --> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-dependencies</artifactId> - <version>${springboot.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <parent> + <groupId>org.onap.so</groupId> + <artifactId>bpmn</artifactId> + <version>1.4.0-SNAPSHOT</version> + </parent> + <modelVersion>4.0.0</modelVersion> + <artifactId>so-bpmn-tasks</artifactId> + <packaging>jar</packaging> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <maven.compiler.target>1.8</maven.compiler.target> + <maven.compiler.source>1.8</maven.compiler.source> + </properties> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <executions> + <execution> + <id>default-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/UnitTestSuite.java</include> + </includes> + </configuration> + </execution> + <execution> + <id>integration-test</id> + <goals> + <goal>test</goal> + </goals> + <configuration> + <includes> + <include>**/IntegrationTestSuite.java</include> + </includes> + </configuration> + </execution> + </executions> + <configuration> + <parallel>suites</parallel> + </configuration> + </plugin> + <plugin> + <groupId>io.swagger</groupId> + <artifactId>swagger-codegen-maven-plugin</artifactId> + <version>2.3.1</version> + <executions> + <execution> + <goals> + <goal>generate</goal> + </goals> + <configuration> + <inputSpec>${project.basedir}/src/main/resources/naming-service/swagger.json</inputSpec> + <apiPackage>org.onap.namingservice.api</apiPackage> + <modelPackage>org.onap.namingservice.model</modelPackage> + <invokerPackage>org.onap.namingservice.invoker</invokerPackage> + </configuration> + </execution> + </executions> + <configuration> + <inputSpec>${project.basedir}/src/main/resources/swagger.json</inputSpec> + <language>java</language> + <configOptions> + <sourceFolder>src/gen/java/main</sourceFolder> + <serializableModel>true</serializableModel> + </configOptions> + <output>${project.build.directory}/generated-sources</output> + <generateApis>false</generateApis> + <library>jersey2</library> + <generateSupportingFiles>false</generateSupportingFiles> + </configuration> + </plugin> + </plugins> + </build> + <dependencyManagement> <dependencies> - <dependency> - <groupId>org.camunda.bpm.springboot</groupId> - <artifactId>camunda-bpm-spring-boot-starter</artifactId> - <version>${camunda.springboot.version}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework.cloud</groupId> - <artifactId>spring-cloud-contract-wiremock</artifactId> - <version>1.2.4.RELEASE</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-starter-test</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.camunda.bpm.extension.mockito</groupId> - <artifactId>camunda-bpm-mockito</artifactId> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>MSOCommonBPMN</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so</groupId> - <artifactId>so-bpmn-infrastructure-common</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.so.adapters</groupId> - <artifactId>mso-adapter-utils</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.onap.sdnc.northbound</groupId> - <artifactId>generic-resource-api-client</artifactId> - <version>${sdnc.northbound.version}</version> - <exclusions> - <exclusion> - <groupId>javax.ws.rs</groupId> - <artifactId>jsr311-api</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>ch.vorburger.mariaDB4j</groupId> - <artifactId>mariaDB4j</artifactId> - <version>2.2.3</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-lang3</artifactId> - </dependency> - <dependency> - <groupId>org.onap.so.adapters</groupId> - <artifactId>mso-vnfm-adapter-api</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.springframework.boot</groupId> - <artifactId>spring-boot-configuration-processor</artifactId> - <optional>true</optional> - </dependency> - <dependency> - <groupId>nl.jqno.equalsverifier</groupId> - <artifactId>equalsverifier</artifactId> - <version>2.5.1</version> - <scope>test</scope> - </dependency> + <dependency> + <!-- Import dependency management from Spring Boot --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-dependencies</artifactId> + <version>${springboot.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> </dependencies> + </dependencyManagement> + <dependencies> + <dependency> + <groupId>org.camunda.bpm.springboot</groupId> + <artifactId>camunda-bpm-spring-boot-starter</artifactId> + <version>${camunda.springboot.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.cloud</groupId> + <artifactId>spring-cloud-contract-wiremock</artifactId> + <version>1.2.4.RELEASE</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.camunda.bpm.extension.mockito</groupId> + <artifactId>camunda-bpm-mockito</artifactId> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>MSOCommonBPMN</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so</groupId> + <artifactId>so-bpmn-infrastructure-common</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.so.adapters</groupId> + <artifactId>mso-adapter-utils</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.onap.sdnc.northbound</groupId> + <artifactId>generic-resource-api-client</artifactId> + <version>${sdnc.northbound.version}</version> + <exclusions> + <exclusion> + <groupId>javax.ws.rs</groupId> + <artifactId>jsr311-api</artifactId> + </exclusion> + </exclusions> + </dependency> + <dependency> + <groupId>ch.vorburger.mariaDB4j</groupId> + <artifactId>mariaDB4j</artifactId> + <version>2.2.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang3</artifactId> + </dependency> + <dependency> + <groupId>org.onap.so.adapters</groupId> + <artifactId>mso-vnfm-adapter-api</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-configuration-processor</artifactId> + <optional>true</optional> + </dependency> + <dependency> + <groupId>nl.jqno.equalsverifier</groupId> + <artifactId>equalsverifier</artifactId> + <version>2.5.1</version> + <scope>test</scope> + </dependency> + </dependencies> </project> diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java index 29037980cc..2f898b6697 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java @@ -531,7 +531,7 @@ public class SniroHomingV2 { si.setServiceInstanceId(identifierValue); si.setOrchestrationStatus(OrchestrationStatus.CREATED); cloud.setLcpCloudRegionId(assignmentsMap.get("cloudRegionId")); - if (assignmentsMap.containsKey("vnfHostName")) { + if (assignmentsMap.containsKey("vnfHostName") && !assignmentsMap.get("vnfHostName").isEmpty()) { logger.debug("Resources has been homed to a vnf"); GenericVnf vnf = setVnf(assignmentsMap); vnf.setCloudRegion(cloud); |