Use spring auto deployment 61/72961/4
authorBenjamin, Max (mb388a) <mb388a@us.att.com>
Sat, 17 Nov 2018 05:52:11 +0000 (00:52 -0500)
committerBenjamin, Max (mb388a) <mb388a@us.att.com>
Wed, 28 Nov 2018 04:25:16 +0000 (23:25 -0500)
remove processes.xml from application in favor of spring properties
removed the last @EnableProcessApplication annotation
removed remaining processes.xml from code
modified JEL expression with explicit getVariable calls
update application.yaml defaults for camunda deployment
Update camunda configuration to run history clean up

Change-Id: If9a5cf03a8cdc33c32eeb790656f925d2f0b6d7b
Issue-ID: SO-1232
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
23 files changed:
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/TestApplication.java
bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/common/MSOCommonApplication.java
bpmn/mso-infrastructure-bpmn/pom.xml
bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
bpmn/mso-infrastructure-bpmn/src/main/resources/META-INF/processes.xml [deleted file]
bpmn/mso-infrastructure-bpmn/src/main/resources/application.yaml
bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java
bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java
bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java
bpmn/mso-infrastructure-bpmn/src/test/resources/application-test.yaml
bpmn/mso-infrastructure-bpmn/src/test/resources/applicationContext_forPnfTesting.xml [deleted file]
bpmn/so-bpmn-building-blocks/src/main/resources/META-INF/processes.xml [deleted file]
bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/ExecuteBuildingBlock.bpmn
bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java
bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java
bpmn/so-bpmn-building-blocks/src/test/resources/META-INF/processes.xml [deleted file]
bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml
bpmn/so-bpmn-infrastructure-flows/src/main/resources/META-INF/processes.xml [deleted file]
bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/TestApplication.java
bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yaml
bpmn/so-bpmn-infrastructure-flows/src/test/resources/application-test.yml
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/TestApplication.java

index d1559c2..1130991 100644 (file)
@@ -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 {
index 45bbe9e..a513acc 100644 (file)
@@ -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)})
index e3d6112..e22125b 100644 (file)
@@ -20,6 +20,7 @@
                                                        <goal>unpack</goal>
                                                </goals>
                                                <configuration>
+                                                       <skip>true</skip>
                                                        <artifactItems>
                                                                <artifactItem>
                                                                        <groupId>org.onap.so</groupId>
                                        </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>
                        <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>
index efd73ba..7956ecc 100644 (file)
@@ -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 (file)
index 35235b8..0000000
+++ /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>
index c6a9f88..2515603 100644 (file)
@@ -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
index 201e791..70d9405 100644 (file)
 
 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";
index 6c174ae..74e5a6c 100644 (file)
@@ -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();
index 09fb2d4..146e07b 100644 (file)
 
 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;
index 0ffe163..efabdb1 100644 (file)
@@ -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 (file)
index 3a41801..0000000
+++ /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 (file)
index 33c8cb1..0000000
+++ /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>
index 02d7294..9be4cd0 100644 (file)
@@ -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>
     </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>
index d1559c2..1130991 100644 (file)
@@ -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 {
index 5162b83..27bb328 100644 (file)
@@ -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 (file)
index e69de29..0000000
index 62e2c0a..1090ab7 100644 (file)
@@ -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
index d8f6ba3..64b6bfc 100644 (file)
@@ -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 (file)
index 13a24c8..0000000
+++ /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>
index f9962c2..f1b69c6 100644 (file)
@@ -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 {
index 0dface8..a1905f8 100644 (file)
@@ -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
index d5940e6..e5cb7e0 100644 (file)
@@ -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:
index 9244f7e..8715314 100644 (file)
@@ -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 {