diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ProcessingFlags.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ProcessingFlags.java
new file mode 100644
index 0000000..211da5d
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ProcessingFlags.java
@@ -0,0 +1,187 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.db.catalog.beans;
+
+import java.util.Date;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Lob;
+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 org.apache.commons.lang3.builder.ToStringStyle;
+import org.hibernate.annotations.UpdateTimestamp;
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.openpojo.business.annotation.BusinessKey;
+import uk.co.blackpepper.bowman.annotation.RemoteResource;
+
+
+/**
+ * EntityBean class for ProcessingFlags. This bean represents a set of flags governing request processing.
+ *
+ */
+@RemoteResource("/processingFlags")
+@Entity
+@Table(name = "processing_flags")
+@JsonAutoDetect(fieldVisibility = Visibility.ANY)
+public class ProcessingFlags {
+
+    @Id
+    @Column(name = "ID", nullable = false, updatable = false)
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    private Integer id;
+
+    @JsonProperty("flag")
+    @BusinessKey
+    @Column(name = "FLAG")
+    private String flag;
+
+    @JsonProperty("value")
+    @BusinessKey
+    @Column(name = "VALUE")
+    private String value;
+
+    @JsonProperty("endpoint")
+    @BusinessKey
+    @Column(name = "ENDPOINT")
+    private String endpoint;
+
+    @JsonProperty("description")
+    @Lob
+    @Column(name = "DESCRIPTION", columnDefinition = "LONGTEXT")
+    private String description = null;
+
+    @JsonProperty("creation_timestamp")
+    @BusinessKey
+    @Column(name = "CREATION_TIMESTAMP", updatable = false)
+    @Temporal(TemporalType.TIMESTAMP)
+    private Date created;
+
+    @JsonProperty("update_timestamp")
+    @BusinessKey
+    @Column(name = "UPDATE_TIMESTAMP")
+    @Temporal(TemporalType.TIMESTAMP)
+    @UpdateTimestamp
+    private Date updated;
+
+    public ProcessingFlags() {
+
+    }
+
+    @PrePersist
+    protected void onCreate() {
+        this.created = new Date();
+        // this.updated = new Date();
+    }
+
+    public ProcessingFlags(ProcessingFlags flags) {
+        this.flag = flags.getFlag();
+        this.value = flags.getValue();
+        this.endpoint = flags.getEndpoint();
+        this.description = flags.getDescription();
+    }
+
+    public Integer getId() {
+        return this.id;
+    }
+
+    public String getFlag() {
+        return flag;
+    }
+
+    public void setFlag(String flag) {
+        this.flag = flag;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public String getEndpoint() {
+        return endpoint;
+    }
+
+    public void setEndpoint(String endpoint) {
+        this.endpoint = endpoint;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+
+    public Date getCreated() {
+        return created;
+    }
+
+    public void setCreated(Date created) {
+        this.created = created;
+    }
+
+    public Date getUpdated() {
+        return updated;
+    }
+
+    public void setUpdated(Date updated) {
+        this.updated = updated;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("flag", getFlag())
+                .append("value", getValue()).append("endpoint", getEndpoint()).append("description", getDescription())
+                .toString();
+    }
+
+    @Override
+    public boolean equals(final Object other) {
+        if (other == null) {
+            return false;
+        }
+        if (!getClass().equals(other.getClass())) {
+            return false;
+        }
+        ProcessingFlags castOther = (ProcessingFlags) other;
+        return new EqualsBuilder().append(getFlag(), castOther.getFlag()).append(getValue(), castOther.getValue())
+                .isEquals();
+    }
+
+    @Override
+    public int hashCode() {
+        return new HashCodeBuilder(1, 31).append(getFlag()).append(getValue()).append(getEndpoint()).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 4c5bbaf..a68ed44 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
@@ -52,6 +52,7 @@
 import org.onap.so.db.catalog.beans.OrchestrationStatusStateTransitionDirective;
 import org.onap.so.db.catalog.beans.PnfResource;
 import org.onap.so.db.catalog.beans.PnfResourceCustomization;
+import org.onap.so.db.catalog.beans.ProcessingFlags;
 import org.onap.so.db.catalog.beans.ResourceType;
 import org.onap.so.db.catalog.beans.Service;
 import org.onap.so.db.catalog.beans.ServiceRecipe;
@@ -121,6 +122,7 @@
     private static final String PNF_RESOURCE_CUSTOMIZATION = "/pnfResourceCustomization";
     private static final String WORKFLOW = "/workflow";
     private static final String BB_NAME_SELECTION_REFERENCE = "/bbNameSelectionReference";
+    private static final String PROCESSING_FLAGS = "/processingFlags";
 
 
     private static final String SEARCH = "/search";
@@ -159,6 +161,7 @@
     protected static final String ARTIFACT_UUID = "artifactUUID";
     protected static final String SOURCE = "source";
     protected static final String RESOURCE_TARGET = "resourceTarget";
+    protected static final String FLAG = "flag";
 
     private static final String TARGET_ENTITY = "SO:CatalogDB";
     private static final String ASTERISK = "*";
@@ -211,6 +214,7 @@
     private String findBBNameSelectionReferenceByControllerActorAndScopeAndAction =
             "/findBBNameSelectionReferenceByControllerActorAndScopeAndAction";
     private String findWorkflowByResourceTarget = "/findByResourceTarget";
+    private String findProcessingFlagsByFlag = "/findByFlag";
 
     private String serviceURI;
     private String vfModuleURI;
@@ -285,6 +289,8 @@
 
     private final Client<BBNameSelectionReference> bbNameSelectionReferenceClient;
 
+    private final Client<ProcessingFlags> processingFlagsClient;
+
     @Value("${mso.catalog.db.spring.endpoint:#{null}}")
     private String endpoint;
 
@@ -358,6 +364,8 @@
         findBBNameSelectionReferenceByControllerActorAndScopeAndAction = endpoint + BB_NAME_SELECTION_REFERENCE + SEARCH
                 + findBBNameSelectionReferenceByControllerActorAndScopeAndAction;
 
+        findProcessingFlagsByFlag = endpoint + PROCESSING_FLAGS + SEARCH + findProcessingFlagsByFlag;
+
         serviceURI = endpoint + SERVICE + URI_SEPARATOR;
         vfModuleURI = endpoint + VFMODULE + URI_SEPARATOR;
         vnfResourceURI = endpoint + VNF_RESOURCE + URI_SEPARATOR;
@@ -425,6 +433,7 @@
         pnfResourceCustomizationClient = clientFactory.create(PnfResourceCustomization.class);
         workflowClient = clientFactory.create(Workflow.class);
         bbNameSelectionReferenceClient = clientFactory.create(BBNameSelectionReference.class);
+        processingFlagsClient = clientFactory.create(ProcessingFlags.class);
 
     }
 
@@ -477,6 +486,7 @@
         pnfResourceCustomizationClient = clientFactory.create(PnfResourceCustomization.class);
         workflowClient = clientFactory.create(Workflow.class);
         bbNameSelectionReferenceClient = clientFactory.create(BBNameSelectionReference.class);
+        processingFlagsClient = clientFactory.create(ProcessingFlags.class);
     }
 
     public NetworkCollectionResourceCustomization getNetworkCollectionResourceCustomizationByID(
@@ -1091,6 +1101,11 @@
                 .queryParam(RESOURCE_TARGET, resourceTarget).build().toString()));
     }
 
