aboutsummaryrefslogtreecommitdiffstats
path: root/mso-catalog-db/src
diff options
context:
space:
mode:
Diffstat (limited to 'mso-catalog-db/src')
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java2
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java4
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategoriesId.java82
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java9
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParametersId.java83
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java18
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecParameters.java29
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java7
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParametersId.java84
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/UserParameters.java26
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceWorkflow.java2
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Workflow.java6
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequence.java11
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequenceId.java84
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java8
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepository.java2
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecUserParametersRepository.java30
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/UserParametersRepository.java30
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowActivitySpecSequenceRepository.java30
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java5
-rw-r--r--mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java16
-rw-r--r--mso-catalog-db/src/test/resources/data.sql69
22 files changed, 180 insertions, 457 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java
index 9a9564023d..20c10748b6 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpec.java
@@ -21,7 +21,7 @@ import com.openpojo.business.annotation.BusinessKey;
import uk.co.blackpepper.bowman.annotation.LinkedResource;
@Entity
-@Table(name = "ACTIVITY_SPEC")
+@Table(name = "activity_spec")
public class ActivitySpec implements Serializable {
private static final long serialVersionUID = 6902290480087262973L;
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java
index f1ee006b60..64c77d27db 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategories.java
@@ -28,7 +28,6 @@ import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
-import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -36,9 +35,9 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.openpojo.business.annotation.BusinessKey;
+import uk.co.blackpepper.bowman.annotation.LinkedResource;
@Entity
-@IdClass(ActivitySpecActivitySpecCategoriesId.class)
@Table(name = "activity_spec_to_activity_spec_categories")
public class ActivitySpecActivitySpecCategories implements Serializable {
@@ -116,6 +115,7 @@ public class ActivitySpecActivitySpecCategories implements Serializable {
this.activitySpec = activitySpec;
}
+ @LinkedResource
public ActivitySpecCategories getActivitySpecCategories() {
return activitySpecCategories;
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategoriesId.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategoriesId.java
deleted file mode 100644
index e3dcd359ec..0000000000
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecCategoriesId.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 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=========================================================
- */
-
-package org.onap.so.db.catalog.beans;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.openpojo.business.annotation.BusinessKey;
-
-public class ActivitySpecActivitySpecCategoriesId implements Serializable {
-
- private static final long serialVersionUID = 1563771827209840959L;
- private Integer ID;
- @BusinessKey
- private Integer activitySpecId;
- @BusinessKey
- private Integer activitySpecCategoriesId;
-
- public Integer getID() {
- return ID;
- }
-
- public void setID(Integer iD) {
- ID = iD;
- }
-
- public Integer getActivitySpecCategoriesId() {
- return activitySpecCategoriesId;
- }
-
- public void setActivitySpecCategoriesId(Integer activitySpecCategoriesId) {
- this.activitySpecCategoriesId = activitySpecCategoriesId;
- }
-
- public Integer getActivitySpecId() {
- return activitySpecId;
- }
-
- public void setActivitySpecId(Integer activitySpecId) {
- this.activitySpecId = activitySpecId;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("activitySpecId", activitySpecId)
- .append("activitySpecCategoriesId", activitySpecCategoriesId).toString();
- }
-
- @Override
- public boolean equals(final Object other) {
- if (!(other instanceof ActivitySpecActivitySpecCategoriesId)) {
- return false;
- }
- ActivitySpecActivitySpecCategoriesId castOther = (ActivitySpecActivitySpecCategoriesId) other;
- return new EqualsBuilder().append(activitySpecId, castOther.activitySpecId)
- .append(activitySpecCategoriesId, castOther.activitySpecCategoriesId).isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(activitySpecId).append(activitySpecCategoriesId).toHashCode();
- }
-}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java
index 49c5d98943..f3e6a09b7f 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParameters.java
@@ -28,7 +28,6 @@ import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
-import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -36,9 +35,9 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.openpojo.business.annotation.BusinessKey;
+import uk.co.blackpepper.bowman.annotation.LinkedResource;
@Entity
-@IdClass(ActivitySpecActivitySpecParametersId.class)
@Table(name = "activity_spec_to_activity_spec_parameters")
public class ActivitySpecActivitySpecParameters implements Serializable {
@@ -50,12 +49,10 @@ public class ActivitySpecActivitySpecParameters implements Serializable {
private Integer ID;
@BusinessKey
- @Id
@Column(name = "ACTIVITY_SPEC_ID")
private Integer activitySpecId;
@BusinessKey
- @Id
@Column(name = "ACTIVITY_SPEC_PARAMETERS_ID")
private Integer activitySpecParametersId;
@@ -70,7 +67,7 @@ public class ActivitySpecActivitySpecParameters implements Serializable {
@Override
public String toString() {
return new ToStringBuilder(this).append("activitySpecId", activitySpecId)
- .append("activitySpecCategoriesId", activitySpecParametersId).toString();
+ .append("activitySpecParametersId", activitySpecParametersId).toString();
}
@Override
@@ -108,6 +105,7 @@ public class ActivitySpecActivitySpecParameters implements Serializable {
this.activitySpecParametersId = activitySpecParametersId;
}
+ @LinkedResource
public ActivitySpec getActivitySpec() {
return activitySpec;
}
@@ -116,6 +114,7 @@ public class ActivitySpecActivitySpecParameters implements Serializable {
this.activitySpec = activitySpec;
}
+ @LinkedResource
public ActivitySpecParameters getActivitySpecParameters() {
return activitySpecParameters;
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParametersId.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParametersId.java
deleted file mode 100644
index 8f4cc6d966..0000000000
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecActivitySpecParametersId.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 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=========================================================
- */
-
-package org.onap.so.db.catalog.beans;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.openpojo.business.annotation.BusinessKey;
-
-public class ActivitySpecActivitySpecParametersId implements Serializable {
-
- private static final long serialVersionUID = 1563771827209840959L;
-
- private Integer ID;
- @BusinessKey
- private Integer activitySpecId;
- @BusinessKey
- private Integer activitySpecParametersId;
-
- public Integer getID() {
- return ID;
- }
-
- public void setID(Integer iD) {
- ID = iD;
- }
-
- public Integer getActivitySpecParametersId() {
- return activitySpecParametersId;
- }
-
- public void setActivitySpecParametersId(Integer activitySpecParametersId) {
- this.activitySpecParametersId = activitySpecParametersId;
- }
-
- public Integer getActivitySpecId() {
- return activitySpecId;
- }
-
- public void setActivitySpecId(Integer activitySpecId) {
- this.activitySpecId = activitySpecId;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("activitySpecId", activitySpecId)
- .append("activitySpecCategoriesId", activitySpecParametersId).toString();
- }
-
- @Override
- public boolean equals(final Object other) {
- if (!(other instanceof ActivitySpecActivitySpecParametersId)) {
- return false;
- }
- ActivitySpecActivitySpecParametersId castOther = (ActivitySpecActivitySpecParametersId) other;
- return new EqualsBuilder().append(activitySpecId, castOther.activitySpecId)
- .append(activitySpecParametersId, castOther.activitySpecParametersId).isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(activitySpecId).append(activitySpecParametersId).toHashCode();
- }
-}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java
index 56aecc4a98..8f3f7a34b0 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecCategories.java
@@ -17,7 +17,7 @@ import com.openpojo.business.annotation.BusinessKey;
import uk.co.blackpepper.bowman.annotation.LinkedResource;
@Entity
-@Table(name = "ACTIVITY_SPEC_CATEGORIES")
+@Table(name = "activity_spec_categories")
public class ActivitySpecCategories implements Serializable {
private static final long serialVersionUID = -6251150462067699643L;
@@ -31,9 +31,6 @@ public class ActivitySpecCategories implements Serializable {
@Column(name = "NAME")
private String name;
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "activitySpecCategories")
- private List<ActivitySpecActivitySpecCategories> activitySpecActivitySpecCategories;
-
public Integer getID() {
return ID;
}
@@ -46,20 +43,9 @@ public class ActivitySpecCategories implements Serializable {
this.name = name;
}
- @LinkedResource
- public List<ActivitySpecActivitySpecCategories> getActivitySpecActivitySpecCategories() {
- return activitySpecActivitySpecCategories;
- }
-
- public void setActivitySpecActivitySpecCategories(
- List<ActivitySpecActivitySpecCategories> activitySpecActivitySpecCategories) {
- this.activitySpecActivitySpecCategories = activitySpecActivitySpecCategories;
- }
-
@Override
public String toString() {
- return new ToStringBuilder(this).append("name", name)
- .append("activitySpecActivitySpecCategories", activitySpecActivitySpecCategories).toString();
+ return new ToStringBuilder(this).append("name", name).toString();
}
@Override
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecParameters.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecParameters.java
index 49e0f3fa79..ed056400b2 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecParameters.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecParameters.java
@@ -1,20 +1,12 @@
package org.onap.so.db.catalog.beans;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Date;
-import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
-import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
-import javax.persistence.IdClass;
-import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
import javax.persistence.PrePersist;
import javax.persistence.Table;
import javax.persistence.Temporal;
@@ -23,12 +15,9 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.openpojo.business.annotation.BusinessKey;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-import uk.co.blackpepper.bowman.annotation.LinkedResource;
@Entity
-@Table(name = "ACTIVITY_SPEC_PARAMETERS")
+@Table(name = "activity_spec_parameters")
public class ActivitySpecParameters implements Serializable {
private static final long serialVersionUID = 3627711377147710046L;
@@ -56,28 +45,14 @@ public class ActivitySpecParameters implements Serializable {
@Temporal(TemporalType.TIMESTAMP)
private Date created;
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "activitySpecParameters")
- private List<ActivitySpecActivitySpecParameters> activitySpecActivitySpecParameters;
-
@PrePersist
protected void onCreate() {
this.created = new Date();
}
- @LinkedResource
- public List<ActivitySpecActivitySpecParameters> getActivitySpecActivitySpecParameters() {
- return activitySpecActivitySpecParameters;
- }
-
- public void setActivitySpecActivitySpecParameters(
- List<ActivitySpecActivitySpecParameters> activitySpecActivitySpecParameters) {
- this.activitySpecActivitySpecParameters = activitySpecActivitySpecParameters;
- }
-
@Override
public String toString() {
- return new ToStringBuilder(this).append("name", name).append("direction", direction)
- .append("activitySpecActivitySpecParameters", activitySpecActivitySpecParameters).toString();
+ return new ToStringBuilder(this).append("name", name).append("direction", direction).toString();
}
@Override
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java
index 6a7b5ba0be..d23c782a1a 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParameters.java
@@ -28,7 +28,6 @@ import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
-import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
@@ -36,9 +35,9 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.openpojo.business.annotation.BusinessKey;
+import uk.co.blackpepper.bowman.annotation.LinkedResource;
@Entity
-@IdClass(ActivitySpecUserParametersId.class)
@Table(name = "activity_spec_to_user_parameters")
public class ActivitySpecUserParameters implements Serializable {
@@ -50,12 +49,10 @@ public class ActivitySpecUserParameters implements Serializable {
private Integer ID;
@BusinessKey
- @Id
@Column(name = "ACTIVITY_SPEC_ID")
private Integer activitySpecId;
@BusinessKey
- @Id
@Column(name = "USER_PARAMETERS_ID")
private Integer userParametersId;
@@ -108,6 +105,7 @@ public class ActivitySpecUserParameters implements Serializable {
this.userParametersId = userParametersId;
}
+ @LinkedResource
public ActivitySpec getActivitySpec() {
return activitySpec;
}
@@ -116,6 +114,7 @@ public class ActivitySpecUserParameters implements Serializable {
this.activitySpec = activitySpec;
}
+ @LinkedResource
public UserParameters getUserParameters() {
return userParameters;
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParametersId.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParametersId.java
deleted file mode 100644
index fd55d6e961..0000000000
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ActivitySpecUserParametersId.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 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=========================================================
- */
-
-package org.onap.so.db.catalog.beans;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.openpojo.business.annotation.BusinessKey;
-
-public class ActivitySpecUserParametersId implements Serializable {
-
- private static final long serialVersionUID = 1563771827209840959L;
-
- private Integer ID;
- @BusinessKey
- private Integer activitySpecId;
- @BusinessKey
- private Integer userParametersId;
-
- public Integer getID() {
- return ID;
- }
-
- public void setID(Integer iD) {
- ID = iD;
- }
-
- public Integer getUserParametersId() {
- return userParametersId;
- }
-
- public void setUserParametersId(Integer userParametersId) {
- this.userParametersId = userParametersId;
- }
-
- public Integer getActivitySpecId() {
- return activitySpecId;
- }
-
- public void setActivitySpecId(Integer activitySpecId) {
- this.activitySpecId = activitySpecId;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("activitySpecId", activitySpecId)
- .append("userParametersId", userParametersId).toString();
- }
-
- @Override
- public boolean equals(final Object other) {
- if (!(other instanceof ActivitySpecUserParametersId)) {
- return false;
- }
- ActivitySpecUserParametersId castOther = (ActivitySpecUserParametersId) other;
- return new EqualsBuilder().append(activitySpecId, castOther.activitySpecId)
- .append(userParametersId, castOther.userParametersId).isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(activitySpecId).append(userParametersId).toHashCode();
- }
-
-}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/UserParameters.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/UserParameters.java
index a20647d5c1..c2cf2d7cf6 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/UserParameters.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/UserParameters.java
@@ -1,19 +1,12 @@
package org.onap.so.db.catalog.beans;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Date;
-import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
-import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
import javax.persistence.PrePersist;
import javax.persistence.Table;
import javax.persistence.Temporal;
@@ -22,9 +15,6 @@ import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.openpojo.business.annotation.BusinessKey;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
-import uk.co.blackpepper.bowman.annotation.LinkedResource;
@Entity
@Table(name = "USER_PARAMETERS")
@@ -66,10 +56,6 @@ public class UserParameters implements Serializable {
@Temporal(TemporalType.TIMESTAMP)
private Date created;
-
- @OneToMany(fetch = FetchType.LAZY, mappedBy = "userParameters")
- private List<ActivitySpecUserParameters> activitySpecUserParameters;
-
@PrePersist
protected void onCreate() {
this.created = new Date();
@@ -87,19 +73,9 @@ public class UserParameters implements Serializable {
this.name = name;
}
- @LinkedResource
- public List<ActivitySpecUserParameters> getActivitySpecUserParameters() {
- return activitySpecUserParameters;
- }
-
- public void setActivitySpecUserParameters(List<ActivitySpecUserParameters> activitySpecUserParameters) {
- this.activitySpecUserParameters = activitySpecUserParameters;
- }
-
@Override
public String toString() {
- return new ToStringBuilder(this).append("name", name)
- .append("ActivitySpecUserParameters", activitySpecUserParameters).toString();
+ return new ToStringBuilder(this).append("name", name).toString();
}
public String getPayloadLocation() {
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceWorkflow.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceWorkflow.java
index f49ae26305..92cc5d18f0 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceWorkflow.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceWorkflow.java
@@ -44,7 +44,7 @@ import uk.co.blackpepper.bowman.annotation.LinkedResource;
@Entity
@IdClass(VnfResourceWorkflowId.class)
-@Table(name = "VNF_RESOURCE_TO_WORKFLOW")
+@Table(name = "vnf_resource_to_workflow")
public class VnfResourceWorkflow implements Serializable {
private static final long serialVersionUID = -1326433350241927676L;
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Workflow.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Workflow.java
index 1f46bc01f7..d1e60a0f76 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Workflow.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/Workflow.java
@@ -1,7 +1,6 @@
package org.onap.so.db.catalog.beans;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.persistence.Column;
@@ -10,9 +9,7 @@ import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
-import javax.persistence.JoinColumn;
import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.PrePersist;
import javax.persistence.Table;
@@ -21,9 +18,6 @@ import javax.persistence.TemporalType;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.openpojo.business.annotation.BusinessKey;
-import org.hibernate.annotations.NotFound;
-import org.hibernate.annotations.NotFoundAction;
import uk.co.blackpepper.bowman.annotation.LinkedResource;
@Entity
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequence.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequence.java
index 4b497cc7da..f25be45bb2 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequence.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequence.java
@@ -21,7 +21,6 @@
package org.onap.so.db.catalog.beans;
import java.io.Serializable;
-import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
@@ -29,21 +28,17 @@ import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
-import javax.persistence.IdClass;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
-import javax.persistence.PrePersist;
import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import com.openpojo.business.annotation.BusinessKey;
import uk.co.blackpepper.bowman.annotation.LinkedResource;
+
@Entity
-@IdClass(WorkflowActivitySpecSequenceId.class)
@Table(name = "workflow_activity_spec_sequence")
public class WorkflowActivitySpecSequence implements Serializable {
@@ -55,12 +50,10 @@ public class WorkflowActivitySpecSequence implements Serializable {
private Integer ID;
@BusinessKey
- @Id
@Column(name = "ACTIVITY_SPEC_ID")
private Integer activitySpecId;
@BusinessKey
- @Id
@Column(name = "WORKFLOW_ID")
private Integer workflowId;
@@ -113,6 +106,7 @@ public class WorkflowActivitySpecSequence implements Serializable {
this.workflowId = workflowId;
}
+ @LinkedResource
public ActivitySpec getActivitySpec() {
return activitySpec;
}
@@ -121,6 +115,7 @@ public class WorkflowActivitySpecSequence implements Serializable {
this.activitySpec = activitySpec;
}
+ @LinkedResource
public Workflow getWorkflow() {
return workflow;
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequenceId.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequenceId.java
deleted file mode 100644
index 41af2ed3a5..0000000000
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/WorkflowActivitySpecSequenceId.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 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=========================================================
- */
-
-package org.onap.so.db.catalog.beans;
-
-import java.io.Serializable;
-import org.apache.commons.lang3.builder.EqualsBuilder;
-import org.apache.commons.lang3.builder.HashCodeBuilder;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import com.openpojo.business.annotation.BusinessKey;
-
-public class WorkflowActivitySpecSequenceId implements Serializable {
-
- private static final long serialVersionUID = -8987314754011453123L;
-
- private Integer ID;
-
- @BusinessKey
- private Integer workflowId;
- @BusinessKey
- private Integer activitySpecId;
-
- public Integer getID() {
- return ID;
- }
-
- public void setID(Integer ID) {
- this.ID = ID;
- }
-
- public Integer getWorkflowId() {
- return workflowId;
- }
-
- public void setWorkflowId(Integer workflowId) {
- this.workflowId = workflowId;
- }
-
- public Integer getActivitySpecId() {
- return activitySpecId;
- }
-
- public void setActivitySpecId(Integer activitySpecId) {
- this.activitySpecId = activitySpecId;
- }
-
- @Override
- public String toString() {
- return new ToStringBuilder(this).append("workflowId", workflowId).append("activitySpecId", activitySpecId)
- .toString();
- }
-
- @Override
- public boolean equals(final Object other) {
- if (!(other instanceof WorkflowActivitySpecSequenceId)) {
- return false;
- }
- WorkflowActivitySpecSequenceId castOther = (WorkflowActivitySpecSequenceId) other;
- return new EqualsBuilder().append(workflowId, castOther.workflowId)
- .append(activitySpecId, castOther.activitySpecId).isEquals();
- }
-
- @Override
- public int hashCode() {
- return new HashCodeBuilder().append(workflowId).append(activitySpecId).toHashCode();
- }
-}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
index e5f2758be7..f502c34e20 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java
@@ -145,6 +145,7 @@ public class CatalogDbClient {
private static final String CLOUD_VERSION = "cloudVersion";
private static final String HOMING_INSTANCE = "/homingInstance";
private static final String ARTIFACT_UUID = "artifactUUID";
+ private static final String SOURCE = "source";
private static final String TARGET_ENTITY = "SO:CatalogDB";
private static final String ASTERISK = "*";
@@ -191,6 +192,7 @@ public class CatalogDbClient {
private String findPnfResourceCustomizationByModelUuid = "/findPnfResourceCustomizationByModelUuid";
private String findWorkflowByArtifactUUID = "/findByArtifactUUID";
private String findWorkflowByModelUUID = "/findWorkflowByModelUUID";
+ private String findWorkflowBySource = "/findBySource";
private String findVnfResourceCustomizationByModelUuid = "/findVnfResourceCustomizationByModelUuid";
private String serviceURI;
@@ -327,6 +329,7 @@ public class CatalogDbClient {
findWorkflowByArtifactUUID = endpoint + WORKFLOW + SEARCH + findWorkflowByArtifactUUID;
findWorkflowByModelUUID = endpoint + WORKFLOW + SEARCH + findWorkflowByModelUUID;
+ findWorkflowBySource = endpoint + WORKFLOW + SEARCH + findWorkflowBySource;
findVnfResourceCustomizationByModelUuid =
endpoint + VNF_RESOURCE_CUSTOMIZATION + SEARCH + findVnfResourceCustomizationByModelUuid;
@@ -882,6 +885,11 @@ public class CatalogDbClient {
.queryParam(VNF_RESOURCE_MODEL_UUID, vnfResourceModelUUID).build().toString()));
}
+ public List<Workflow> findWorkflowBySource(String source) {
+ return this.getMultipleResources(workflowClient,
+ getUri(UriBuilder.fromUri(findWorkflowBySource).queryParam(SOURCE, source).build().toString()));
+ }
+
public String getEndpoint() {
return endpoint;
}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepository.java
index aa474238fd..f86ae14f93 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecRepository.java
@@ -25,7 +25,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "activitySpec", path = "activitySpec")
-public interface ActivitySpecRepository extends JpaRepository<ActivitySpec, String> {
+public interface ActivitySpecRepository extends JpaRepository<ActivitySpec, Integer> {
ActivitySpec findByName(String name);
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecUserParametersRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecUserParametersRepository.java
new file mode 100644
index 0000000000..5e4340e392
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ActivitySpecUserParametersRepository.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 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=========================================================
+ */
+
+package org.onap.so.db.catalog.data.repository;
+
+import org.onap.so.db.catalog.beans.ActivitySpecUserParameters;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
+
+@RepositoryRestResource(collectionResourceRel = "activitySpecUserParameters", path = "activitySpecUserParameters")
+public interface ActivitySpecUserParametersRepository extends JpaRepository<ActivitySpecUserParameters, Integer> {
+
+}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/UserParametersRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/UserParametersRepository.java
new file mode 100644
index 0000000000..984f8fac99
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/UserParametersRepository.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 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=========================================================
+ */
+
+package org.onap.so.db.catalog.data.repository;
+
+import org.onap.so.db.catalog.beans.UserParameters;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
+
+@RepositoryRestResource(collectionResourceRel = "userParameters", path = "userParameters")
+public interface UserParametersRepository extends JpaRepository<UserParameters, Integer> {
+
+}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowActivitySpecSequenceRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowActivitySpecSequenceRepository.java
new file mode 100644
index 0000000000..0dfbbb9ead
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowActivitySpecSequenceRepository.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 2018 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=========================================================
+ */
+
+package org.onap.so.db.catalog.data.repository;
+
+import org.onap.so.db.catalog.beans.WorkflowActivitySpecSequence;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
+
+@RepositoryRestResource(collectionResourceRel = "workflowActivitySpecSequence", path = "workflowActivitySpecSequence")
+public interface WorkflowActivitySpecSequenceRepository extends JpaRepository<WorkflowActivitySpecSequence, Integer> {
+
+}
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java
index fb5f202cbc..8bcc60c8be 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java
@@ -24,14 +24,15 @@ import java.util.List;
import org.onap.so.db.catalog.beans.Workflow;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.repository.query.Param;
import org.springframework.data.rest.core.annotation.RepositoryRestResource;
@RepositoryRestResource(collectionResourceRel = "workflow", path = "workflow")
-public interface WorkflowRepository extends JpaRepository<Workflow, String> {
+public interface WorkflowRepository extends JpaRepository<Workflow, Integer> {
Workflow findByArtifactUUID(String artifactUUID);
+ List<Workflow> findBySource(String source);
+
/**
* Used to fetch the @{link Workflow} by the Model UUID.
*
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java
index 4f31e4b38c..7d1b8d0d96 100644
--- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/WorkflowRepositoryTest.java
@@ -15,8 +15,6 @@
package org.onap.so.db.catalog.data.repository;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
@@ -33,7 +31,7 @@ public class WorkflowRepositoryTest extends BaseTest {
public void findByArtifactUuid_ValidUuid_ExpectedOutput() throws Exception {
Workflow workflow = workflowRepository.findByArtifactUUID("5b0c4322-643d-4c9f-b184-4516049e99b1");
- assertEquals("artifactName", "testingWorkflow", workflow.getArtifactName());
+ assertEquals("artifactName", "testingWorkflow.bpmn", workflow.getArtifactName());
}
@Test
@@ -43,7 +41,17 @@ public class WorkflowRepositoryTest extends BaseTest {
Assert.assertTrue(workflows != null);
Assert.assertTrue(workflows.size() != 0);
- Assert.assertTrue("testingWorkflow".equals(workflows.get(0).getArtifactName()));
+ Assert.assertTrue("testingWorkflow.bpmn".equals(workflows.get(0).getArtifactName()));
+ }
+
+ @Test
+ public void findBySourceTest() throws Exception {
+ List<Workflow> workflows = workflowRepository.findBySource("sdc");
+
+ Assert.assertTrue(workflows != null);
+ Assert.assertTrue(workflows.size() != 0);
+
+ Assert.assertTrue("testingWorkflow.bpmn".equals(workflows.get(0).getArtifactName()));
}
}
diff --git a/mso-catalog-db/src/test/resources/data.sql b/mso-catalog-db/src/test/resources/data.sql
index f6d04263c0..13ab018a27 100644
--- a/mso-catalog-db/src/test/resources/data.sql
+++ b/mso-catalog-db/src/test/resources/data.sql
@@ -266,18 +266,43 @@ VALUES
('DeleteVfModuleBB', 'VF_MODULE', 'DELETE'),
('DeleteNetworkBB', 'NETWORK', 'DELETE'),
('DeleteNetworkCollectionBB', 'NETWORK', 'DELETE'),
-('AssignAndActivateVpnBondingLinksBB', 'CUSTOM', 'CUSTOM'),
-('AvpnAssignServiceInstanceBB', 'CUSTOM', 'CUSTOM'),
-('CreateCustomerVpnBindingBB', 'CUSTOM', 'CUSTOM'),
-('SniroHoming', 'CUSTOM', 'CUSTOM'),
-('DeactivateAndUnassignVpnBondingLinksBB', 'CUSTOM', 'CUSTOM'),
-('DeactivateNetworkCollectionBB', 'CUSTOM', 'CUSTOM'),
-('AAICheckVnfInMaintBB', 'CUSTOM', 'CUSTOM'),
-('AAISetVnfInMaintBB', 'CUSTOM', 'CUSTOM'),
-('AAIUnsetVnfInMaintBB', 'CUSTOM', 'CUSTOM'),
-('SDNOVnfHealthCheckBB', 'CUSTOM', 'CUSTOM'),
-('VNF-Macro-Replace', 'CUSTOM', 'CUSTOM'),
-('HomingBB', 'CUSTOM', 'CUSTOM');
+('AssignAndActivateVpnBondingLinksBB', 'NO_VALIDATE', 'CUSTOM'),
+('AvpnAssignServiceInstanceBB', 'NO_VALIDATE', 'CUSTOM'),
+('CreateCustomerVpnBindingBB', 'NO_VALIDATE', 'CUSTOM'),
+('SniroHoming', 'NO_VALIDATE', 'CUSTOM'),
+('DeactivateAndUnassignVpnBondingLinksBB', 'NO_VALIDATE', 'CUSTOM'),
+('DeactivateNetworkCollectionBB', 'NO_VALIDATE', 'CUSTOM'),
+('AAICheckVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'),
+('AAISetVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'),
+('AAIUnsetVnfInMaintBB', 'NO_VALIDATE', 'CUSTOM'),
+('SDNOVnfHealthCheckBB', 'NO_VALIDATE', 'CUSTOM'),
+('VNF-Macro-Replace', 'NO_VALIDATE', 'CUSTOM'),
+('HomingBB', 'NO_VALIDATE', 'CUSTOM'),
+('VNFSetInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFCheckPserversLockedFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFCheckInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFCheckClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFSetClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUnsetClosedLoopDisabledFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFLockActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUnlockActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFStopActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFStartActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFSnapShotActivity', 'NO_VALIDATE', 'CUSTOM'),
+('FlowCompleteActivity', 'NO_VALIDATE', 'CUSTOM'),
+('PauseForManualTaskActivity', 'NO_VALIDATE', 'CUSTOM'),
+('DistributeTrafficActivity', 'NO_VALIDATE', 'CUSTOM'),
+('DistributeTrafficCheckActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFHealthCheckActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFQuiesceTrafficActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFResumeTrafficActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUnsetInMaintFlagActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUpgradeBackupActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUpgradePostCheckActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUpgradePreCheckActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VNFUpgradeSoftwareActivity', 'NO_VALIDATE', 'CUSTOM'),
+('VnfInPlaceSoftwareUpdate', 'NO_VALIDATE', 'CUSTOM');
+
INSERT INTO orchestration_flow_reference(COMPOSITE_ACTION, SEQ_NO, FLOW_NAME, FLOW_VERSION, NB_REQ_REF_LOOKUP_ID) VALUES
('Service-Create', '1', 'AssignServiceInstanceBB', 1.0,(SELECT id from northbound_request_ref_lookup WHERE MACRO_ACTION = 'Service-Create')),
@@ -644,15 +669,15 @@ VALUES
('VOLUME_GROUP', 'PENDING', 'DELETE', 'SILENT_SUCCESS'),
('VF_MODULE', 'PENDING', 'DELETE', 'FAIL'),
('NETWORK', 'PENDING', 'DELETE', 'FAIL'),
-('CUSTOM', 'ACTIVE', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'ASSIGNED', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'CREATED', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'INVENTORIED', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'PENDING', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'PENDING_ACTIVATION', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'PENDING_CREATE', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'PENDING_DELETE', 'CUSTOM', 'CONTINUE'),
-('CUSTOM', 'PRECREATED', 'CUSTOM', 'CONTINUE');
+('NO_VALIDATE', 'ACTIVE', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'ASSIGNED', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'CREATED', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'INVENTORIED', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'PENDING', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'PENDING_ACTIVATION', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'PENDING_CREATE', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'PENDING_DELETE', 'CUSTOM', 'CONTINUE'),
+('NO_VALIDATE', 'PRECREATED', 'CUSTOM', 'CONTINUE');
INSERT INTO `cloudify_managers` (`ID`, `CLOUDIFY_URL`, `USERNAME`, `PASSWORD`, `VERSION`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'http://localhost:28090/v2.0', 'm93945', '93937EA01B94A10A49279D4572B48369', NULL, 'MSO_USER', '2018-07-17 14:05:08', '2018-07-17 14:05:08');
@@ -742,7 +767,7 @@ insert into pnf_resource_customization_to_service(service_model_uuid, resource_m
('5df8b6de-2083-11e7-93ae-92361f002676', '68dc9a92-214c-11e7-93ae-92361f002680');
insert into workflow(artifact_uuid, artifact_name, name, operation_name, version, description, body, resource_target, source) values
-('5b0c4322-643d-4c9f-b184-4516049e99b1', 'testingWorkflow', 'testingWorkflow', 'create', 1, 'Test Workflow', null, 'vnf', 'sdc');
+('5b0c4322-643d-4c9f-b184-4516049e99b1', 'testingWorkflow.bpmn', 'testingWorkflow', 'create', 1, 'Test Workflow', null, 'vnf', 'sdc');
insert into vnf_resource_to_workflow(vnf_resource_model_uuid, workflow_id) values
('ff2ae348-214a-11e7-93ae-92361f002671', '1');