summaryrefslogtreecommitdiffstats
path: root/bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn')
-rw-r--r--bpmn/MSOCommonBPMN/pom.xml5
-rw-r--r--bpmn/MSOCoreBPMN/pom.xml2
-rw-r--r--bpmn/mso-infrastructure-bpmn/pom.xml56
-rw-r--r--bpmn/pom.xml6
-rw-r--r--bpmn/so-bpmn-building-blocks/pom.xml20
-rw-r--r--bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn80
-rw-r--r--bpmn/so-bpmn-infrastructure-common/pom.xml7
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy91
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/pom.xml60
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateAccessNSSI.bpmn2
-rw-r--r--bpmn/so-bpmn-tasks/pom.xml24
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java30
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/excpetion/VnfcMultipleRelationshipException.java28
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilderTest.java23
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/schema.sql390
16 files changed, 463 insertions, 363 deletions
diff --git a/bpmn/MSOCommonBPMN/pom.xml b/bpmn/MSOCommonBPMN/pom.xml
index c1c5bf0170..60a689c04a 100644
--- a/bpmn/MSOCommonBPMN/pom.xml
+++ b/bpmn/MSOCommonBPMN/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<artifactId>MSOCommonBPMN</artifactId>
<name>MSOCommonBPMN</name>
@@ -182,7 +182,6 @@
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
- <version>1.9.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
@@ -340,7 +339,7 @@
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
+ <version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
diff --git a/bpmn/MSOCoreBPMN/pom.xml b/bpmn/MSOCoreBPMN/pom.xml
index 5285e4e79f..34790bb496 100644
--- a/bpmn/MSOCoreBPMN/pom.xml
+++ b/bpmn/MSOCoreBPMN/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>MSOCoreBPMN</artifactId>
diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml
index 4f7ceca9b9..1df4a26246 100644
--- a/bpmn/mso-infrastructure-bpmn/pom.xml
+++ b/bpmn/mso-infrastructure-bpmn/pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>mso-infrastructure-bpmn</artifactId>
@@ -201,13 +201,19 @@
<type>pom</type>
<scope>import</scope>
</dependency>
+ <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-rest</artifactId>
- <version>${camunda.springboot.version}</version>
<exclusions>
<exclusion>
<groupId>org.camunda.bpmn</groupId>
@@ -222,7 +228,6 @@
<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>
@@ -232,10 +237,6 @@
</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>
@@ -246,20 +247,6 @@
<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>
@@ -294,31 +281,21 @@
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
+ <version>2.3.0</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>
@@ -335,10 +312,6 @@
</dependency>
<dependency>
<groupId>org.onap.aaf.authz</groupId>
- <artifactId>aaf-cadi-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-cadi-aaf</artifactId>
<exclusions>
<exclusion>
@@ -352,14 +325,9 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.onap.aaf.authz</groupId>
- <artifactId>aaf-auth-client</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.onap.aaf.authz</groupId>
- <artifactId>aaf-misc-env</artifactId>
- <scope>runtime</scope>
+ <groupId>org.camunda.bpm.springboot</groupId>
+ <artifactId>camunda-bpm-spring-boot-starter-test</artifactId>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.onap.aaf.authz</groupId>
diff --git a/bpmn/pom.xml b/bpmn/pom.xml
index 4193ba1287..9d2231f936 100644
--- a/bpmn/pom.xml
+++ b/bpmn/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>so</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<artifactId>bpmn</artifactId>
@@ -15,7 +15,7 @@
<packaging>pom</packaging>
<properties>
- <camunda.version>7.10.0</camunda.version>
+ <camunda.version>7.14.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>
@@ -71,7 +71,6 @@
</dependency>
</dependencies>
</dependencyManagement>
-
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
@@ -92,5 +91,4 @@
<version>${project.version}</version>
</dependency>
</dependencies>
-
</project>
diff --git a/bpmn/so-bpmn-building-blocks/pom.xml b/bpmn/so-bpmn-building-blocks/pom.xml
index 5c4cd6d2fa..dbd954ca64 100644
--- a/bpmn/so-bpmn-building-blocks/pom.xml
+++ b/bpmn/so-bpmn-building-blocks/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>so-bpmn-building-blocks</artifactId>
@@ -79,28 +79,35 @@
</plugins>
</pluginManagement>
</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>
<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>
@@ -148,9 +155,8 @@
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
+ <version>2.3.0</version>
<scope>test</scope>
</dependency>
-
</dependencies>
</project>
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn
index 3448e8d577..41b841f05d 100644
--- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn
+++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/VnfAdapter.bpmn
@@ -1,19 +1,9 @@
<?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="3.7.0">
+<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="4.1.1">
<bpmn:process id="VnfAdapter" name="Vnf Adapter" isExecutable="true">
<bpmn:startEvent id="VnfAdapter_Start">
<bpmn:outgoing>SequenceFlow_1xr6chl</bpmn:outgoing>
</bpmn:startEvent>
- <bpmn:subProcess id="VnfAdapter_Error" name="Sub Process Error" triggeredByEvent="true">
- <bpmn:endEvent id="Error_End" name="End">
- <bpmn:incoming>SequenceFlow_1abat8l</bpmn:incoming>
- </bpmn:endEvent>
- <bpmn:startEvent id="Error_Start" name="Start">
- <bpmn:outgoing>SequenceFlow_1abat8l</bpmn:outgoing>
- <bpmn:errorEventDefinition />
- </bpmn:startEvent>
- <bpmn:sequenceFlow id="SequenceFlow_1abat8l" sourceRef="Error_Start" targetRef="Error_End" />
- </bpmn:subProcess>
<bpmn:sequenceFlow id="SequenceFlow_1xr6chl" sourceRef="VnfAdapter_Start" targetRef="PreProcessRequest" />
<bpmn:endEvent id="VnfAdapter_End">
<bpmn:incoming>SequenceFlow_1ivhukd</bpmn:incoming>
@@ -43,15 +33,27 @@
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="VnfAdapter">
- <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="VnfAdapter_Start">
- <dc:Bounds x="156" y="103" width="36" height="36" />
+ <bpmndi:BPMNEdge id="SequenceFlow_0j1zvis_di" bpmnElement="SequenceFlow_0j1zvis">
+ <di:waypoint x="563" y="121" />
+ <di:waypoint x="657" y="121" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="219" y="393" width="24" height="12" />
+ <dc:Bounds x="622" y="354" width="90" height="12" />
</bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="SubProcess_17szae7_di" bpmnElement="VnfAdapter_Error" isExpanded="true">
- <dc:Bounds x="396" y="275" width="233" height="135" />
- </bpmndi:BPMNShape>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_0qaaf5k_di" bpmnElement="SequenceFlow_0qaaf5k">
+ <di:waypoint x="372" y="121" />
+ <di:waypoint x="463" y="121" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="429.5" y="354" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="SequenceFlow_1ivhukd_di" bpmnElement="SequenceFlow_1ivhukd">
+ <di:waypoint x="757" y="121" />
+ <di:waypoint x="837" y="121" />
+ <bpmndi:BPMNLabel>
+ <dc:Bounds x="809" y="354" width="90" height="12" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1xr6chl_di" bpmnElement="SequenceFlow_1xr6chl">
<di:waypoint x="192" y="121" />
<di:waypoint x="272" y="121" />
@@ -59,27 +61,12 @@
<dc:Bounds x="244" y="360" width="90" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
- <bpmndi:BPMNShape id="EndEvent_16vfqpk_di" bpmnElement="Error_End">
- <dc:Bounds x="549" y="319" width="36" height="36" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="558" y="359" width="20" height="14" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNShape>
- <bpmndi:BPMNShape id="StartEvent_1t3ep1m_di" bpmnElement="Error_Start">
- <dc:Bounds x="434" y="319" width="36" height="36" />
+ <bpmndi:BPMNShape id="StartEvent_0kxwniy_di" bpmnElement="VnfAdapter_Start">
+ <dc:Bounds x="156" y="103" width="36" height="36" />
<bpmndi:BPMNLabel>
- <dc:Bounds x="441" y="359" width="24" height="14" />
+ <dc:Bounds x="219" y="393" width="24" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1abat8l_di" bpmnElement="SequenceFlow_1abat8l">
- <di:waypoint x="470" y="337" />
- <di:waypoint x="509" y="337" />
- <di:waypoint x="509" y="337" />
- <di:waypoint x="549" y="337" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="536" y="591" width="90" height="0" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_0qdq7wj_di" bpmnElement="VnfAdapter_End">
<dc:Bounds x="837" y="103" width="36" height="36" />
<bpmndi:BPMNLabel>
@@ -92,30 +79,9 @@
<bpmndi:BPMNShape id="ServiceTask_1yomr79_di" bpmnElement="PostProcessResponse">
<dc:Bounds x="657" y="81" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_1ivhukd_di" bpmnElement="SequenceFlow_1ivhukd">
- <di:waypoint x="757" y="121" />
- <di:waypoint x="837" y="121" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="809" y="354" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="CallActivity_0n6wnin_di" bpmnElement="Call_openstackAdapterTask">
<dc:Bounds x="463" y="81" width="100" height="80" />
</bpmndi:BPMNShape>
- <bpmndi:BPMNEdge id="SequenceFlow_0qaaf5k_di" bpmnElement="SequenceFlow_0qaaf5k">
- <di:waypoint x="372" y="121" />
- <di:waypoint x="463" y="121" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="429.5" y="354" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
- <bpmndi:BPMNEdge id="SequenceFlow_0j1zvis_di" bpmnElement="SequenceFlow_0j1zvis">
- <di:waypoint x="563" y="121" />
- <di:waypoint x="657" y="121" />
- <bpmndi:BPMNLabel>
- <dc:Bounds x="622" y="354" width="90" height="12" />
- </bpmndi:BPMNLabel>
- </bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
diff --git a/bpmn/so-bpmn-infrastructure-common/pom.xml b/bpmn/so-bpmn-infrastructure-common/pom.xml
index ebc0264c7e..90f9a57191 100644
--- a/bpmn/so-bpmn-infrastructure-common/pom.xml
+++ b/bpmn/so-bpmn-infrastructure-common/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>so-bpmn-infrastructure-common</artifactId>
@@ -131,13 +131,11 @@
<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>
@@ -256,7 +254,7 @@
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
+ <version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -269,7 +267,6 @@
<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>
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy
index 9ccc6951ea..897cdfcd7b 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoActivateAccessNSSI.groovy
@@ -49,7 +49,8 @@ import org.slf4j.LoggerFactory
import com.fasterxml.jackson.databind.ObjectMapper
import com.google.gson.JsonObject
-
+import groovy.json.JsonSlurper
+import com.google.gson.Gson
/**
* Internal AN NSSMF to handle NSSI Activation/Deactivation
@@ -78,16 +79,26 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
private static final String ACTIVATE = "activateInstance"
private static final String DEACTIVATE = "deactivateInstance"
- private static final String VENDOR_ONAP = "ONAP"
+ private static final String VENDOR_ONAP = "ONAP_internal"
+
+ enum orchStatusMap {
+ activateInstance("activated"),
+ deactivateInstance("deactivated")
+
+ private String value;
+
+ private orchStatusMap(String value) {
+ this.value = value;
+ }
+ }
- Map<String,String> orchStatusMap = new HashMap<>()
@Override
public void preProcessRequest(DelegateExecution execution) {
logger.debug("${Prefix} - Start preProcessRequest")
String sliceParams = execution.getVariable("sliceParams")
- String sNssaiList = jsonUtil.getJsonValue(sliceParams, "snssaiList")
+ List<String> sNssaiList = jsonUtil.StringArrayToList(jsonUtil.getJsonValue(sliceParams, "snssaiList"))
String anSliceProfileId = jsonUtil.getJsonValue(sliceParams, "sliceProfileId")
String nsiId = execution.getVariable("nsiId")
String globalSubscriberId = execution.getVariable("globalSubscriberId")
@@ -95,7 +106,7 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
String anNssiId = execution.getVariable("serviceInstanceID")
String operationType = execution.getVariable("operationType")
- if(isBlank(sNssaiList) || isBlank(anSliceProfileId) || isBlank(nsiId)) {
+ if((sNssaiList.empty) || isBlank(anSliceProfileId) || isBlank(nsiId)) {
String msg = "Input fields cannot be null : Mandatory attributes : [snssaiList, sliceProfileId, nsiId]"
logger.debug(msg)
exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
@@ -112,9 +123,6 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
execution.setVariable("nsiId", nsiId)
execution.setVariable("anNssiId", anNssiId)
- orchStatusMap.put(ACTIVATE, "activated")
- orchStatusMap.put(DEACTIVATE, "deactivated")
-
logger.debug("${Prefix} - Preprocessing completed with sliceProfileId : ${anSliceProfileId} , nsiId : ${nsiId} , nssiId : ${anNssiId}")
}
@@ -145,11 +153,12 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
ServiceInstance sliceProfileInstance = execution.getVariable(KEY_SLICE_PROFILE)
String orchStatus = sliceProfileInstance.getOrchestrationStatus()
String operationType = execution.getVariable("operationType")
- if(orchStatusMap.get(operationType).equalsIgnoreCase(orchStatus)) {
- execution.setVariable("shouldChangeSPStatus", true)
- }else {
+ if(orchStatusMap.valueOf(operationType).toString().equalsIgnoreCase(orchStatus)) {
execution.setVariable("shouldChangeSPStatus", false)
- }
+ }else {
+ execution.setVariable("shouldChangeSPStatus", true)
+
+ }
logger.debug("${Prefix} - SPOrchStatus : ${orchStatus}")
}
@@ -167,10 +176,10 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
String orchStatus = sliceProfileInstance.getOrchestrationStatus()
String operationType = execution.getVariable("operationType")
- if(orchStatusMap.get(operationType).equalsIgnoreCase(orchStatus)) {
- execution.setVariable("shouldChangeAN_NF_SPStatus", true)
- }else {
+ if(orchStatusMap.valueOf(operationType).toString().equalsIgnoreCase(orchStatus)) {
execution.setVariable("shouldChangeAN_NF_SPStatus", false)
+ }else {
+ execution.setVariable("shouldChangeAN_NF_SPStatus", true)
}
logger.debug("${Prefix} - getAnNfSPOrchStatus AN_NF SP ID:${anNfSPId} : ${orchStatus}")
}
@@ -181,7 +190,7 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
String action = operationType.equalsIgnoreCase(ACTIVATE) ? "activate":"deactivate"
String anNfNssiId = execution.getVariable("anNfNssiId")
- String sNssai = execution.getVariable("sNssaiList")
+ List<String> sNssai = execution.getVariable("sNssaiList")
String reqId = execution.getVariable("msoRequestId")
String messageType = "SDNRActivateResponse"
StringBuilder callbackURL = new StringBuilder(UrnPropertiesReader.getVariable("mso.workflow.message.endpoint", execution))
@@ -190,7 +199,7 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
JsonObject input = new JsonObject()
input.addProperty("RANNFNSSIId", anNfNssiId)
input.addProperty("callbackURL", callbackURL.toString())
- input.addProperty("s-NSSAI", sNssai)
+ input.addProperty("s-NSSAI", sNssai.toString())
JsonObject Payload = new JsonObject()
Payload.addProperty("version", "1.0")
@@ -202,7 +211,7 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
wrapinput.addProperty("Action", action)
JsonObject CommonHeader = new JsonObject()
- CommonHeader.addProperty("TimeStamp", new Date(System.currentTimeMillis()).format("yyyy-MM-ddTHH:mm:ss.sss", TimeZone.getDefault()))
+ CommonHeader.addProperty("TimeStamp", new Date(System.currentTimeMillis()).format("yyyy-MM-dd'T'HH:mm:ss.sss", TimeZone.getDefault()))
CommonHeader.addProperty("APIver", "1.0")
CommonHeader.addProperty("RequestID", reqId)
CommonHeader.addProperty("SubRequestID", "1")
@@ -211,18 +220,18 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
body.add("input", wrapinput)
JsonObject sdnrRequest = new JsonObject()
- Payload.add("input", input)
+ Payload.addProperty("input", input.toString())
wrapinput.add("Payload", Payload)
wrapinput.add("CommonHeader", CommonHeader)
body.add("input", wrapinput)
sdnrRequest.add("body", body)
String json = sdnrRequest.toString()
- execution.setVariable("sdnrRequest", sdnrRequest)
+ execution.setVariable("sdnrRequest", json)
execution.setVariable("SDNR_messageType", messageType)
execution.setVariable("SDNR_timeout", "PT10M")
- logger.debug("${Prefix} - prepareSdnrActivationRequest : SDNR Request : ${json}")
+ logger.debug("${Prefix} - Exit prepareSdnrActivationRequest ")
}
void processSdnrResponse(DelegateExecution execution) {
@@ -267,10 +276,10 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
String orchStatus = sliceProfileInstance.getOrchestrationStatus()
String operationType = execution.getVariable("operationType")
- if(orchStatusMap.get(operationType).equalsIgnoreCase(orchStatus)) {
- execution.setVariable("shouldChangeTN_FH_SPStatus", true)
- }else {
+ if(orchStatusMap.valueOf(operationType).toString().equalsIgnoreCase(orchStatus)) {
execution.setVariable("shouldChangeTN_FH_SPStatus", false)
+ }else {
+ execution.setVariable("shouldChangeTN_FH_SPStatus", true)
}
logger.debug("${Prefix} Exit getTnFhSPOrchStatus TN_FH SP ID:${tnFhSPId} : ${orchStatus}")
@@ -283,9 +292,8 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
String urlOpType = operationType.equalsIgnoreCase(ACTIVATE) ? "activation":"deactivation"
List<String> sNssaiList = execution.getVariable("sNssaiList")
- String snssai = sNssaiList != null ? sNssaiList.get(0) : ""
-
- String urlString = "/api/rest/provMns/v1/NSS/" + snssai + urlOpType
+ String snssai = sNssaiList.get(0)
+ String urlString = "/api/rest/provMns/v1/NSS/" + snssai + "/" + urlOpType
String nssmfResponse = nssmfAdapterUtils.sendPostRequestNSSMF(execution, urlString, nssmfRequest)
if (nssmfResponse != null) {
String jobId = jsonUtil.getJsonValue(nssmfResponse, "jobId")
@@ -307,10 +315,10 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
String orchStatus = sliceProfileInstance.getOrchestrationStatus()
String operationType = execution.getVariable("operationType")
- if(orchStatusMap.get(operationType).equalsIgnoreCase(orchStatus)) {
- execution.setVariable("shouldChangeTN_MH_SPStatus", true)
- }else {
+ if(orchStatusMap.valueOf(operationType).toString().equalsIgnoreCase(orchStatus)) {
execution.setVariable("shouldChangeTN_MH_SPStatus", false)
+ }else {
+ execution.setVariable("shouldChangeTN_MH_SPStatus", true)
}
logger.debug("${Prefix} Exit getTnMhSPOrchStatus TN_MH SP ID:${tnFhSPId} : ${orchStatus}")
}
@@ -322,9 +330,9 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
String urlOpType = operationType.equalsIgnoreCase(ACTIVATE) ? "activation":"deactivation"
List<String> sNssaiList = execution.getVariable("sNssaiList")
- String snssai = sNssaiList != null ? sNssaiList.get(0) : ""
+ String snssai = sNssaiList.get(0)
- String urlString = "/api/rest/provMns/v1/NSS/" + snssai + urlOpType
+ String urlString = "/api/rest/provMns/v1/NSS/" + snssai + "/" + urlOpType
String nssmfResponse = nssmfAdapterUtils.sendPostRequestNSSMF(execution, urlString, nssmfRequest)
if (nssmfResponse != null) {
String jobId = jsonUtil.getJsonValue(nssmfResponse, "jobId")
@@ -378,7 +386,7 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
String anSliceProfileId = execution.getVariable("anSliceProfileId")
updateOrchStatus(execution, anNssiId)
updateOrchStatus(execution, anSliceProfileId)
- logger.debug("${Prefix} Start updateANStatus")
+ logger.debug("${Prefix} Exit updateANStatus")
}
void prepareQueryJobStatus(DelegateExecution execution,String jobId,String networkType,String instanceId) {
@@ -463,7 +471,8 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
roStatus.setProgress(progress)
roStatus.setStatus(status)
roStatus.setStatusDescription(statusDescription)
- requestDBUtil.prepareUpdateResourceOperationStatus(execution, status)
+ requestDBUtil.prepareUpdateResourceOperationStatus(execution, roStatus)
+ logger.debug("${Prefix} Exit prepareUpdateJobStatus : ${statusDescription}")
}
@@ -567,20 +576,22 @@ class DoActivateAccessNSSI extends AbstractServiceTaskProcessor {
actDeactNssi.setSliceProfileId(relatedSPs.get(serviceFunction).getServiceInstanceId())
actDeactNssi.setSnssaiList(sNssaiList)
- EsrInfo esrInfo = new EsrInfo()
- esrInfo.setVendor(VENDOR_ONAP)
- esrInfo.setNetworkType("TN")
+ JsonObject esrInfo = new JsonObject()
+ esrInfo.addProperty("networkType", "tn")
+ esrInfo.addProperty("vendor", VENDOR_ONAP)
ServiceInfo serviceInfo = new ServiceInfo()
serviceInfo.setServiceInvariantUuid(tnNssi.getModelInvariantId())
serviceInfo.setServiceUuid(tnNssi.getModelVersionId())
serviceInfo.setGlobalSubscriberId(globalSubscriberId)
serviceInfo.setSubscriptionServiceType(subscriptionServiceType)
+ serviceInfo.setNssiId(nssiId)
JsonObject json = new JsonObject()
- json.addProperty("actDeActNssi", objectMapper.writeValueAsString(actDeactNssi))
- json.addProperty("esrInfo", objectMapper.writeValueAsString(esrInfo))
- json.addProperty("serviceInfo", objectMapper.writeValueAsString(serviceInfo))
+ Gson jsonConverter = new Gson()
+ json.add("actDeActNssi", jsonConverter.toJsonTree(actDeactNssi))
+ json.add("esrInfo", esrInfo)
+ json.add("serviceInfo", jsonConverter.toJsonTree(serviceInfo))
return json.toString()
}
diff --git a/bpmn/so-bpmn-infrastructure-flows/pom.xml b/bpmn/so-bpmn-infrastructure-flows/pom.xml
index a8f35986e7..fa45a415ee 100644
--- a/bpmn/so-bpmn-infrastructure-flows/pom.xml
+++ b/bpmn/so-bpmn-infrastructure-flows/pom.xml
@@ -4,7 +4,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>so-bpmn-infrastructure-flows</artifactId>
@@ -14,7 +14,6 @@
<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>
@@ -54,15 +53,9 @@
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
- <groupId>
- org.apache.maven.plugins
- </groupId>
- <artifactId>
- maven-antrun-plugin
- </artifactId>
- <versionRange>
- [1.3,)
- </versionRange>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <versionRange>[1.3,)</versionRange>
<goals>
<goal>run</goal>
</goals>
@@ -145,7 +138,6 @@
</pluginManagement>
<finalName>${project.artifactId}-${project.version}</finalName>
</build>
-
<dependencyManagement>
<dependencies>
<dependency>
@@ -157,24 +149,20 @@
</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>
@@ -213,6 +201,7 @@
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
+ <!-- remove -->
<scope>test</scope>
</dependency>
<dependency>
@@ -220,15 +209,6 @@
<artifactId>java-uuid-generator</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>MSOCoreBPMN</artifactId>
<version>${project.version}</version>
@@ -254,11 +234,6 @@
<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>
@@ -277,7 +252,6 @@
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-plugin-spin</artifactId>
</dependency>
-
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine-plugin-connect</artifactId>
@@ -296,35 +270,14 @@
<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>
+ <version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -333,6 +286,5 @@
<version>${grpc.version}</version>
<scope>test</scope>
</dependency>
-
</dependencies>
</project>
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateAccessNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateAccessNSSI.bpmn
index d81f5465b3..2301b47639 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateAccessNSSI.bpmn
+++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoActivateAccessNSSI.bpmn
@@ -154,7 +154,7 @@ activator.processSdnrResponse(execution)</bpmn:script>
<bpmn:outgoing>Flow_0rizzsm</bpmn:outgoing>
<bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.*
def activator = new DoActivateAccessNSSI()
-activator..prepareUpdateJobStatus(execution,"processing","40","AN NF NSSI activation completed")</bpmn:script>
+activator.prepareUpdateJobStatus(execution,"processing","40","AN NF NSSI activation completed")</bpmn:script>
</bpmn:scriptTask>
<bpmn:serviceTask id="Activity_08yj5gq" name="Update Resource Operation Status">
<bpmn:extensionElements>
diff --git a/bpmn/so-bpmn-tasks/pom.xml b/bpmn/so-bpmn-tasks/pom.xml
index f7eb2c09c7..564a117674 100644
--- a/bpmn/so-bpmn-tasks/pom.xml
+++ b/bpmn/so-bpmn-tasks/pom.xml
@@ -3,7 +3,7 @@
<parent>
<groupId>org.onap.so</groupId>
<artifactId>bpmn</artifactId>
- <version>1.7.1-SNAPSHOT</version>
+ <version>1.8.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>so-bpmn-tasks</artifactId>
@@ -162,13 +162,19 @@
<type>pom</type>
<scope>import</scope>
</dependency>
+ <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>
@@ -204,7 +210,7 @@
<dependency>
<groupId>ch.vorburger.mariaDB4j</groupId>
<artifactId>mariaDB4j</artifactId>
- <version>2.2.3</version>
+ <version>2.3.0</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -212,9 +218,15 @@
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
- <groupId>org.onap.so.adapters</groupId>
- <artifactId>etsi-sol003-lcm-api</artifactId>
- <version>${project.version}</version>
+ <groupId>org.onap.so.adapters.so-etsi-sol003-adapter.lcm</groupId>
+ <artifactId>so-etsi-sol003-adapter-lcm-api</artifactId>
+ <version>${so-etsi-sol003-adapter-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java
index b8699838e2..2138f489ee 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilder.java
@@ -204,7 +204,7 @@ public class ExecuteBuildingBlockBuilder {
isVirtualLink, resource.getVirtualLinkKey(), null, isConfiguration, null)));
}
- private ConfigurationResourceKeys getConfigurationResourceKeys(Resource resource, String vnfcName) {
+ protected ConfigurationResourceKeys getConfigurationResourceKeys(Resource resource, String vnfcName) {
ConfigurationResourceKeys configurationResourceKeys = new ConfigurationResourceKeys();
Optional.ofNullable(vnfcName).ifPresent(configurationResourceKeys::setVnfcName);
configurationResourceKeys.setCvnfcCustomizationUUID(resource.getCvnfModuleCustomizationId());
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
index 4be497c469..f5955d6c7d 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java
@@ -46,10 +46,10 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory;
import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder;
import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types;
import org.onap.so.bpmn.common.BBConstants;
+import org.onap.so.bpmn.infrastructure.workflow.tasks.excpetion.VnfcMultipleRelationshipException;
import org.onap.so.bpmn.infrastructure.workflow.tasks.utils.WorkflowResourceIdsUtils;
import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration;
import org.onap.so.bpmn.servicedecomposition.bbobjects.VfModule;
-import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.onap.so.bpmn.servicedecomposition.entities.WorkflowResourceIds;
import org.onap.so.bpmn.servicedecomposition.tasks.BBInputSetup;
@@ -490,7 +490,7 @@ public class WorkflowAction {
AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId));
AAIResultWrapper vfModuleResultsWrapper = bbInputSetupUtils.getAAIResourceDepthOne(uri);
Optional<Relationships> relationshipsOp = vfModuleResultsWrapper.getRelationships();
- if (!relationshipsOp.isPresent()) {
+ if (relationshipsOp.isEmpty()) {
logger.debug("No relationships were found for vfModule in AAI");
} else {
Relationships relationships = relationshipsOp.get();
@@ -503,21 +503,20 @@ public class WorkflowAction {
return vnfcs;
}
- protected <T> T getRelatedResourcesInVnfc(Vnfc vnfc, Class<T> resultClass, AAIObjectName name) throws Exception {
+ protected <T> T getRelatedResourcesInVnfc(Vnfc vnfc, Class<T> resultClass, AAIObjectName name)
+ throws VnfcMultipleRelationshipException {
T configuration = null;
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.network().vnfc(vnfc.getVnfcName()));
AAIResultWrapper vnfcResultsWrapper = bbInputSetupUtils.getAAIResourceDepthOne(uri);
Optional<Relationships> relationshipsOp = vnfcResultsWrapper.getRelationships();
- if (!relationshipsOp.isPresent()) {
+ if (relationshipsOp.isEmpty()) {
logger.debug("No relationships were found for VNFC in AAI");
} else {
Relationships relationships = relationshipsOp.get();
List<AAIResultWrapper> configurationResultWrappers =
this.getResultWrappersFromRelationships(relationships, name);
if (configurationResultWrappers.size() > 1) {
- String multipleRelationshipsError =
- "Multiple relationships exist from VNFC " + vnfc.getVnfcName() + " to Configurations";
- throw new Exception(multipleRelationshipsError);
+ throw new VnfcMultipleRelationshipException(vnfc.getVnfcName());
}
if (!configurationResultWrappers.isEmpty()) {
Optional<T> configurationOp = configurationResultWrappers.get(0).asBean(resultClass);
@@ -544,7 +543,7 @@ public class WorkflowAction {
}
protected List<ExecuteBuildingBlock> getConfigBuildingBlocks(ConfigBuildingBlocksDataObject dataObj)
- throws Exception {
+ throws AAIEntityNotFoundException, VnfcMultipleRelationshipException {
List<ExecuteBuildingBlock> flowsToExecuteConfigs = new ArrayList<>();
List<OrchestrationFlow> result = dataObj.getOrchFlows().stream()
@@ -658,7 +657,7 @@ public class WorkflowAction {
if (volumeGroupFromVfModule.isPresent()) {
String volumeGroupId = volumeGroupFromVfModule.get().getVolumeGroupId();
volumeGroupName = volumeGroupFromVfModule.get().getVolumeGroupName();
- logger.debug("Volume group id of the existing volume group is: " + volumeGroupId);
+ logger.debug("Volume group id of the existing volume group is: {}", volumeGroupId);
volumeGroupExisted = true;
dataObj.getWorkflowResourceIds().setVolumeGroupId(volumeGroupId);
dataObj.getReplaceInformation().setOldVolumeGroupName(volumeGroupName);
@@ -675,7 +674,7 @@ public class WorkflowAction {
String newVolumeGroupId = UUID.randomUUID().toString();
dataObj.getWorkflowResourceIds().setVolumeGroupId(newVolumeGroupId);
dataObj.getReplaceInformation().setOldVolumeGroupName(volumeGroupName);
- logger.debug("newVolumeGroupId: " + newVolumeGroupId);
+ logger.debug("newVolumeGroupId: {}", newVolumeGroupId);
}
}
@@ -702,7 +701,7 @@ public class WorkflowAction {
private void updateResourceIdsFromAAITraversal(List<ExecuteBuildingBlock> flowsToExecute,
List<Resource> resourceList, List<Pair<WorkflowType, String>> aaiResourceIds, String serviceInstanceId) {
for (Pair<WorkflowType, String> pair : aaiResourceIds) {
- logger.debug(pair.getValue0() + ", " + pair.getValue1());
+ logger.debug("{}, {}", pair.getValue0(), pair.getValue1());
}
Arrays.stream(WorkflowType.values()).filter(type -> !type.equals(WorkflowType.SERVICE))
@@ -1324,15 +1323,6 @@ public class WorkflowAction {
return sortedOrchFlows;
}
- private ConfigurationResourceKeys getConfigurationResourceKeys(Resource resource, String vnfcName) {
- ConfigurationResourceKeys configurationResourceKeys = new ConfigurationResourceKeys();
- Optional.ofNullable(vnfcName).ifPresent(configurationResourceKeys::setVnfcName);
- configurationResourceKeys.setCvnfcCustomizationUUID(resource.getCvnfModuleCustomizationId());
- configurationResourceKeys.setVfModuleCustomizationUUID(resource.getVfModuleCustomizationId());
- configurationResourceKeys.setVnfResourceCustomizationUUID(resource.getVnfCustomizationId());
- return configurationResourceKeys;
- }
-
protected List<OrchestrationFlow> queryNorthBoundRequestCatalogDb(DelegateExecution execution, String requestAction,
WorkflowType resourceName, boolean aLaCarte, String cloudOwner) {
return this.queryNorthBoundRequestCatalogDb(execution, requestAction, resourceName, aLaCarte, cloudOwner, "");
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/excpetion/VnfcMultipleRelationshipException.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/excpetion/VnfcMultipleRelationshipException.java
new file mode 100644
index 0000000000..8ef00655f2
--- /dev/null
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/excpetion/VnfcMultipleRelationshipException.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (c) 2021 Nokia
+ * ================================================================================
+ * 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.workflow.tasks.excpetion;
+
+public class VnfcMultipleRelationshipException extends Exception {
+
+ public VnfcMultipleRelationshipException(String vnfcName) {
+ super("Multiple relationships exist from VNFC " + vnfcName + " to Configurations");
+ }
+}
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilderTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilderTest.java
index c8914f6e02..fae2317c8d 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilderTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ExecuteBuildingBlockBuilderTest.java
@@ -27,6 +27,7 @@
package org.onap.so.bpmn.infrastructure.workflow.tasks;
import org.junit.Test;
+import org.onap.so.bpmn.servicedecomposition.entities.ConfigurationResourceKeys;
import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock;
import org.onap.so.db.catalog.beans.macro.OrchestrationFlow;
import java.util.ArrayList;
@@ -87,4 +88,26 @@ public class ExecuteBuildingBlockBuilderTest {
}
assertNotNull(result);
}
+
+ @Test
+ public void getConfigurationResourceKeysTest() {
+ String vnfcName = "vnfc";
+ String vfModuleCustomizationId = "1a2b3c4e5d";
+ String cvnfModuleCustomizationId = "2b1a3c";
+ String vnfCustomizationId = "zz12aa";
+
+ Resource resource = new Resource(WorkflowType.SERVICE, "123", true);
+
+ resource.setCvnfModuleCustomizationId(vfModuleCustomizationId);
+ resource.setCvnfModuleCustomizationId(cvnfModuleCustomizationId);
+ resource.setVnfCustomizationId(vnfCustomizationId);
+
+ ConfigurationResourceKeys confResourceKeys = executeBBBuilder.getConfigurationResourceKeys(resource, vnfcName);
+
+ assertNotNull(confResourceKeys);
+ assertEquals(vnfcName, confResourceKeys.getVnfcName());
+ assertEquals(cvnfModuleCustomizationId, confResourceKeys.getCvnfcCustomizationUUID());
+ assertEquals(vnfCustomizationId, confResourceKeys.getVnfResourceCustomizationUUID());
+
+ }
}
diff --git a/bpmn/so-bpmn-tasks/src/test/resources/schema.sql b/bpmn/so-bpmn-tasks/src/test/resources/schema.sql
index 5ae6a2d972..3a143f2619 100644
--- a/bpmn/so-bpmn-tasks/src/test/resources/schema.sql
+++ b/bpmn/so-bpmn-tasks/src/test/resources/schema.sql
@@ -9,6 +9,29 @@ create table ACT_GE_PROPERTY (
primary key (NAME_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+insert into ACT_GE_PROPERTY
+values ('schema.version', 'fox', 1);
+
+insert into ACT_GE_PROPERTY
+values ('schema.history', 'create(fox)', 1);
+
+insert into ACT_GE_PROPERTY
+values ('next.dbid', '1', 1);
+
+insert into ACT_GE_PROPERTY
+values ('deployment.lock', '0', 1);
+
+insert into ACT_GE_PROPERTY
+values ('history.cleanup.job.lock', '0', 1);
+
+insert into ACT_GE_PROPERTY
+values ('startup.lock', '0', 1);
+
+insert into ACT_GE_PROPERTY
+values ('telemetry.lock', '0', 1);
+
+insert into ACT_GE_PROPERTY
+values ('installationId.lock', '0', 1);
create table ACT_GE_BYTEARRAY (
ID_ varchar(64),
@@ -18,13 +41,27 @@ create table ACT_GE_BYTEARRAY (
BYTES_ LONGBLOB,
GENERATED_ TINYINT,
TENANT_ID_ varchar(64),
+ TYPE_ integer,
+ CREATE_TIME_ datetime(3),
+ ROOT_PROC_INST_ID_ varchar(64),
+ REMOVAL_TIME_ datetime(3),
+ primary key (ID_)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+
+create table ACT_GE_SCHEMA_LOG (
+ ID_ varchar(64),
+ TIMESTAMP_ datetime(3),
+ VERSION_ varchar(255),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+insert into ACT_GE_SCHEMA_LOG
+values ('0', CURRENT_TIMESTAMP, '7.14.0');
+
create table ACT_RE_DEPLOYMENT (
ID_ varchar(64),
NAME_ varchar(255),
- DEPLOY_TIME_ timestamp(3),
+ DEPLOY_TIME_ datetime(3),
SOURCE_ varchar(255),
TENANT_ID_ varchar(64),
primary key (ID_)
@@ -33,6 +70,7 @@ create table ACT_RE_DEPLOYMENT (
create table ACT_RU_EXECUTION (
ID_ varchar(64),
REV_ integer,
+ ROOT_PROC_INST_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
BUSINESS_KEY_ varchar(255),
PARENT_ID_ varchar(64),
@@ -57,7 +95,7 @@ create table ACT_RU_JOB (
ID_ varchar(64) NOT NULL,
REV_ integer,
TYPE_ varchar(255) NOT NULL,
- LOCK_EXP_TIME_ timestamp(3) NULL,
+ LOCK_EXP_TIME_ datetime(3) NULL,
LOCK_OWNER_ varchar(255),
EXCLUSIVE_ boolean,
EXECUTION_ID_ varchar(64),
@@ -67,8 +105,10 @@ create table ACT_RU_JOB (
RETRIES_ integer,
EXCEPTION_STACK_ID_ varchar(64),
EXCEPTION_MSG_ varchar(4000),
- DUEDATE_ timestamp(3) NULL,
+ FAILED_ACT_ID_ varchar(255),
+ DUEDATE_ datetime(3) NULL,
REPEAT_ varchar(255),
+ REPEAT_OFFSET_ bigint DEFAULT 0,
HANDLER_TYPE_ varchar(255),
HANDLER_CFG_ varchar(4000),
DEPLOYMENT_ID_ varchar(64),
@@ -77,6 +117,7 @@ create table ACT_RU_JOB (
PRIORITY_ bigint NOT NULL DEFAULT 0,
SEQUENCE_COUNTER_ bigint,
TENANT_ID_ varchar(64),
+ CREATE_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -91,6 +132,7 @@ create table ACT_RU_JOBDEF (
SUSPENSION_STATE_ integer,
JOB_PRIORITY_ bigint,
TENANT_ID_ varchar(64),
+ DEPLOYMENT_ID_ varchar(64),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -109,6 +151,7 @@ create table ACT_RE_PROCDEF (
TENANT_ID_ varchar(64),
VERSION_TAG_ varchar(64),
HISTORY_TTL_ integer,
+ STARTABLE_ boolean NOT NULL default TRUE,
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -129,7 +172,7 @@ create table ACT_RU_TASK (
ASSIGNEE_ varchar(255),
DELEGATION_ varchar(64),
PRIORITY_ integer,
- CREATE_TIME_ timestamp(3),
+ CREATE_TIME_ datetime(3),
DUE_DATE_ datetime(3),
FOLLOW_UP_DATE_ datetime(3),
SUSPENSION_STATE_ integer,
@@ -156,14 +199,16 @@ create table ACT_RU_VARIABLE (
NAME_ varchar(255) not null,
EXECUTION_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
+ PROC_DEF_ID_ varchar(64),
CASE_EXECUTION_ID_ varchar(64),
CASE_INST_ID_ varchar(64),
TASK_ID_ varchar(64),
+ BATCH_ID_ varchar(64),
BYTEARRAY_ID_ varchar(64),
DOUBLE_ double,
LONG_ bigint,
- TEXT_ LONGBLOB,
- TEXT2_ LONGBLOB,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
VAR_SCOPE_ varchar(64) not null,
SEQUENCE_COUNTER_ bigint,
IS_CONCURRENT_LOCAL_ TINYINT,
@@ -180,7 +225,7 @@ create table ACT_RU_EVENT_SUBSCR (
PROC_INST_ID_ varchar(64),
ACTIVITY_ID_ varchar(255),
CONFIGURATION_ varchar(255),
- CREATED_ timestamp(3) not null,
+ CREATED_ datetime(3) not null,
TENANT_ID_ varchar(64),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -188,11 +233,12 @@ create table ACT_RU_EVENT_SUBSCR (
create table ACT_RU_INCIDENT (
ID_ varchar(64) not null,
REV_ integer not null,
- INCIDENT_TIMESTAMP_ timestamp(3) not null,
+ INCIDENT_TIMESTAMP_ datetime(3) not null,
INCIDENT_MSG_ varchar(4000),
INCIDENT_TYPE_ varchar(255) not null,
EXECUTION_ID_ varchar(64),
ACTIVITY_ID_ varchar(255),
+ FAILED_ACTIVITY_ID_ varchar(255),
PROC_INST_ID_ varchar(64),
PROC_DEF_ID_ varchar(64),
CAUSE_INCIDENT_ID_ varchar(64),
@@ -212,6 +258,8 @@ create table ACT_RU_AUTHORIZATION (
RESOURCE_TYPE_ integer not null,
RESOURCE_ID_ varchar(255),
PERMS_ integer,
+ REMOVAL_TIME_ datetime(3),
+ ROOT_PROC_INST_ID_ varchar(64),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -231,7 +279,7 @@ create table ACT_RU_METER_LOG (
NAME_ varchar(64) not null,
REPORTER_ varchar(255),
VALUE_ bigint,
- TIMESTAMP_ timestamp(3),
+ TIMESTAMP_ datetime(3),
MILLISECONDS_ bigint DEFAULT 0,
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -244,7 +292,7 @@ create table ACT_RU_EXT_TASK (
RETRIES_ integer,
ERROR_MSG_ varchar(4000),
ERROR_DETAILS_ID_ varchar(64),
- LOCK_EXP_TIME_ timestamp(3) NULL,
+ LOCK_EXP_TIME_ datetime(3) NULL,
SUSPENSION_STATE_ integer,
EXECUTION_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
@@ -271,20 +319,26 @@ create table ACT_RU_BATCH (
SUSPENSION_STATE_ integer,
CONFIGURATION_ varchar(255),
TENANT_ID_ varchar(64),
+ CREATE_USER_ID_ varchar(255),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
+create index ACT_IDX_EXEC_ROOT_PI on ACT_RU_EXECUTION(ROOT_PROC_INST_ID_);
create index ACT_IDX_EXEC_BUSKEY on ACT_RU_EXECUTION(BUSINESS_KEY_);
create index ACT_IDX_EXEC_TENANT_ID on ACT_RU_EXECUTION(TENANT_ID_);
create index ACT_IDX_TASK_CREATE on ACT_RU_TASK(CREATE_TIME_);
create index ACT_IDX_TASK_ASSIGNEE on ACT_RU_TASK(ASSIGNEE_);
+create index ACT_IDX_TASK_OWNER on ACT_RU_TASK(OWNER_);
create index ACT_IDX_TASK_TENANT_ID on ACT_RU_TASK(TENANT_ID_);
create index ACT_IDX_IDENT_LNK_USER on ACT_RU_IDENTITYLINK(USER_ID_);
create index ACT_IDX_IDENT_LNK_GROUP on ACT_RU_IDENTITYLINK(GROUP_ID_);
create index ACT_IDX_EVENT_SUBSCR_CONFIG_ on ACT_RU_EVENT_SUBSCR(CONFIGURATION_);
create index ACT_IDX_EVENT_SUBSCR_TENANT_ID on ACT_RU_EVENT_SUBSCR(TENANT_ID_);
+
create index ACT_IDX_VARIABLE_TASK_ID on ACT_RU_VARIABLE(TASK_ID_);
create index ACT_IDX_VARIABLE_TENANT_ID on ACT_RU_VARIABLE(TENANT_ID_);
+create index ACT_IDX_VARIABLE_TASK_NAME_TYPE on ACT_RU_VARIABLE(TASK_ID_, NAME_, TYPE_);
+
create index ACT_IDX_ATHRZ_PROCEDEF on ACT_RU_IDENTITYLINK(PROC_DEF_ID_);
create index ACT_IDX_INC_CONFIGURATION on ACT_RU_INCIDENT(CONFIGURATION_);
create index ACT_IDX_INC_TENANT_ID on ACT_RU_INCIDENT(TENANT_ID_);
@@ -458,6 +512,12 @@ alter table ACT_RU_BATCH
foreign key (BATCH_JOB_DEF_ID_)
references ACT_RU_JOBDEF (ID_);
+create index ACT_IDX_BATCH_ID ON ACT_RU_VARIABLE(BATCH_ID_);
+alter table ACT_RU_VARIABLE
+ add constraint ACT_FK_VAR_BATCH
+ foreign key (BATCH_ID_)
+ references ACT_RU_BATCH (ID_);
+
-- indexes for deadlock problems - https://app.camunda.com/jira/browse/CAM-2567 --
create index ACT_IDX_INC_CAUSEINCID on ACT_RU_INCIDENT(CAUSE_INCIDENT_ID_);
create index ACT_IDX_INC_EXID on ACT_RU_INCIDENT(EXECUTION_ID_);
@@ -470,6 +530,8 @@ create index ACT_IDX_AUTH_RESOURCE_ID on ACT_RU_AUTHORIZATION(RESOURCE_ID_);
create index ACT_IDX_EXT_TASK_EXEC on ACT_RU_EXT_TASK(EXECUTION_ID_);
-- indexes to improve deployment
+create index ACT_IDX_BYTEARRAY_ROOT_PI on ACT_GE_BYTEARRAY(ROOT_PROC_INST_ID_);
+create index ACT_IDX_BYTEARRAY_RM_TIME on ACT_GE_BYTEARRAY(REMOVAL_TIME_);
create index ACT_IDX_BYTEARRAY_NAME on ACT_GE_BYTEARRAY(NAME_);
create index ACT_IDX_DEPLOYMENT_NAME on ACT_RE_DEPLOYMENT(NAME_);
create index ACT_IDX_DEPLOYMENT_TENANT_ID on ACT_RE_DEPLOYMENT(TENANT_ID_);
@@ -479,6 +541,27 @@ create index ACT_IDX_EVENT_SUBSCR_EVT_NAME ON ACT_RU_EVENT_SUBSCR(EVENT_NAME_);
create index ACT_IDX_PROCDEF_DEPLOYMENT_ID ON ACT_RE_PROCDEF(DEPLOYMENT_ID_);
create index ACT_IDX_PROCDEF_TENANT_ID ON ACT_RE_PROCDEF(TENANT_ID_);
create index ACT_IDX_PROCDEF_VER_TAG ON ACT_RE_PROCDEF(VERSION_TAG_);
+
+-- indices for history cleanup: https://jira.camunda.com/browse/CAM-11616
+create index ACT_IDX_AUTH_ROOT_PI on ACT_RU_AUTHORIZATION(ROOT_PROC_INST_ID_);
+create index ACT_IDX_AUTH_RM_TIME on ACT_RU_AUTHORIZATION(REMOVAL_TIME_);
+--
+-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+-- under one or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information regarding copyright
+-- ownership. Camunda licenses this file to you under the Apache License,
+-- Version 2.0; 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.
+--
+
-- create case definition table --
create table ACT_RE_CASE_DEF (
ID_ varchar(64) not null,
@@ -535,6 +618,9 @@ create table ACT_RU_CASE_SENTRY_PART (
-- create index on business key --
create index ACT_IDX_CASE_EXEC_BUSKEY on ACT_RU_CASE_EXECUTION(BUSINESS_KEY_);
+-- https://app.camunda.com/jira/browse/CAM-9165
+create index ACT_IDX_CASE_EXE_CASE_INST on ACT_RU_CASE_EXECUTION(CASE_INST_ID_);
+
-- create foreign key constraints on ACT_RU_CASE_EXECUTION --
alter table ACT_RU_CASE_EXECUTION
add constraint ACT_FK_CASE_EXE_CASE_INST
@@ -586,6 +672,23 @@ alter table ACT_RU_CASE_SENTRY_PART
create index ACT_IDX_CASE_DEF_TENANT_ID on ACT_RE_CASE_DEF(TENANT_ID_);
create index ACT_IDX_CASE_EXEC_TENANT_ID on ACT_RU_CASE_EXECUTION(TENANT_ID_);
+--
+-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+-- under one or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information regarding copyright
+-- ownership. Camunda licenses this file to you under the Apache License,
+-- Version 2.0; 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.
+--
+
-- create decision definition table --
create table ACT_RE_DECISION_DEF (
ID_ varchar(64) not null,
@@ -628,6 +731,23 @@ alter table ACT_RE_DECISION_DEF
create index ACT_IDX_DEC_DEF_TENANT_ID on ACT_RE_DECISION_DEF(TENANT_ID_);
create index ACT_IDX_DEC_DEF_REQ_ID on ACT_RE_DECISION_DEF(DEC_REQ_ID_);
create index ACT_IDX_DEC_REQ_DEF_TENANT_ID on ACT_RE_DECISION_REQ_DEF(TENANT_ID_);
+--
+-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+-- under one or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information regarding copyright
+-- ownership. Camunda licenses this file to you under the Apache License,
+-- Version 2.0; 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.
+--
+
create table ACT_HI_PROCINST (
ID_ varchar(64) not null,
PROC_INST_ID_ varchar(64) not null,
@@ -636,11 +756,13 @@ create table ACT_HI_PROCINST (
PROC_DEF_ID_ varchar(64) not null,
START_TIME_ datetime(3) not null,
END_TIME_ datetime(3),
+ REMOVAL_TIME_ datetime(3),
DURATION_ bigint,
START_USER_ID_ varchar(255),
START_ACT_ID_ varchar(255),
END_ACT_ID_ varchar(255),
SUPER_PROCESS_INSTANCE_ID_ varchar(64),
+ ROOT_PROC_INST_ID_ varchar(64),
SUPER_CASE_INSTANCE_ID_ varchar(64),
CASE_INST_ID_ varchar(64),
DELETE_REASON_ varchar(4000),
@@ -655,6 +777,7 @@ create table ACT_HI_ACTINST (
PARENT_ACT_INST_ID_ varchar(64),
PROC_DEF_KEY_ varchar(255),
PROC_DEF_ID_ varchar(64) not null,
+ ROOT_PROC_INST_ID_ varchar(64),
PROC_INST_ID_ varchar(64) not null,
EXECUTION_ID_ varchar(64) not null,
ACT_ID_ varchar(255) not null,
@@ -663,13 +786,14 @@ create table ACT_HI_ACTINST (
CALL_CASE_INST_ID_ varchar(64),
ACT_NAME_ varchar(255),
ACT_TYPE_ varchar(255) not null,
- ASSIGNEE_ varchar(64),
+ ASSIGNEE_ varchar(255),
START_TIME_ datetime(3) not null,
END_TIME_ datetime(3),
DURATION_ bigint,
ACT_INST_STATE_ integer,
SEQUENCE_COUNTER_ bigint,
TENANT_ID_ varchar(64),
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -678,6 +802,7 @@ create table ACT_HI_TASKINST (
TASK_DEF_KEY_ varchar(255),
PROC_DEF_KEY_ varchar(255),
PROC_DEF_ID_ varchar(64),
+ ROOT_PROC_INST_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
EXECUTION_ID_ varchar(64),
CASE_DEF_KEY_ varchar(255),
@@ -698,6 +823,7 @@ create table ACT_HI_TASKINST (
DUE_DATE_ datetime(3),
FOLLOW_UP_DATE_ datetime(3),
TENANT_ID_ varchar(64),
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -705,6 +831,7 @@ create table ACT_HI_VARINST (
ID_ varchar(64) not null,
PROC_DEF_KEY_ varchar(255),
PROC_DEF_ID_ varchar(64),
+ ROOT_PROC_INST_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
EXECUTION_ID_ varchar(64),
ACT_INST_ID_ varchar(64),
@@ -715,14 +842,16 @@ create table ACT_HI_VARINST (
TASK_ID_ varchar(64),
NAME_ varchar(255) not null,
VAR_TYPE_ varchar(100),
+ CREATE_TIME_ datetime(3),
REV_ integer,
BYTEARRAY_ID_ varchar(64),
DOUBLE_ double,
LONG_ bigint,
- TEXT_ LONGBLOB,
- TEXT2_ LONGBLOB,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
TENANT_ID_ varchar(64),
STATE_ varchar(20),
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -731,6 +860,7 @@ create table ACT_HI_DETAIL (
TYPE_ varchar(255) not null,
PROC_DEF_KEY_ varchar(255),
PROC_DEF_ID_ varchar(64),
+ ROOT_PROC_INST_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
EXECUTION_ID_ varchar(64),
CASE_DEF_KEY_ varchar(255),
@@ -747,11 +877,13 @@ create table ACT_HI_DETAIL (
BYTEARRAY_ID_ varchar(64),
DOUBLE_ double,
LONG_ bigint,
- TEXT_ LONGBLOB,
- TEXT2_ LONGBLOB,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
SEQUENCE_COUNTER_ bigint,
TENANT_ID_ varchar(64),
OPERATION_ID_ varchar(64),
+ REMOVAL_TIME_ datetime(3),
+ INITIAL_ boolean,
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -762,11 +894,13 @@ create table ACT_HI_IDENTITYLINK (
USER_ID_ varchar(255),
GROUP_ID_ varchar(255),
TASK_ID_ varchar(64),
+ ROOT_PROC_INST_ID_ varchar(64),
PROC_DEF_ID_ varchar(64),
OPERATION_TYPE_ varchar(64),
ASSIGNER_ID_ varchar(64),
PROC_DEF_KEY_ varchar(255),
TENANT_ID_ varchar(64),
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -776,11 +910,13 @@ create table ACT_HI_COMMENT (
TIME_ datetime(3) not null,
USER_ID_ varchar(255),
TASK_ID_ varchar(64),
+ ROOT_PROC_INST_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
ACTION_ varchar(255),
MESSAGE_ varchar(4000),
FULL_MSG_ LONGBLOB,
TENANT_ID_ varchar(64),
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -792,10 +928,13 @@ create table ACT_HI_ATTACHMENT (
DESCRIPTION_ varchar(4000),
TYPE_ varchar(255),
TASK_ID_ varchar(64),
+ ROOT_PROC_INST_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
URL_ varchar(4000),
CONTENT_ID_ varchar(64),
TENANT_ID_ varchar(64),
+ CREATE_TIME_ datetime(3),
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -804,6 +943,7 @@ create table ACT_HI_OP_LOG (
DEPLOYMENT_ID_ varchar(64),
PROC_DEF_ID_ varchar(64),
PROC_DEF_KEY_ varchar(255),
+ ROOT_PROC_INST_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
EXECUTION_ID_ varchar(64),
CASE_DEF_ID_ varchar(64),
@@ -822,6 +962,10 @@ create table ACT_HI_OP_LOG (
ORG_VALUE_ varchar(4000),
NEW_VALUE_ varchar(4000),
TENANT_ID_ varchar(64),
+ REMOVAL_TIME_ datetime(3),
+ CATEGORY_ varchar(64),
+ EXTERNAL_TASK_ID_ varchar(64),
+ ANNOTATION_ varchar(4000),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -829,6 +973,7 @@ create table ACT_HI_INCIDENT (
ID_ varchar(64) not null,
PROC_DEF_KEY_ varchar(255),
PROC_DEF_ID_ varchar(64),
+ ROOT_PROC_INST_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
EXECUTION_ID_ varchar(64),
CREATE_TIME_ timestamp(3) not null,
@@ -836,20 +981,23 @@ create table ACT_HI_INCIDENT (
INCIDENT_MSG_ varchar(4000),
INCIDENT_TYPE_ varchar(255) not null,
ACTIVITY_ID_ varchar(255),
+ FAILED_ACTIVITY_ID_ varchar(255),
CAUSE_INCIDENT_ID_ varchar(64),
ROOT_CAUSE_INCIDENT_ID_ varchar(64),
CONFIGURATION_ varchar(255),
+ HISTORY_CONFIGURATION_ varchar(255),
INCIDENT_STATE_ integer,
TENANT_ID_ varchar(64),
JOB_DEF_ID_ varchar(64),
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
create table ACT_HI_JOB_LOG (
ID_ varchar(64) not null,
- TIMESTAMP_ timestamp(3) not null,
+ TIMESTAMP_ datetime(3) not null,
JOB_ID_ varchar(64) not null,
- JOB_DUEDATE_ timestamp(3) NULL,
+ JOB_DUEDATE_ datetime(3) NULL,
JOB_RETRIES_ integer,
JOB_PRIORITY_ bigint NOT NULL DEFAULT 0,
JOB_EXCEPTION_MSG_ varchar(4000),
@@ -859,6 +1007,8 @@ create table ACT_HI_JOB_LOG (
JOB_DEF_TYPE_ varchar(255),
JOB_DEF_CONFIGURATION_ varchar(255),
ACT_ID_ varchar(255),
+ FAILED_ACT_ID_ varchar(255),
+ ROOT_PROC_INST_ID_ varchar(64),
EXECUTION_ID_ varchar(64),
PROCESS_INSTANCE_ID_ varchar(64),
PROCESS_DEF_ID_ varchar(64),
@@ -866,6 +1016,8 @@ create table ACT_HI_JOB_LOG (
DEPLOYMENT_ID_ varchar(64),
SEQUENCE_COUNTER_ bigint,
TENANT_ID_ varchar(64),
+ HOSTNAME_ varchar(255),
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -879,8 +1031,10 @@ create table ACT_HI_BATCH (
MONITOR_JOB_DEF_ID_ varchar(64),
BATCH_JOB_DEF_ID_ varchar(64),
TENANT_ID_ varchar(64),
+ CREATE_USER_ID_ varchar(255),
START_TIME_ datetime(3) not null,
END_TIME_ datetime(3),
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -897,11 +1051,13 @@ create table ACT_HI_EXT_TASK_LOG (
ACT_ID_ varchar(255),
ACT_INST_ID_ varchar(64),
EXECUTION_ID_ varchar(64),
+ ROOT_PROC_INST_ID_ varchar(64),
PROC_INST_ID_ varchar(64),
PROC_DEF_ID_ varchar(64),
PROC_DEF_KEY_ varchar(255),
TENANT_ID_ varchar(64),
STATE_ integer,
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -909,20 +1065,32 @@ create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_);
create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_);
create index ACT_IDX_HI_PRO_INST_TENANT_ID on ACT_HI_PROCINST(TENANT_ID_);
create index ACT_IDX_HI_PRO_INST_PROC_DEF_KEY on ACT_HI_PROCINST(PROC_DEF_KEY_);
+create index ACT_IDX_HI_PRO_INST_PROC_TIME on ACT_HI_PROCINST(START_TIME_, END_TIME_);
+create index ACT_IDX_HI_PI_PDEFID_END_TIME on ACT_HI_PROCINST(PROC_DEF_ID_, END_TIME_);
+create index ACT_IDX_HI_PRO_INST_ROOT_PI on ACT_HI_PROCINST(ROOT_PROC_INST_ID_);
+create index ACT_IDX_HI_PRO_INST_RM_TIME on ACT_HI_PROCINST(REMOVAL_TIME_);
-create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_);
+create index ACT_IDX_HI_ACTINST_ROOT_PI on ACT_HI_ACTINST(ROOT_PROC_INST_ID_);
+create index ACT_IDX_HI_ACT_INST_START_END on ACT_HI_ACTINST(START_TIME_, END_TIME_);
create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_);
create index ACT_IDX_HI_ACT_INST_PROCINST on ACT_HI_ACTINST(PROC_INST_ID_, ACT_ID_);
create index ACT_IDX_HI_ACT_INST_COMP on ACT_HI_ACTINST(EXECUTION_ID_, ACT_ID_, END_TIME_, ID_);
-create index ACT_IDX_HI_ACT_INST_STATS on ACT_HI_ACTINST(PROC_DEF_ID_, ACT_ID_, END_TIME_, ACT_INST_STATE_);
+create index ACT_IDX_HI_ACT_INST_STATS on ACT_HI_ACTINST(PROC_DEF_ID_, PROC_INST_ID_, ACT_ID_, END_TIME_, ACT_INST_STATE_);
create index ACT_IDX_HI_ACT_INST_TENANT_ID on ACT_HI_ACTINST(TENANT_ID_);
create index ACT_IDX_HI_ACT_INST_PROC_DEF_KEY on ACT_HI_ACTINST(PROC_DEF_KEY_);
+create index ACT_IDX_HI_AI_PDEFID_END_TIME on ACT_HI_ACTINST(PROC_DEF_ID_, END_TIME_);
+create index ACT_IDX_HI_ACT_INST_RM_TIME on ACT_HI_ACTINST(REMOVAL_TIME_);
+create index ACT_IDX_HI_TASKINST_ROOT_PI on ACT_HI_TASKINST(ROOT_PROC_INST_ID_);
create index ACT_IDX_HI_TASK_INST_TENANT_ID on ACT_HI_TASKINST(TENANT_ID_);
create index ACT_IDX_HI_TASK_INST_PROC_DEF_KEY on ACT_HI_TASKINST(PROC_DEF_KEY_);
create index ACT_IDX_HI_TASKINST_PROCINST on ACT_HI_TASKINST(PROC_INST_ID_);
create index ACT_IDX_HI_TASKINSTID_PROCINST on ACT_HI_TASKINST(ID_,PROC_INST_ID_);
+create index ACT_IDX_HI_TASK_INST_RM_TIME on ACT_HI_TASKINST(REMOVAL_TIME_);
+create index ACT_IDX_HI_TASK_INST_START on ACT_HI_TASKINST(START_TIME_);
+create index ACT_IDX_HI_TASK_INST_END on ACT_HI_TASKINST(END_TIME_);
+create index ACT_IDX_HI_DETAIL_ROOT_PI on ACT_HI_DETAIL(ROOT_PROC_INST_ID_);
create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_);
create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_);
create index ACT_IDX_HI_DETAIL_CASE_INST on ACT_HI_DETAIL(CASE_INST_ID_);
@@ -933,46 +1101,94 @@ create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_);
create index ACT_IDX_HI_DETAIL_TENANT_ID on ACT_HI_DETAIL(TENANT_ID_);
create index ACT_IDX_HI_DETAIL_PROC_DEF_KEY on ACT_HI_DETAIL(PROC_DEF_KEY_);
create index ACT_IDX_HI_DETAIL_BYTEAR on ACT_HI_DETAIL(BYTEARRAY_ID_);
+create index ACT_IDX_HI_DETAIL_RM_TIME on ACT_HI_DETAIL(REMOVAL_TIME_);
+create index ACT_IDX_HI_DETAIL_TASK_BYTEAR on ACT_HI_DETAIL(BYTEARRAY_ID_, TASK_ID_);
+create index ACT_IDX_HI_DETAIL_VAR_INST_ID on ACT_HI_DETAIL(VAR_INST_ID_);
+create index ACT_IDX_HI_IDENT_LNK_ROOT_PI on ACT_HI_IDENTITYLINK(ROOT_PROC_INST_ID_);
create index ACT_IDX_HI_IDENT_LNK_USER on ACT_HI_IDENTITYLINK(USER_ID_);
create index ACT_IDX_HI_IDENT_LNK_GROUP on ACT_HI_IDENTITYLINK(GROUP_ID_);
create index ACT_IDX_HI_IDENT_LNK_TENANT_ID on ACT_HI_IDENTITYLINK(TENANT_ID_);
create index ACT_IDX_HI_IDENT_LNK_PROC_DEF_KEY on ACT_HI_IDENTITYLINK(PROC_DEF_KEY_);
create index ACT_IDX_HI_IDENT_LINK_TASK on ACT_HI_IDENTITYLINK(TASK_ID_);
+create index ACT_IDX_HI_IDENT_LINK_RM_TIME on ACT_HI_IDENTITYLINK(REMOVAL_TIME_);
+create index ACT_IDX_HI_IDENT_LNK_TIMESTAMP on ACT_HI_IDENTITYLINK(TIMESTAMP_);
+create index ACT_IDX_HI_VARINST_ROOT_PI on ACT_HI_VARINST(ROOT_PROC_INST_ID_);
create index ACT_IDX_HI_PROCVAR_PROC_INST on ACT_HI_VARINST(PROC_INST_ID_);
create index ACT_IDX_HI_PROCVAR_NAME_TYPE on ACT_HI_VARINST(NAME_, VAR_TYPE_);
create index ACT_IDX_HI_CASEVAR_CASE_INST on ACT_HI_VARINST(CASE_INST_ID_);
create index ACT_IDX_HI_VAR_INST_TENANT_ID on ACT_HI_VARINST(TENANT_ID_);
create index ACT_IDX_HI_VAR_INST_PROC_DEF_KEY on ACT_HI_VARINST(PROC_DEF_KEY_);
create index ACT_IDX_HI_VARINST_BYTEAR on ACT_HI_VARINST(BYTEARRAY_ID_);
+create index ACT_IDX_HI_VARINST_RM_TIME on ACT_HI_VARINST(REMOVAL_TIME_);
+create index ACT_IDX_HI_VAR_PI_NAME_TYPE on ACT_HI_VARINST(PROC_INST_ID_, NAME_, VAR_TYPE_);
create index ACT_IDX_HI_INCIDENT_TENANT_ID on ACT_HI_INCIDENT(TENANT_ID_);
create index ACT_IDX_HI_INCIDENT_PROC_DEF_KEY on ACT_HI_INCIDENT(PROC_DEF_KEY_);
+create index ACT_IDX_HI_INCIDENT_ROOT_PI on ACT_HI_INCIDENT(ROOT_PROC_INST_ID_);
create index ACT_IDX_HI_INCIDENT_PROCINST on ACT_HI_INCIDENT(PROC_INST_ID_);
+create index ACT_IDX_HI_INCIDENT_RM_TIME on ACT_HI_INCIDENT(REMOVAL_TIME_);
+create index ACT_IDX_HI_INCIDENT_CREATE_TIME on ACT_HI_INCIDENT(CREATE_TIME_);
+create index ACT_IDX_HI_INCIDENT_END_TIME on ACT_HI_INCIDENT(END_TIME_);
+create index ACT_IDX_HI_JOB_LOG_ROOT_PI on ACT_HI_JOB_LOG(ROOT_PROC_INST_ID_);
create index ACT_IDX_HI_JOB_LOG_PROCINST on ACT_HI_JOB_LOG(PROCESS_INSTANCE_ID_);
create index ACT_IDX_HI_JOB_LOG_PROCDEF on ACT_HI_JOB_LOG(PROCESS_DEF_ID_);
create index ACT_IDX_HI_JOB_LOG_TENANT_ID on ACT_HI_JOB_LOG(TENANT_ID_);
create index ACT_IDX_HI_JOB_LOG_JOB_DEF_ID on ACT_HI_JOB_LOG(JOB_DEF_ID_);
create index ACT_IDX_HI_JOB_LOG_PROC_DEF_KEY on ACT_HI_JOB_LOG(PROCESS_DEF_KEY_);
create index ACT_IDX_HI_JOB_LOG_EX_STACK on ACT_HI_JOB_LOG(JOB_EXCEPTION_STACK_ID_);
+create index ACT_IDX_HI_JOB_LOG_RM_TIME on ACT_HI_JOB_LOG(REMOVAL_TIME_);
+create index ACT_IDX_HI_JOB_LOG_JOB_CONF on ACT_HI_JOB_LOG(JOB_DEF_CONFIGURATION_);
+
+create index ACT_HI_BAT_RM_TIME on ACT_HI_BATCH(REMOVAL_TIME_);
+create index ACT_HI_EXT_TASK_LOG_ROOT_PI on ACT_HI_EXT_TASK_LOG(ROOT_PROC_INST_ID_);
create index ACT_HI_EXT_TASK_LOG_PROCINST on ACT_HI_EXT_TASK_LOG(PROC_INST_ID_);
create index ACT_HI_EXT_TASK_LOG_PROCDEF on ACT_HI_EXT_TASK_LOG(PROC_DEF_ID_);
create index ACT_HI_EXT_TASK_LOG_PROC_DEF_KEY on ACT_HI_EXT_TASK_LOG(PROC_DEF_KEY_);
create index ACT_HI_EXT_TASK_LOG_TENANT_ID on ACT_HI_EXT_TASK_LOG(TENANT_ID_);
create index ACT_IDX_HI_EXTTASKLOG_ERRORDET on ACT_HI_EXT_TASK_LOG(ERROR_DETAILS_ID_);
+create index ACT_HI_EXT_TASK_LOG_RM_TIME on ACT_HI_EXT_TASK_LOG(REMOVAL_TIME_);
+create index ACT_IDX_HI_OP_LOG_ROOT_PI on ACT_HI_OP_LOG(ROOT_PROC_INST_ID_);
create index ACT_IDX_HI_OP_LOG_PROCINST on ACT_HI_OP_LOG(PROC_INST_ID_);
create index ACT_IDX_HI_OP_LOG_PROCDEF on ACT_HI_OP_LOG(PROC_DEF_ID_);
+create index ACT_IDX_HI_OP_LOG_TASK on ACT_HI_OP_LOG(TASK_ID_);
+create index ACT_IDX_HI_OP_LOG_RM_TIME on ACT_HI_OP_LOG(REMOVAL_TIME_);
+create index ACT_IDX_HI_OP_LOG_TIMESTAMP on ACT_HI_OP_LOG(TIMESTAMP_);
+create index ACT_IDX_HI_OP_LOG_USER_ID on ACT_HI_OP_LOG(USER_ID_);
+create index ACT_IDX_HI_OP_LOG_OP_TYPE on ACT_HI_OP_LOG(OPERATION_TYPE_);
+create index ACT_IDX_HI_OP_LOG_ENTITY_TYPE on ACT_HI_OP_LOG(ENTITY_TYPE_);
create index ACT_IDX_HI_COMMENT_TASK on ACT_HI_COMMENT(TASK_ID_);
+create index ACT_IDX_HI_COMMENT_ROOT_PI on ACT_HI_COMMENT(ROOT_PROC_INST_ID_);
create index ACT_IDX_HI_COMMENT_PROCINST on ACT_HI_COMMENT(PROC_INST_ID_);
+create index ACT_IDX_HI_COMMENT_RM_TIME on ACT_HI_COMMENT(REMOVAL_TIME_);
create index ACT_IDX_HI_ATTACHMENT_CONTENT on ACT_HI_ATTACHMENT(CONTENT_ID_);
+create index ACT_IDX_HI_ATTACHMENT_ROOT_PI on ACT_HI_ATTACHMENT(ROOT_PROC_INST_ID_);
create index ACT_IDX_HI_ATTACHMENT_PROCINST on ACT_HI_ATTACHMENT(PROC_INST_ID_);
create index ACT_IDX_HI_ATTACHMENT_TASK on ACT_HI_ATTACHMENT(TASK_ID_);
+create index ACT_IDX_HI_ATTACHMENT_RM_TIME on ACT_HI_ATTACHMENT(REMOVAL_TIME_);
+--
+-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+-- under one or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information regarding copyright
+-- ownership. Camunda licenses this file to you under the Apache License,
+-- Version 2.0; 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.
+--
+
create table ACT_HI_CASEINST (
ID_ varchar(64) not null,
CASE_INST_ID_ varchar(64) not null,
@@ -1018,6 +1234,23 @@ create index ACT_IDX_HI_CAS_A_I_END on ACT_HI_CASEACTINST(END_TIME_);
create index ACT_IDX_HI_CAS_A_I_COMP on ACT_HI_CASEACTINST(CASE_ACT_ID_, END_TIME_, ID_);
create index ACT_IDX_HI_CAS_A_I_CASEINST on ACT_HI_CASEACTINST(CASE_INST_ID_, CASE_ACT_ID_);
create index ACT_IDX_HI_CAS_A_I_TENANT_ID on ACT_HI_CASEACTINST(TENANT_ID_);
+--
+-- Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
+-- under one or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information regarding copyright
+-- ownership. Camunda licenses this file to you under the Apache License,
+-- Version 2.0; 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.
+--
+
-- create history decision instance table --
create table ACT_HI_DECINST (
ID_ varchar(64) NOT NULL,
@@ -1033,9 +1266,11 @@ create table ACT_HI_DECINST (
ACT_INST_ID_ varchar(64),
ACT_ID_ varchar(255),
EVAL_TIME_ datetime(3) not null,
+ REMOVAL_TIME_ datetime(3),
COLLECT_VALUE_ double,
USER_ID_ varchar(255),
ROOT_DEC_INST_ID_ varchar(64),
+ ROOT_PROC_INST_ID_ varchar(64),
DEC_REQ_ID_ varchar(64),
DEC_REQ_KEY_ varchar(255),
TENANT_ID_ varchar(64),
@@ -1052,9 +1287,12 @@ create table ACT_HI_DEC_IN (
BYTEARRAY_ID_ varchar(64),
DOUBLE_ double,
LONG_ bigint,
- TEXT_ LONGBLOB,
- TEXT2_ LONGBLOB,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
TENANT_ID_ varchar(64),
+ CREATE_TIME_ datetime(3),
+ ROOT_PROC_INST_ID_ varchar(64),
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -1071,9 +1309,12 @@ create table ACT_HI_DEC_OUT (
BYTEARRAY_ID_ varchar(64),
DOUBLE_ double,
LONG_ bigint,
- TEXT_ LONGBLOB,
- TEXT2_ LONGBLOB,
+ TEXT_ varchar(4000),
+ TEXT2_ varchar(4000),
TENANT_ID_ varchar(64),
+ CREATE_TIME_ datetime(3),
+ ROOT_PROC_INST_ID_ varchar(64),
+ REMOVAL_TIME_ datetime(3),
primary key (ID_)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
@@ -1089,107 +1330,16 @@ create index ACT_IDX_HI_DEC_INST_TENANT_ID on ACT_HI_DECINST(TENANT_ID_);
create index ACT_IDX_HI_DEC_INST_ROOT_ID on ACT_HI_DECINST(ROOT_DEC_INST_ID_);
create index ACT_IDX_HI_DEC_INST_REQ_ID on ACT_HI_DECINST(DEC_REQ_ID_);
create index ACT_IDX_HI_DEC_INST_REQ_KEY on ACT_HI_DECINST(DEC_REQ_KEY_);
+create index ACT_IDX_HI_DEC_INST_ROOT_PI on ACT_HI_DECINST(ROOT_PROC_INST_ID_);
+create index ACT_IDX_HI_DEC_INST_RM_TIME on ACT_HI_DECINST(REMOVAL_TIME_);
create index ACT_IDX_HI_DEC_IN_INST on ACT_HI_DEC_IN(DEC_INST_ID_);
create index ACT_IDX_HI_DEC_IN_CLAUSE on ACT_HI_DEC_IN(DEC_INST_ID_, CLAUSE_ID_);
+create index ACT_IDX_HI_DEC_IN_ROOT_PI on ACT_HI_DEC_IN(ROOT_PROC_INST_ID_);
+create index ACT_IDX_HI_DEC_IN_RM_TIME on ACT_HI_DEC_IN(REMOVAL_TIME_);
create index ACT_IDX_HI_DEC_OUT_INST on ACT_HI_DEC_OUT(DEC_INST_ID_);
create index ACT_IDX_HI_DEC_OUT_RULE on ACT_HI_DEC_OUT(RULE_ORDER_, CLAUSE_ID_);
-
--- mariadb_identity_7.8.0-ee
-
-create table ACT_ID_GROUP (
- ID_ varchar(64),
- REV_ integer,
- NAME_ varchar(255),
- TYPE_ varchar(255),
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_ID_MEMBERSHIP (
- USER_ID_ varchar(64),
- GROUP_ID_ varchar(64),
- primary key (USER_ID_, GROUP_ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_ID_USER (
- ID_ varchar(64),
- REV_ integer,
- FIRST_ varchar(255),
- LAST_ varchar(255),
- EMAIL_ varchar(255),
- PWD_ varchar(255),
- SALT_ varchar(255),
- PICTURE_ID_ varchar(64),
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_ID_INFO (
- ID_ varchar(64),
- REV_ integer,
- USER_ID_ varchar(64),
- TYPE_ varchar(64),
- KEY_ varchar(255),
- VALUE_ varchar(255),
- PASSWORD_ LONGBLOB,
- PARENT_ID_ varchar(255),
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_ID_TENANT (
- ID_ varchar(64),
- REV_ integer,
- NAME_ varchar(255),
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-create table ACT_ID_TENANT_MEMBER (
- ID_ varchar(64) not null,
- TENANT_ID_ varchar(64) not null,
- USER_ID_ varchar(64),
- GROUP_ID_ varchar(64),
- primary key (ID_)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_bin;
-
-alter table ACT_ID_MEMBERSHIP
- add constraint ACT_FK_MEMB_GROUP
- foreign key (GROUP_ID_)
- references ACT_ID_GROUP (ID_);
-
-alter table ACT_ID_MEMBERSHIP
- add constraint ACT_FK_MEMB_USER
- foreign key (USER_ID_)
- references ACT_ID_USER (ID_);
-
-alter table ACT_ID_TENANT_MEMBER
- add constraint ACT_UNIQ_TENANT_MEMB_USER
- unique (TENANT_ID_, USER_ID_);
-
-alter table ACT_ID_TENANT_MEMBER
- add constraint ACT_UNIQ_TENANT_MEMB_GROUP
- unique (TENANT_ID_, GROUP_ID_);
-
-alter table ACT_ID_TENANT_MEMBER
- add constraint ACT_FK_TENANT_MEMB
- foreign key (TENANT_ID_)
- references ACT_ID_TENANT (ID_);
-
-alter table ACT_ID_TENANT_MEMBER
- add constraint ACT_FK_TENANT_MEMB_USER
- foreign key (USER_ID_)
- references ACT_ID_USER (ID_);
-
-alter table ACT_ID_TENANT_MEMBER
- add constraint ACT_FK_TENANT_MEMB_GROUP
- foreign key (GROUP_ID_)
- references ACT_ID_GROUP (ID_);
-
-ALTER TABLE ACT_GE_BYTEARRAY
- ADD TYPE_ integer;
-
-ALTER TABLE ACT_GE_BYTEARRAY
- ADD CREATE_TIME_ datetime(3);
-
-ALTER TABLE ACT_RE_PROCDEF
- ADD STARTABLE_ BOOLEAN NOT NULL DEFAULT TRUE; \ No newline at end of file
+create index ACT_IDX_HI_DEC_OUT_ROOT_PI on ACT_HI_DEC_OUT(ROOT_PROC_INST_ID_);
+create index ACT_IDX_HI_DEC_OUT_RM_TIME on ACT_HI_DEC_OUT(REMOVAL_TIME_);