+    public ProcessingFlags findProcessingFlagsByFlag(String flag) {
+        return this.getSingleResource(processingFlagsClient,
+                getUri(UriBuilder.fromUri(findProcessingFlagsByFlag).queryParam(FLAG, flag).build().toString()));
+    }
+
     public String getEndpoint() {
         return endpoint;
     }
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ProcessingFlagsRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ProcessingFlagsRepository.java
new file mode 100644
index 0000000..b658303
--- /dev/null
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/ProcessingFlagsRepository.java
@@ -0,0 +1,33 @@
+/*-
+ * ============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.ProcessingFlags;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.rest.core.annotation.RepositoryRestResource;
+import javax.transaction.Transactional;
+
+@RepositoryRestResource(collectionResourceRel = "processingFlags", path = "processingFlags")
+@Transactional
+public interface ProcessingFlagsRepository extends JpaRepository<ProcessingFlags, String> {
+
+    ProcessingFlags findByFlag(String flag);
+}
diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/ProcessingFlagsRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/ProcessingFlagsRepositoryTest.java
new file mode 100644
index 0000000..e8a8263
--- /dev/null
+++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/ProcessingFlagsRepositoryTest.java
@@ -0,0 +1,40 @@
+/*-
+ * ============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.junit.Assert;
+import org.junit.Test;
+import org.onap.so.db.catalog.BaseTest;
+import org.onap.so.db.catalog.beans.ProcessingFlags;
+import org.springframework.beans.factory.annotation.Autowired;
+
+public class ProcessingFlagsRepositoryTest extends BaseTest {
+
+    @Autowired
+    private ProcessingFlagsRepository processingFlagsRepository;
+
+    @Test
+    public void findByFlagTest() throws Exception {
+        ProcessingFlags processingFlags = processingFlagsRepository.findByFlag("TESTFLAG");
+        Assert.assertNotNull(processingFlags);
+        Assert.assertEquals("TESTENDPOINT", processingFlags.getEndpoint());
+    }
+}
diff --git a/mso-catalog-db/src/test/resources/data.sql b/mso-catalog-db/src/test/resources/data.sql
index b38d4d9..0913aef 100644
--- a/mso-catalog-db/src/test/resources/data.sql
+++ b/mso-catalog-db/src/test/resources/data.sql
@@ -962,4 +962,8 @@
 VALUES
 ('APPC', 'vfModule', 'healthCheck','GenericVnfHealthCheckBB'),
 ('APPC', 'vfModule', 'configScaleOut','ConfigurationScaleOutBB'),
-('APPC', 'vnf', 'healthCheck','GenericVnfHealthCheckBB');
\ No newline at end of file
+('APPC', 'vnf', 'healthCheck','GenericVnfHealthCheckBB');
+
+INSERT INTO processing_flags (FLAG,VALUE,ENDPOINT,DESCRIPTION)
+VALUES
+('TESTFLAG', 'NO', 'TESTENDPOINT', 'TEST FLAG');
\ No newline at end of file
diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index 0d49903..68f272c 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -1403,4 +1403,14 @@
   PRIMARY KEY (`ID`)
 ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
 
-
+CREATE TABLE IF NOT EXISTS `processing_flags` (
+  `ID` INT(11) NOT NULL AUTO_INCREMENT,
+  `FLAG` varchar(200) NOT NULL,
+  `VALUE` varchar(200) NOT NULL,
+  `ENDPOINT` varchar(200) NOT NULL,
+  `DESCRIPTION` longtext NOT NULL,
+  `CREATION_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),
+  `UPDATE_TIMESTAMP` timestamp NULL DEFAULT current_timestamp(),  
+  PRIMARY KEY (`ID`),
+  UNIQUE KEY `UK_processing_flags` (`FLAG`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
