summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-11-28 14:42:12 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-28 14:42:12 +0000
commitb9264cfc0c81ac25416268956c4ab389fdf0fcf6 (patch)
tree490ffa4f7d0fd51deab7c817cedfa6bace8e4ead
parent2c480ac2fc537c669d64f0a3d62c5286ba6dce74 (diff)
parent7ace3e6761629e84f357d4bea06fbf539039d218 (diff)
Merge "Use spring auto deployment"
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java2
-rw-r--r--bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java3
-rw-r--r--bpmn/mso-infrastructure-bpmn/pom.xml29
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java3
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/resources/META-INF/processes.xml31
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml8
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java10
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java20
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java8
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml21
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml68
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/processes.xml31
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn6
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java13
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/resources/META-INF/processes.xml0
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml6
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/META-INF/processes.xml37
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java2
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml6
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml6
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java2
23 files changed, 106 insertions, 210 deletions
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java
index d1559c2ed1..11309914ef 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java
@@ -20,7 +20,6 @@
package org.onap.so;
-import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -31,7 +30,6 @@ import org.springframework.context.annotation.Profile;
@SpringBootApplication
@Profile("test")
-@EnableProcessApplication("MSO CommonBPMN Test Application")
@ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = {
@Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)})
public class TestApplication {
diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java
index 45bbe9e5d8..a513acc952 100644
--- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java
+++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java
@@ -27,8 +27,6 @@ import org.camunda.bpm.application.PostDeploy;
import org.camunda.bpm.application.PreUndeploy;
import org.camunda.bpm.application.ProcessApplicationInfo;
import org.camunda.bpm.engine.ProcessEngine;
-import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
-import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
import org.onap.so.logger.MsoLogger;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
@@ -46,7 +44,6 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
*/
@SpringBootApplication
-@EnableProcessApplication("MSO Common Application")
@EnableAsync
@ComponentScan(basePackages = { "org.onap" }, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = {
@Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)})
diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml
index e3d611275e..e22125bee6 100644
--- a/bpmn/mso-infrastructure-bpmn/pom.xml
+++ b/bpmn/mso-infrastructure-bpmn/pom.xml
@@ -20,6 +20,7 @@
<goal>unpack</goal>
</goals>
<configuration>
+ <skip>true</skip>
<artifactItems>
<artifactItem>
<groupId>org.onap.so</groupId>
@@ -55,6 +56,24 @@
</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>
@@ -176,6 +195,16 @@
<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>
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
index efd73ba4f2..7956ecc363 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
+++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
@@ -27,11 +27,9 @@ import org.camunda.bpm.application.PostDeploy;
import org.camunda.bpm.application.PreUndeploy;
import org.camunda.bpm.application.ProcessApplicationInfo;
import org.camunda.bpm.engine.ProcessEngine;
-import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
import org.onap.so.logger.MsoLogger;
import org.onap.so.logging.jaxrs.filter.MDCTaskDecorator;
-import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -49,7 +47,6 @@ import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
*/
@SpringBootApplication
-@EnableProcessApplication("MSO Infrastructure Application")
@EnableAsync
@ComponentScan(basePackages = { "org.onap" }, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = {
@Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class) })
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/META-INF/processes.xml b/bpmn/mso-infrastructure-bpmn/src/main/resources/META-INF/processes.xml
deleted file mode 100644
index 35235b8539..0000000000
--- a/bpmn/mso-infrastructure-bpmn/src/main/resources/META-INF/processes.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ============LICENSE_START=======================================================
- ONAP SO
- ================================================================================
- 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=========================================================
- -->
-
-<process-application
- xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
- <process-archive name="att-services-bpmn">
- <properties>
- <property name="isDeleteUponUndeploy">false</property>
- <property name="isScanForProcessDefinitions">true</property>
- </properties>
- </process-archive>
-
-</process-application>
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml b/bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml
index c6a9f88487..2515603e82 100644
--- a/bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml
+++ b/bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml
@@ -14,6 +14,14 @@ spring:
enabled: false
jersey:
application-path: /sobpmnengine
+camunda:
+ bpm:
+ application:
+ delete-upon-undeploy: false
+ scan-for-process-definitions: true
+ deploy-changed-only: true
+ job-execution:
+ deployment-aware: true
#Actuator
management:
context-path: /manage
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java
index 201e791a24..70d94052e1 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java
@@ -20,15 +20,19 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
-import org.onap.aai.domain.yang.Pnf;
-import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection;
-
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
+import org.onap.aai.domain.yang.Pnf;
+import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection;
+import org.springframework.context.annotation.Primary;
+import org.springframework.stereotype.Component;
+
+@Component
+@Primary
public class AaiConnectionTestImpl implements AaiConnection {
public static final String ID_WITHOUT_ENTRY = "IdWithoutEntry";
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
index 6c174ae537..74e5a6c964 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
@@ -27,28 +27,14 @@ import java.util.HashMap;
import java.util.Map;
import org.assertj.core.api.Assertions;
-import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.runtime.ProcessInstance;
-import org.camunda.bpm.engine.test.Deployment;
-import org.camunda.bpm.engine.test.ProcessEngineRule;
-import org.junit.Rule;
import org.junit.Test;
-import org.junit.runner.RunWith;
+import org.onap.so.BaseIntegrationTest;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.test.context.ContextConfiguration;
-import org.springframework.test.context.junit4.SpringRunner;
-@RunWith(SpringRunner.class)
-@ContextConfiguration(locations = "/applicationContext_forPnfTesting.xml")
-public class CreateAndActivatePnfResourceTest {
+public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest {
private static final String TIMEOUT_10_S = "PT10S";
- @Autowired
- private RuntimeService runtimeService;
-
- @Autowired
- @Rule
- public ProcessEngineRule processEngineRule;
@Autowired
private AaiConnectionTestImpl aaiConnection;
@@ -57,7 +43,6 @@ public class CreateAndActivatePnfResourceTest {
private DmaapClientTestImpl dmaapClientTestImpl;
@Test
- @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"})
public void shouldWaitForMessageFromDmaapAndUpdateAaiEntryWhenAaiEntryExists() {
// given
aaiConnection.reset();
@@ -84,7 +69,6 @@ public class CreateAndActivatePnfResourceTest {
}
@Test
- @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"})
public void shouldCreateAaiEntryWaitForMessageFromDmaapAndUpdateAaiEntryWhenNoAaiEntryExists() {
// given
aaiConnection.reset();
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
index 09fb2d4cd7..146e07b820 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
@@ -20,10 +20,14 @@
package org.onap.so.bpmn.infrastructure.pnf.delegate;
-import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient;
-
import java.util.Objects;
+import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient;
+import org.springframework.context.annotation.Primary;
+import org.springframework.stereotype.Component;
+
+@Component
+@Primary
public class DmaapClientTestImpl implements DmaapClient {
private String correlationId;
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml b/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
index 0ffe16380f..efabdb147a 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
+++ b/bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
@@ -1,6 +1,7 @@
aai:
auth: 5A1272FE739BECA4D4374A86B25C021DFE6745E3BB7BE6836BF64A6059B8220E586C21FD7567AF41DB42571EB7
endpoint: http://localhost:${wiremock.server.port}
+ pnfEntryNotificationTimeout: P14D
appc:
client:
key: iaEMAfjsVsZnraBP
@@ -55,7 +56,9 @@ mso:
workflow:
message:
endpoint: http://localhost:${wiremock.server.port}/workflows/messages/message
-
+ requestDb:
+ auth: Basic YnBlbDptc28tZGItMTUwNyE=
+ endpoint: http://localhost:8081
async:
core-pool-size: 50
max-pool-size: 50
@@ -206,3 +209,19 @@ camunda:
metrics:
enabled: false
db-reporter-activate: false
+ application:
+ delete-upon-undeploy: false
+ scan-for-process-definitions: true
+ deploy-changed-only: true
+ job-execution:
+ deployment-aware: true
+pnf:
+ dmaap:
+ host: hostTest
+ port: 1234
+ protocol: http
+ uriPathPrefix: events
+ topicName: pnfReady
+ consumerGroup: consumerGroup
+ consumerId: consumerId
+ topicListenerDelayInSeconds: 5
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml b/bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml
deleted file mode 100644
index 3a41801d4a..0000000000
--- a/bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-2.5.xsd" >
-
- <bean id="dataSource" class="org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy">
- <property name="targetDataSource">
- <bean class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
- <property name="driverClass" value="org.h2.Driver" />
- <property name="url"
- value="jdbc:h2:mem:process-engine;DB_CLOSE_DELAY=1000" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </bean>
- </property>
- </bean>
-
- <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
- <property name="dataSource" ref="dataSource" />
- </bean>
-
- <bean id="processEngineConfiguration" class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration">
- <property name="processEngineName" value="engine" />
- <property name="dataSource" ref="dataSource" />
- <property name="transactionManager" ref="transactionManager" />
- <property name="databaseSchemaUpdate" value="true" />
- <property name="jobExecutorActivate" value="false" />
- </bean>
-
- <bean id="processEngine" class="org.camunda.bpm.engine.spring.ProcessEngineFactoryBean">
- <property name="processEngineConfiguration" ref="processEngineConfiguration" />
- </bean>
-
- <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
- <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
- <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
- <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
- <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
-
- <context:annotation-config />
-
- <bean id="processEngineRule" class="org.camunda.bpm.engine.test.ProcessEngineRule">
- <property name="processEngine" ref="processEngine" />
- </bean>
-
- <bean id="aaiConnection" class="org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl"/>
-
- <bean id="CheckAaiForCorrelationIdDelegate" class="org.onap.so.bpmn.infrastructure.pnf.delegate.CheckAaiForCorrelationIdDelegate">
- <property name="aaiConnection" ref="aaiConnection"/>
- </bean>
-
- <bean id="CreateAaiEntryWithPnfIdDelegate" class="org.onap.so.bpmn.infrastructure.pnf.delegate.CreateAaiEntryWithPnfIdDelegate">
- <property name="aaiConnection" ref="aaiConnection"/>
- </bean>
-
- <bean id="InformDmaapClient" class="org.onap.so.bpmn.infrastructure.pnf.delegate.InformDmaapClient">
- <property name="dmaapClient" ref="DmaapClient"/>
- </bean>
-
- <bean id="DmaapClient" class="org.onap.so.bpmn.infrastructure.pnf.delegate.DmaapClientTestImpl"/>
-
- <bean id="PnfCheckInputs" class="org.onap.so.bpmn.infrastructure.pnf.delegate.PnfCheckInputs">
- <constructor-arg value="PT1S"></constructor-arg>
- </bean>
-</beans>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/processes.xml b/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/processes.xml
deleted file mode 100644
index 33c8cb1ac0..0000000000
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/processes.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ============LICENSE_START=======================================================
- ONAP SO
- ================================================================================
- 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=========================================================
- -->
-
-<process-application
- xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
- <process-archive name="MSOCommonBPMN">
- <properties>
- <property name="isDeleteUponUndeploy">false</property>
- <property name="isScanForProcessDefinitions">true</property>
- </properties>
- </process-archive>
-
-</process-application>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn
index 02d7294e03..9be4cd0473 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.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: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.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: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.10.0">
<bpmn:process id="ExecuteBuildingBlock" name="ExecuteBuildingBlock" isExecutable="true">
<bpmn:startEvent id="Start_ExecuteBuildingBlock" name="start">
<bpmn:outgoing>SequenceFlow_0rq4c5r</bpmn:outgoing>
@@ -103,11 +103,11 @@
</bpmn:serviceTask>
<bpmn:sequenceFlow id="SequenceFlow_19wuics" sourceRef="Task_PreValidate" targetRef="Call_BBToExecute" />
<bpmn:sequenceFlow id="SequenceFlow_12a4hhf" sourceRef="Task_PostValidate" targetRef="Task_setHandlingCodeSuccess" />
- <bpmn:serviceTask id="Task_PreValidate" name="PreValidate" camunda:expression="${BuildingBlockValidatorRunner.preValidate(flowToBeCalled, InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:serviceTask id="Task_PreValidate" name="PreValidate" camunda:expression="${BuildingBlockValidatorRunner.preValidate(execution.getVariable(&#34;flowToBeCalled&#34;), InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>Continue</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_19wuics</bpmn:outgoing>
</bpmn:serviceTask>
- <bpmn:serviceTask id="Task_PostValidate" name="PostValidate" camunda:expression="${BuildingBlockValidatorRunner.postValidate(flowToBeCalled, InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
+ <bpmn:serviceTask id="Task_PostValidate" name="PostValidate" camunda:expression="${BuildingBlockValidatorRunner.postValidate(execution.getVariable(&#34;flowToBeCalled&#34;), InjectExecution.execute(execution, execution.getVariable(&#34;gBuildingBlockExecution&#34;)))}">
<bpmn:incoming>SequenceFlow_01h9qmz</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_12a4hhf</bpmn:outgoing>
</bpmn:serviceTask>
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java
index d1559c2ed1..11309914ef 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java
@@ -20,7 +20,6 @@
package org.onap.so;
-import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -31,7 +30,6 @@ import org.springframework.context.annotation.Profile;
@SpringBootApplication
@Profile("test")
-@EnableProcessApplication("MSO CommonBPMN Test Application")
@ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = {
@Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)})
public class TestApplication {
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 5162b83f4a..27bb328177 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
@@ -51,7 +51,18 @@ public class HomingBBTest extends BaseBPMNTest{
ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables);
assertThat(pi).isNotNull();
assertThat(pi).isStarted()
- .hasPassedInOrder("start", "sniroOofCheck", "startBpmnError", "processMsoWorkflowException", "endBpmnError")
+ .hasPassed("start", "sniroOofCheck", "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));
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted()
+ .hasPassed("start", "sniroOofCheck", "callSniro", "startJavaError", "processJavaException", "javaExceptionSubProcess", "endJavaError")
.hasNotPassed("callReceiveAsync");
assertThat(pi).isEnded();
}
diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/META-INF/processes.xml b/bpmn/so-bpmn-building-blocks/src/test/resources/META-INF/processes.xml
deleted file mode 100644
index e69de29bb2..0000000000
--- a/bpmn/so-bpmn-building-blocks/src/test/resources/META-INF/processes.xml
+++ /dev/null
diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
index 62e2c0a8c2..1090ab7be4 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
+++ b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
@@ -200,6 +200,12 @@ camunda:
metrics:
enabled: false
db-reporter-activate: false
+ application:
+ delete-upon-undeploy: false
+ scan-for-process-definitions: true
+ deploy-changed-only: true
+ job-execution:
+ deployment-aware: true
pnf:
dmaap:
host: hostTest
diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml b/bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml
index d8f6ba3930..64b6bfc81b 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml
+++ b/bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml
@@ -26,5 +26,5 @@
</root>
<logger name="wiremock.org" level="DEBUG" />
-
+<logger name="org.camunda" level="DEBUG" />
</configuration> \ No newline at end of file
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/META-INF/processes.xml b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/META-INF/processes.xml
deleted file mode 100644
index 13a24c8b8b..0000000000
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/META-INF/processes.xml
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- ============LICENSE_START=======================================================
- ECOMP MSO
- ================================================================================
- Copyright (C) 2017 AT&T 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=========================================================
- -->
-
-
-<process-application
- xmlns="http://www.camunda.org/schema/1.0/ProcessApplication"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
- <process-archive>
- <properties>
- <property name="isDeleteUponUndeploy">false</property>
- <property name="isScanForProcessDefinitions">true</property>
- <!-- history cleanup batch job starts at 6:00am UTC time (01:00am Central) -->
- <property name="historyCleanupBatchWindowStartTime">06:00</property>
- <property name="historyCleanupBatchWindowEndTime">09:00</property>
- </properties>
- </process-archive>
-
-</process-application>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java
index f9962c2630..f1b69c653f 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java
@@ -20,7 +20,6 @@
package org.onap.so;
-import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -31,7 +30,6 @@ import org.springframework.context.annotation.Profile;
@SpringBootApplication
@Profile("test")
-@EnableProcessApplication("MSO CommonBPMN Test Application")
@ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = {
@Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class) })
public class TestApplication {
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml
index 0dface8c28..a1905f85f6 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml
@@ -182,3 +182,9 @@ camunda:
metrics:
enabled: false
db-reporter-activate: false
+ application:
+ delete-upon-undeploy: false
+ scan-for-process-definitions: true
+ deploy-changed-only: true
+ job-execution:
+ deployment-aware: true
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml
index d5940e6808..e5cb7e096e 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml
@@ -14,6 +14,12 @@ camunda:
metrics:
enabled: false
db-reporter-activate: false
+ application:
+ delete-upon-undeploy: false
+ scan-for-process-definitions: true
+ deploy-changed-only: true
+ job-execution:
+ deployment-aware: true
canopi:
auth: 5E12ACACBD552A415E081E29F2C4772F9835792A51C766CCFDD7433DB5220B59969CB2798C
csi:
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java
index 9244f7ee1f..87153144c8 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java
@@ -21,7 +21,6 @@ package org.onap.so;
-import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -32,7 +31,6 @@ import org.springframework.context.annotation.Profile;
@SpringBootApplication
@Profile("test")
-@EnableProcessApplication("MSO CommonBPMN Test Application")
@ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = {
@Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)})
public class TestApplication {