diff --git a/models-interactions/model-actors/actor.appc/pom.xml b/models-interactions/model-actors/actor.appc/pom.xml
new file mode 100644
index 0000000..c508611
--- /dev/null
+++ b/models-interactions/model-actors/actor.appc/pom.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+   <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+    <artifactId>model-actors</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>actor.appc</artifactId>
+
+  <dependencies>
+    <dependency>
+     <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+      <artifactId>actorServiceProvider</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>appc</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>trafficgenerator</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>events</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
+      <artifactId>simulators</artifactId>
+      <version>${policy.drools-applications.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.common</groupId>
+      <artifactId>policy-endpoints</artifactId>
+      <version>${policy.common.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-pdp</groupId>
+      <artifactId>policy-management</artifactId>
+      <version>${policy.drools-pdp.version}</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java
new file mode 100644
index 0000000..e90ca40
--- /dev/null
+++ b/models-interactions/model-actors/actor.appc/src/main/java/org/onap/policy/controlloop/actor/appc/AppcActorServiceProvider.java
@@ -0,0 +1,127 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * APPCActorServiceProvider
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.appc;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.onap.policy.appc.CommonHeader;
+import org.onap.policy.appc.Request;
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.vnf.trafficgenerator.PgRequest;
+import org.onap.policy.vnf.trafficgenerator.PgStream;
+import org.onap.policy.vnf.trafficgenerator.PgStreams;
+
+
+public class AppcActorServiceProvider implements Actor {
+    // Strings for targets
+    private static final String TARGET_VM = "VM";
+    private static final String TARGET_VNF = "VNF";
+
+    // Strings for recipes
+    private static final String RECIPE_RESTART = "Restart";
+    private static final String RECIPE_REBUILD = "Rebuild";
+    private static final String RECIPE_MIGRATE = "Migrate";
+    private static final String RECIPE_MODIFY = "ModifyConfig";
+
+    private static final ImmutableList<String> recipes =
+            ImmutableList.of(RECIPE_RESTART, RECIPE_REBUILD, RECIPE_MIGRATE, RECIPE_MODIFY);
+    private static final ImmutableMap<String, List<String>> targets = new ImmutableMap.Builder<String, List<String>>()
+            .put(RECIPE_RESTART, ImmutableList.of(TARGET_VM)).put(RECIPE_REBUILD, ImmutableList.of(TARGET_VM))
+            .put(RECIPE_MIGRATE, ImmutableList.of(TARGET_VM)).put(RECIPE_MODIFY, ImmutableList.of(TARGET_VNF)).build();
+    private static final ImmutableMap<String, List<String>> payloads = new ImmutableMap.Builder<String, List<String>>()
+            .put(RECIPE_MODIFY, ImmutableList.of("generic-vnf.vnf-id")).build();
+
+    @Override
+    public String actor() {
+        return "APPC";
+    }
+
+    @Override
+    public List<String> recipes() {
+        return ImmutableList.copyOf(recipes);
+    }
+
+    @Override
+    public List<String> recipeTargets(String recipe) {
+        return ImmutableList.copyOf(targets.getOrDefault(recipe, Collections.emptyList()));
+    }
+
+    @Override
+    public List<String> recipePayloads(String recipe) {
+        return ImmutableList.copyOf(payloads.getOrDefault(recipe, Collections.emptyList()));
+    }
+
+    /**
+     * Constructs an APPC request conforming to the legacy API. The legacy API will be deprecated in
+     * future releases as all legacy functionality is moved into the LCM API.
+     *
+     * @param onset the event that is reporting the alert for policy to perform an action
+     * @param operation the control loop operation specifying the actor, operation, target, etc.
+     * @param policy the policy the was specified from the yaml generated by CLAMP or through the
+     *        Policy GUI/API
+     * @return an APPC request conforming to the legacy API
+     */
+    public static Request constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation, Policy policy,
+            String targetVnf) {
+        /*
+         * Construct an APPC request
+         */
+        Request request = new Request();
+        request.setCommonHeader(new CommonHeader());
+        request.getCommonHeader().setRequestId(onset.getRequestId());
+        request.getCommonHeader().setSubRequestId(operation.getSubRequestId());
+        request.setAction(policy.getRecipe().substring(0, 1).toUpperCase() + policy.getRecipe().substring(1));
+
+        /*
+         * For now Policy generates the PG Streams as a demo, in the future the payload can be
+         * provided by CLAMP
+         */
+        request.getPayload().put("generic-vnf.vnf-id", targetVnf);
+
+        PgRequest pgRequest = new PgRequest();
+        pgRequest.pgStreams = new PgStreams();
+
+        PgStream pgStream;
+        for (int i = 0; i < 5; i++) {
+            pgStream = new PgStream();
+            pgStream.streamId = "fw_udp" + (i + 1);
+            pgStream.isEnabled = "true";
+            pgRequest.pgStreams.pgStream.add(pgStream);
+        }
+        request.getPayload().put("pg-streams", pgRequest.pgStreams);
+
+        /*
+         * Return the request
+         */
+
+        return request;
+    }
+
+
+}
diff --git a/models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
new file mode 100644
index 0000000..f1002a3
--- /dev/null
+++ b/models-interactions/model-actors/actor.appc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
@@ -0,0 +1 @@
+org.onap.policy.controlloop.actor.appc.AppcActorServiceProvider
\ No newline at end of file
diff --git a/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java
new file mode 100644
index 0000000..e1fdd39
--- /dev/null
+++ b/models-interactions/model-actors/actor.appc/src/test/java/org/onap/policy/controlloop/actor/appc/AppcServiceProviderTest.java
@@ -0,0 +1,179 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * AppcServiceProviderTest
+ * ================================================================================
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.appc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.time.Instant;
+import java.util.HashMap;
+import java.util.UUID;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.appc.Request;
+import org.onap.policy.appc.Response;
+import org.onap.policy.appc.ResponseCode;
+import org.onap.policy.appc.util.Serialization;
+import org.onap.policy.common.endpoints.http.server.HttpServletServer;
+import org.onap.policy.controlloop.ControlLoopEventStatus;
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.ControlLoopTargetType;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.controlloop.policy.Target;
+import org.onap.policy.controlloop.policy.TargetType;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.simulators.Util;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AppcServiceProviderTest {
+
+    private static final Logger logger = LoggerFactory.getLogger(AppcServiceProviderTest.class);
+
+    private static final VirtualControlLoopEvent onsetEvent;
+    private static final ControlLoopOperation operation;
+    private static final Policy policy;
+
+    static {
+        /*
+         * Construct an onset with an AAI subtag containing generic-vnf.vnf-id and a target type of
+         * VM.
+         */
+        onsetEvent = new VirtualControlLoopEvent();
+        onsetEvent.setClosedLoopControlName("closedLoopControlName-Test");
+        onsetEvent.setRequestId(UUID.randomUUID());
+        onsetEvent.setClosedLoopEventClient("tca.instance00001");
+        onsetEvent.setTargetType(ControlLoopTargetType.VNF);
+        onsetEvent.setTarget("generic-vnf.vnf-name");
+        onsetEvent.setFrom("DCAE");
+        onsetEvent.setClosedLoopAlarmStart(Instant.now());
+        onsetEvent.setAai(new HashMap<>());
+        onsetEvent.getAai().put("generic-vnf.vnf-name", "fw0001vm001fw001");
+        onsetEvent.setClosedLoopEventStatus(ControlLoopEventStatus.ONSET);
+
+        /* Construct an operation with an APPC actor and ModifyConfig operation. */
+        operation = new ControlLoopOperation();
+        operation.setActor("APPC");
+        operation.setOperation("ModifyConfig");
+        operation.setTarget("VNF");
+        operation.setEnd(Instant.now());
+        operation.setSubRequestId("1");
+
+        /* Construct a policy specifying to modify configuration. */
+        policy = new Policy();
+        policy.setName("Modify Packet Generation Config");
+        policy.setDescription("Upon getting the trigger event, modify packet gen config");
+        policy.setActor("APPC");
+        policy.setTarget(new Target(TargetType.VNF));
+        policy.getTarget().setResourceID("Eace933104d443b496b8.nodes.heat.vpg");
+        policy.setRecipe("ModifyConfig");
+        policy.setPayload(null);
+        policy.setRetry(2);
+        policy.setTimeout(300);
+
+        /* Set environment properties */
+        PolicyEngine.manager.setEnvironmentProperty("aai.url", "http://localhost:6666");
+        PolicyEngine.manager.setEnvironmentProperty("aai.username", "AAI");
+        PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI");
+
+    }
+
+    /**
+     * Set up before test class.
+     */
+    @BeforeClass
+    public static void setUpSimulator() {
+        try {
+            Util.buildAaiSim();
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    /**
+     * Tear down after test class.
+     */
+    @AfterClass
+    public static void tearDownSimulator() {
+        HttpServletServer.factory.destroy();
+    }
+
+    @Test
+    public void constructModifyConfigRequestTest() {
+
+        Request appcRequest;
+        appcRequest = AppcActorServiceProvider.constructRequest(onsetEvent, operation, policy, "vnf01");
+
+        /* The service provider must return a non null APPC request */
+        assertNotNull(appcRequest);
+
+        /* A common header is required and cannot be null */
+        assertNotNull(appcRequest.getCommonHeader());
+        assertEquals(appcRequest.getCommonHeader().getRequestId(), onsetEvent.getRequestId());
+
+        /* An action is required and cannot be null */
+        assertNotNull(appcRequest.getAction());
+        assertEquals("ModifyConfig", appcRequest.getAction());
+
+        /* A payload is required and cannot be null */
+        assertNotNull(appcRequest.getPayload());
+        assertTrue(appcRequest.getPayload().containsKey("generic-vnf.vnf-id"));
+        assertNotNull(appcRequest.getPayload().get("generic-vnf.vnf-id"));
+        assertTrue(appcRequest.getPayload().containsKey("pg-streams"));
+
+        logger.debug("APPC Request: \n" + appcRequest.toString());
+
+        /* Print out request as json to make sure serialization works */
+        String jsonRequest = Serialization.gsonPretty.toJson(appcRequest);
+        logger.debug("JSON Output: \n" + jsonRequest);
+
+        /* The JSON string must contain the following fields */
+        assertTrue(jsonRequest.contains("CommonHeader"));
+        assertTrue(jsonRequest.contains("Action"));
+        assertTrue(jsonRequest.contains("ModifyConfig"));
+        assertTrue(jsonRequest.contains("Payload"));
+        assertTrue(jsonRequest.contains("generic-vnf.vnf-id"));
+        assertTrue(jsonRequest.contains("pg-streams"));
+
+        Response appcResponse = new Response(appcRequest);
+        appcResponse.getStatus().setCode(ResponseCode.SUCCESS.getValue());
+        appcResponse.getStatus().setDescription("AppC success");
+        /* Print out request as json to make sure serialization works */
+        String jsonResponse = Serialization.gsonPretty.toJson(appcResponse);
+        logger.debug("JSON Output: \n" + jsonResponse);
+    }
+
+    @Test
+    public void testMethods() {
+        AppcActorServiceProvider sp = new AppcActorServiceProvider();
+
+        assertEquals("APPC", sp.actor());
+        assertEquals(4, sp.recipes().size());
+        assertEquals("VM", sp.recipeTargets("Restart").get(0));
+        assertEquals(0, sp.recipePayloads("Restart").size());
+    }
+}
diff --git a/models-interactions/model-actors/actor.appclcm/pom.xml b/models-interactions/model-actors/actor.appclcm/pom.xml
new file mode 100644
index 0000000..871dfc2
--- /dev/null
+++ b/models-interactions/model-actors/actor.appclcm/pom.xml
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+   <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+    <artifactId>model-actors</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>actor.appclcm</artifactId>
+
+  <dependencies>
+    <dependency>
+     <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+      <artifactId>actorServiceProvider</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>appclcm</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>aai</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>events</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.common</groupId>
+      <artifactId>policy-endpoints</artifactId>
+      <version>${policy.common.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-pdp</groupId>
+      <artifactId>policy-management</artifactId>
+      <version>${policy.drools-pdp.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
+      <artifactId>simulators</artifactId>
+      <version>${policy.drools-applications.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java b/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java
new file mode 100644
index 0000000..5768cd1
--- /dev/null
+++ b/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProvider.java
@@ -0,0 +1,360 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * AppcLcmActorServiceProvider
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications copyright (c) 2018 Nokia
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.appclcm;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+
+import java.util.AbstractMap;
+import java.util.AbstractMap.SimpleEntry;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import org.onap.policy.aai.AaiManager;
+import org.onap.policy.aai.AaiNqInstanceFilters;
+import org.onap.policy.aai.AaiNqInventoryResponseItem;
+import org.onap.policy.aai.AaiNqNamedQuery;
+import org.onap.policy.aai.AaiNqQueryParameters;
+import org.onap.policy.aai.AaiNqRequest;
+import org.onap.policy.aai.AaiNqResponse;
+import org.onap.policy.aai.util.AaiException;
+import org.onap.policy.appclcm.LcmCommonHeader;
+import org.onap.policy.appclcm.LcmRequest;
+import org.onap.policy.appclcm.LcmRequestWrapper;
+import org.onap.policy.appclcm.LcmResponse;
+import org.onap.policy.appclcm.LcmResponseCode;
+import org.onap.policy.appclcm.LcmResponseWrapper;
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.controlloop.policy.PolicyResult;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.rest.RestManager;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AppcLcmActorServiceProvider implements Actor {
+
+    private static final Logger logger = LoggerFactory.getLogger(AppcLcmActorServiceProvider.class);
+
+    /* To be used in future releases to restart a single vm */
+    private static final String APPC_VM_ID = "vm-id";
+
+    // Strings for targets
+    private static final String TARGET_VM = "VM";
+    private static final String TARGET_VNF = "VNF";
+
+    // Strings for recipes
+    private static final String RECIPE_RESTART = "Restart";
+    private static final String RECIPE_REBUILD = "Rebuild";
+    private static final String RECIPE_MIGRATE = "Migrate";
+    private static final String RECIPE_MODIFY = "ConfigModify";
+
+    /* To be used in future releases when LCM ConfigModify is used */
+    private static final String APPC_REQUEST_PARAMS = "request-parameters";
+    private static final String APPC_CONFIG_PARAMS = "configuration-parameters";
+
+    private static final ImmutableList<String> recipes =
+            ImmutableList.of(RECIPE_RESTART, RECIPE_REBUILD, RECIPE_MIGRATE, RECIPE_MODIFY);
+    private static final ImmutableMap<String, List<String>> targets = new ImmutableMap.Builder<String, List<String>>()
+            .put(RECIPE_RESTART, ImmutableList.of(TARGET_VM)).put(RECIPE_REBUILD, ImmutableList.of(TARGET_VM))
+            .put(RECIPE_MIGRATE, ImmutableList.of(TARGET_VM)).put(RECIPE_MODIFY, ImmutableList.of(TARGET_VNF)).build();
+    private static final ImmutableMap<String, List<String>> payloads =
+            new ImmutableMap.Builder<String, List<String>>().put(RECIPE_RESTART, ImmutableList.of(APPC_VM_ID))
+                    .put(RECIPE_MODIFY, ImmutableList.of(APPC_REQUEST_PARAMS, APPC_CONFIG_PARAMS)).build();
+
+    @Override
+    public String actor() {
+        return "APPC";
+    }
+
+    @Override
+    public List<String> recipes() {
+        return ImmutableList.copyOf(recipes);
+    }
+
+    @Override
+    public List<String> recipeTargets(String recipe) {
+        return ImmutableList.copyOf(targets.getOrDefault(recipe, Collections.emptyList()));
+    }
+
+    @Override
+    public List<String> recipePayloads(String recipe) {
+        return ImmutableList.copyOf(payloads.getOrDefault(recipe, Collections.emptyList()));
+    }
+
+    /**
+     * This method recursively traverses the A&AI named query response to find the generic-vnf
+     * object that contains a model-invariant-id that matches the resourceId of the policy. Once
+     * this match is found the generic-vnf object's vnf-id is returned.
+     *
+     * @param items the list of items related to the vnf returned by A&AI
+     * @param resourceId the id of the target from the sdc catalog
+     *
+     * @return the vnf-id of the target vnf to act upon or null if not found
+     */
+    private static String parseAaiResponse(List<AaiNqInventoryResponseItem> items, String resourceId) {
+        String vnfId = null;
+        for (AaiNqInventoryResponseItem item : items) {
+            if ((item.getGenericVnf() != null) && (item.getGenericVnf().getModelInvariantId() != null)
+                    && (resourceId.equals(item.getGenericVnf().getModelInvariantId()))) {
+                vnfId = item.getGenericVnf().getVnfId();
+                break;
+            } else {
+                if ((item.getItems() != null) && (item.getItems().getInventoryResponseItems() != null)) {
+                    vnfId = parseAaiResponse(item.getItems().getInventoryResponseItems(), resourceId);
+                }
+            }
+        }
+        return vnfId;
+    }
+
+    /**
+     * Constructs an A&AI Named Query using a source vnf-id to determine the vnf-id of the target
+     * entity specified in the policy to act upon.
+     *
+     * @param resourceId the id of the target from the sdc catalog
+     *
+     * @param sourceVnfId the vnf id of the source entity reporting the alert
+     *
+     * @return the target entities vnf id to act upon
+     * @throws AaiException it an error occurs
+     */
+    public static String vnfNamedQuery(String resourceId, String sourceVnfId) throws AaiException {
+
+        // TODO: This request id should not be hard coded in future releases
+        UUID requestId = UUID.fromString("a93ac487-409c-4e8c-9e5f-334ae8f99087");
+
+        AaiNqRequest aaiRequest = new AaiNqRequest();
+        aaiRequest.setQueryParameters(new AaiNqQueryParameters());
+        aaiRequest.getQueryParameters().setNamedQuery(new AaiNqNamedQuery());
+        aaiRequest.getQueryParameters().getNamedQuery().setNamedQueryUuid(requestId);
+
+        Map<String, Map<String, String>> filter = new HashMap<>();
+        Map<String, String> filterItem = new HashMap<>();
+
+        filterItem.put("vnf-id", sourceVnfId);
+        filter.put("generic-vnf", filterItem);
+
+        aaiRequest.setInstanceFilters(new AaiNqInstanceFilters());
+        aaiRequest.getInstanceFilters().getInstanceFilter().add(filter);
+
+        AaiNqResponse aaiResponse = new AaiManager(new RestManager()).postQuery(getPeManagerEnvProperty("aai.url"),
+                getPeManagerEnvProperty("aai.username"), getPeManagerEnvProperty("aai.password"), aaiRequest,
+                requestId);
+
+        if (aaiResponse == null) {
+            throw new AaiException("The named query response was null");
+        }
+
+        String targetVnfId = parseAaiResponse(aaiResponse.getInventoryResponseItems(), resourceId);
+        if (targetVnfId == null) {
+            throw new AaiException("Target vnf-id could not be found");
+        }
+
+        return targetVnfId;
+    }
+
+    /**
+     * Constructs an APPC request conforming to the lcm API. The actual request is constructed and
+     * then placed in a wrapper object used to send through DMAAP.
+     *
+     * @param onset the event that is reporting the alert for policy to perform an action
+     * @param operation the control loop operation specifying the actor, operation, target, etc.
+     * @param policy the policy the was specified from the yaml generated by CLAMP or through the
+     *        Policy GUI/API
+     * @return an APPC request conforming to the lcm API using the DMAAP wrapper
+     */
+    public static LcmRequestWrapper constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation,
+            Policy policy, String targetVnf) {
+
+        /* Construct an APPC request using LCM Model */
+
+        /*
+         * The actual LCM request is placed in a wrapper used to send through dmaap. The current
+         * version is 2.0 as of R1.
+         */
+        AppcLcmRecipeFormatter lcmRecipeFormatter = new AppcLcmRecipeFormatter(policy.getRecipe());
+
+        LcmRequestWrapper dmaapRequest = new LcmRequestWrapper();
+        dmaapRequest.setVersion("2.0");
+        dmaapRequest.setCorrelationId(onset.getRequestId() + "-" + operation.getSubRequestId());
+        dmaapRequest.setRpcName(lcmRecipeFormatter.getUrlRecipe());
+        dmaapRequest.setType("request");
+
+        /* This is the actual request that is placed in the dmaap wrapper. */
+        final LcmRequest appcRequest = new LcmRequest();
+
+        /* The common header is a required field for all APPC requests. */
+        LcmCommonHeader requestCommonHeader = new LcmCommonHeader();
+        requestCommonHeader.setOriginatorId(onset.getRequestId().toString());
+        requestCommonHeader.setRequestId(onset.getRequestId());
+        requestCommonHeader.setSubRequestId(operation.getSubRequestId());
+
+        appcRequest.setCommonHeader(requestCommonHeader);
+
+        /*
+         * Action Identifiers are required for APPC LCM requests. For R1, the recipes supported by
+         * Policy only require a vnf-id.
+         */
+        HashMap<String, String> requestActionIdentifiers = new HashMap<>();
+        requestActionIdentifiers.put("vnf-id", targetVnf);
+
+        appcRequest.setActionIdentifiers(requestActionIdentifiers);
+
+        /*
+         * An action is required for all APPC requests, this will be the recipe specified in the
+         * policy.
+         */
+        appcRequest.setAction(lcmRecipeFormatter.getBodyRecipe());
+
+        /*
+         * For R1, the payloads will not be required for the Restart, Rebuild, or Migrate recipes.
+         * APPC will populate the payload based on A&AI look up of the vnd-id provided in the action
+         * identifiers.
+         */
+        if (recipeSupportsPayload(policy.getRecipe()) && payloadSupplied(policy.getPayload())) {
+            appcRequest.setPayload(parsePayload(policy.getPayload()));
+        } else {
+            appcRequest.setPayload(null);
+        }
+
+        /*
+         * Once the LCM request is constructed, add it into the body of the dmaap wrapper.
+         */
+        dmaapRequest.setBody(appcRequest);
+
+        /* Return the request to be sent through dmaap. */
+        return dmaapRequest;
+    }
+
+    private static boolean payloadSupplied(Map<String, String> payload) {
+        return payload != null && !payload.isEmpty();
+    }
+
+    private static boolean recipeSupportsPayload(String recipe) {
+        return !RECIPE_RESTART.equalsIgnoreCase(recipe) && !RECIPE_REBUILD.equalsIgnoreCase(recipe)
+                && !RECIPE_MIGRATE.equalsIgnoreCase(recipe);
+    }
+
+    private static String parsePayload(Map<String, String> payload) {
+        StringBuilder payloadString = new StringBuilder("{");
+        payload
+            .forEach((key, value) -> payloadString.append("\"").append(key).append("\": ").append(value).append(","));
+        return payloadString.substring(0, payloadString.length() - 1) + "}";
+    }
+
+    /**
+     * Parses the operation attempt using the subRequestId of APPC response.
+     *
+     * @param subRequestId the sub id used to send to APPC, Policy sets this using the operation
+     *        attempt
+     *
+     * @return the current operation attempt
+     */
+    public static Integer parseOperationAttempt(String subRequestId) {
+        Integer operationAttempt;
+        try {
+            operationAttempt = Integer.parseInt(subRequestId);
+        } catch (NumberFormatException e) {
+            logger.debug("A NumberFormatException was thrown due to error in parsing the operation attempt");
+            return null;
+        }
+        return operationAttempt;
+    }
+
+    /**
+     * Processes the APPC LCM response sent from APPC. Determines if the APPC operation was
+     * successful/unsuccessful and maps this to the corresponding Policy result.
+     *
+     * @param dmaapResponse the dmaap wrapper message that contains the actual APPC reponse inside
+     *        the body field
+     *
+     * @return an key-value pair that contains the Policy result and APPC response message
+     */
+    public static SimpleEntry<PolicyResult, String> processResponse(LcmResponseWrapper dmaapResponse) {
+        /* The actual APPC response is inside the wrapper's body field. */
+        LcmResponse appcResponse = dmaapResponse.getBody();
+
+        /* The message returned in the APPC response. */
+        String message;
+
+        /* The Policy result determined from the APPC Response. */
+        PolicyResult result;
+
+        /* If there is no status, Policy cannot determine if the request was successful. */
+        if (appcResponse.getStatus() == null) {
+            message = "Policy was unable to parse APP-C response status field (it was null).";
+            return new AbstractMap.SimpleEntry<>(PolicyResult.FAILURE_EXCEPTION, message);
+        }
+
+        /* If there is no code, Policy cannot determine if the request was successful. */
+        String responseValue = LcmResponseCode.toResponseValue(appcResponse.getStatus().getCode());
+        if (responseValue == null) {
+            message = "Policy was unable to parse APP-C response status code field.";
+            return new AbstractMap.SimpleEntry<>(PolicyResult.FAILURE_EXCEPTION, message);
+        }
+
+        /* Save the APPC response's message for Policy notification message. */
+        message = appcResponse.getStatus().getMessage();
+
+        /* Maps the APPC response result to a Policy result. */
+        switch (responseValue) {
+            case LcmResponseCode.ACCEPTED:
+                /* Nothing to do if code is accept, continue processing */
+                result = null;
+                break;
+            case LcmResponseCode.SUCCESS:
+                result = PolicyResult.SUCCESS;
+                break;
+            case LcmResponseCode.FAILURE:
+                result = PolicyResult.FAILURE;
+                break;
+            case LcmResponseCode.REJECT:
+            case LcmResponseCode.ERROR:
+            default:
+                result = PolicyResult.FAILURE_EXCEPTION;
+        }
+        return new AbstractMap.SimpleEntry<>(result, message);
+    }
+
+    /**
+     * This method reads and validates environmental properties coming from the policy engine. Null
+     * properties cause an {@link IllegalArgumentException} runtime exception to be thrown
+     *
+     * @param enginePropertyName the name of the parameter to retrieve
+     * @return the property value
+     */
+    private static String getPeManagerEnvProperty(String enginePropertyName) {
+        String enginePropertyValue = PolicyEngine.manager.getEnvironmentProperty(enginePropertyName);
+        if (enginePropertyValue == null) {
+            throw new IllegalArgumentException("The value of policy engine manager environment property \""
+                    + enginePropertyName + "\" may not be null");
+        }
+        return enginePropertyValue;
+    }
+}
diff --git a/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmRecipeFormatter.java b/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmRecipeFormatter.java
new file mode 100644
index 0000000..daf1af7
--- /dev/null
+++ b/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmRecipeFormatter.java
@@ -0,0 +1,48 @@
+/*
+ * ============LICENSE_START=======================================================
+ *
+ * ================================================================================
+ * Copyright (C) 2018 Nokia Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.appclcm;
+
+import com.google.common.collect.Lists;
+import java.util.stream.Collectors;
+import org.apache.commons.lang.StringUtils;
+
+class AppcLcmRecipeFormatter {
+
+    private final String dashCasedRecipe;
+
+    AppcLcmRecipeFormatter(String dashCasedRecipe) {
+        this.dashCasedRecipe = dashCasedRecipe;
+    }
+
+    String getUrlRecipe() {
+        return dashCasedRecipe.toLowerCase();
+    }
+
+    String getBodyRecipe() {
+        return Lists.newArrayList(dashCasedRecipe.split("-"))
+                .stream()
+                .map(String::toLowerCase)
+                .map(StringUtils::capitalize)
+                .collect(Collectors.joining(""));
+    }
+}
diff --git a/models-interactions/model-actors/actor.appclcm/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/models-interactions/model-actors/actor.appclcm/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
new file mode 100644
index 0000000..403ad98
--- /dev/null
+++ b/models-interactions/model-actors/actor.appclcm/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
@@ -0,0 +1 @@
+org.onap.policy.controlloop.actor.appclcm.AppcLcmActorServiceProvider
\ No newline at end of file
diff --git a/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProviderTest.java b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProviderTest.java
new file mode 100644
index 0000000..39cdc43
--- /dev/null
+++ b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmActorServiceProviderTest.java
@@ -0,0 +1,443 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * AppcServiceProviderTest
+ * ================================================================================
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.appclcm;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import java.time.Instant;
+import java.util.AbstractMap;
+import java.util.HashMap;
+import java.util.UUID;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.util.AaiException;
+import org.onap.policy.appclcm.LcmCommonHeader;
+import org.onap.policy.appclcm.LcmRequest;
+import org.onap.policy.appclcm.LcmRequestWrapper;
+import org.onap.policy.appclcm.LcmResponse;
+import org.onap.policy.appclcm.LcmResponseWrapper;
+import org.onap.policy.common.endpoints.http.server.HttpServletServer;
+import org.onap.policy.controlloop.ControlLoopEventStatus;
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.ControlLoopTargetType;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.controlloop.policy.PolicyResult;
+import org.onap.policy.controlloop.policy.Target;
+import org.onap.policy.controlloop.policy.TargetType;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.simulators.Util;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class AppcLcmActorServiceProviderTest {
+
+    private static final Logger logger = LoggerFactory.getLogger(AppcLcmActorServiceProviderTest.class);
+
+    private static final VirtualControlLoopEvent onsetEvent;
+    private static final ControlLoopOperation operation;
+    private static final Policy policy;
+    private static final LcmResponseWrapper dmaapResponse;
+
+    private static final String RECIPE_RESTART = "Restart";
+    private static final String RECIPE_REBUILD = "Rebuild";
+    private static final String RECIPE_MIGRATE = "Migrate";
+
+    static {
+        /*
+         * Construct an onset with an AAI subtag containing generic-vnf.vnf-id and a target type of
+         * VM.
+         */
+        onsetEvent = new VirtualControlLoopEvent();
+        onsetEvent.setClosedLoopControlName("closedLoopControlName-Test");
+        onsetEvent.setRequestId(UUID.randomUUID());
+        onsetEvent.setClosedLoopEventClient("tca.instance00001");
+        onsetEvent.setTargetType(ControlLoopTargetType.VM);
+        onsetEvent.setTarget("generic-vnf.vnf-name");
+        onsetEvent.setFrom("DCAE");
+        onsetEvent.setClosedLoopAlarmStart(Instant.now());
+        onsetEvent.setAai(new HashMap<>());
+        onsetEvent.getAai().put("generic-vnf.vnf-name", "fw0001vm001fw001");
+        onsetEvent.setClosedLoopEventStatus(ControlLoopEventStatus.ONSET);
+
+        /* Construct an operation with an APPC actor and restart operation. */
+        operation = new ControlLoopOperation();
+        operation.setActor("APPC");
+        operation.setOperation("Restart");
+        operation.setTarget("VM");
+        operation.setEnd(Instant.now());
+        operation.setSubRequestId("1");
+
+        /* Construct a policy specifying to restart vm. */
+        policy = new Policy();
+        policy.setName("Restart the VM");
+        policy.setDescription("Upon getting the trigger event, restart the VM");
+        policy.setActor("APPC");
+        policy.setTarget(new Target(TargetType.VNF));
+        policy.setRecipe("Restart");
+        policy.setPayload(null);
+        policy.setRetry(2);
+        policy.setTimeout(300);
+
+        /* A sample DMAAP request wrapper. */
+        LcmRequestWrapper dmaapRequest = new LcmRequestWrapper();
+        dmaapRequest.setCorrelationId(onsetEvent.getRequestId().toString() + "-" + "1");
+        dmaapRequest.setRpcName(policy.getRecipe().toLowerCase());
+        dmaapRequest.setType("request");
+
+        /* A sample DMAAP response wrapper */
+        dmaapResponse = new LcmResponseWrapper();
+        dmaapResponse.setCorrelationId(onsetEvent.getRequestId().toString() + "-" + "1");
+        dmaapResponse.setRpcName(policy.getRecipe().toLowerCase());
+        dmaapResponse.setType("response");
+
+        /* Set environment properties */
+        PolicyEngine.manager.setEnvironmentProperty("aai.url", "http://localhost:6666");
+        PolicyEngine.manager.setEnvironmentProperty("aai.username", "AAI");
+        PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI");
+
+        /* A sample APPC LCM request. */
+        LcmRequest appcRequest = new LcmRequest();
+
+        /* The following code constructs a sample APPC LCM Request */
+        appcRequest.setAction("restart");
+
+        HashMap<String, String> actionIdentifiers = new HashMap<>();
+        actionIdentifiers.put("vnf-id", "trial-vnf-003");
+
+        appcRequest.setActionIdentifiers(actionIdentifiers);
+
+        LcmCommonHeader commonHeader = new LcmCommonHeader();
+        commonHeader.setRequestId(onsetEvent.getRequestId());
+        commonHeader.setSubRequestId("1");
+        commonHeader.setOriginatorId(onsetEvent.getRequestId().toString());
+
+        appcRequest.setCommonHeader(commonHeader);
+
+        appcRequest.setPayload(null);
+
+        dmaapRequest.setBody(appcRequest);
+
+        /* The following code constructs a sample APPC LCM Response */
+        LcmResponse appcResponse = new LcmResponse(appcRequest);
+        appcResponse.getStatus().setCode(400);
+        appcResponse.getStatus().setMessage("Restart Successful");
+
+        dmaapResponse.setBody(appcResponse);
+    }
+
+    /**
+     * Set up before test class.
+     */
+    @BeforeClass
+    public static void setUpSimulator() {
+        try {
+            Util.buildAaiSim();
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    /**
+     * Tear down after test class.
+     */
+    @AfterClass
+    public static void tearDownSimulator() {
+        HttpServletServer.factory.destroy();
+    }
+
+    /**
+     * A test to construct an APPC LCM restart request.
+     */
+    @Test
+    public void constructRestartRequestTest() {
+
+        LcmRequestWrapper dmaapRequest =
+                AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, policy, "vnf01");
+
+        /* The service provider must return a non null DMAAP request wrapper */
+        assertNotNull(dmaapRequest);
+
+        /* The DMAAP wrapper's type field must be request */
+        assertEquals("request", dmaapRequest.getType());
+
+        /* The DMAAP wrapper's body field cannot be null */
+        assertNotNull(dmaapRequest.getBody());
+
+        LcmRequest appcRequest = dmaapRequest.getBody();
+
+        /* A common header is required and cannot be null */
+        assertNotNull(appcRequest.getCommonHeader());
+        assertEquals(appcRequest.getCommonHeader().getRequestId(), onsetEvent.getRequestId());
+
+        /* An action is required and cannot be null */
+        assertNotNull(appcRequest.getAction());
+        assertEquals("Restart", appcRequest.getAction());
+
+        /* Action Identifiers are required and cannot be null */
+        assertNotNull(appcRequest.getActionIdentifiers());
+        assertNotNull(appcRequest.getActionIdentifiers().get("vnf-id"));
+        assertEquals("vnf01", appcRequest.getActionIdentifiers().get("vnf-id"));
+
+        logger.debug("APPC Request: \n" + appcRequest.toString());
+    }
+
+    /**
+     * A test to process a successful APPC restart response.
+     */
+    @Test
+    public void processRestartResponseSuccessTest() {
+        AbstractMap.SimpleEntry<PolicyResult, String> result =
+                AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.SUCCESS, result.getKey());
+        assertEquals("Restart Successful", result.getValue());
+    }
+
+    /**
+     * A test to map APPC response results to corresponding Policy results.
+     */
+    @Test
+    public void appcToPolicyResultTest() {
+
+        AbstractMap.SimpleEntry<PolicyResult, String> result;
+
+        /* If APPC accepts, PolicyResult is null */
+        dmaapResponse.getBody().getStatus().setCode(100);
+        dmaapResponse.getBody().getStatus().setMessage("ACCEPTED");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertNull(result.getKey());
+
+        /* If APPC is successful, PolicyResult is success */
+        dmaapResponse.getBody().getStatus().setCode(400);
+        dmaapResponse.getBody().getStatus().setMessage("SUCCESS");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.SUCCESS, result.getKey());
+
+        /* If APPC returns an error, PolicyResult is failure exception */
+        dmaapResponse.getBody().getStatus().setCode(200);
+        dmaapResponse.getBody().getStatus().setMessage("ERROR");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
+
+        /* If APPC rejects, PolicyResult is failure exception */
+        dmaapResponse.getBody().getStatus().setCode(300);
+        dmaapResponse.getBody().getStatus().setMessage("REJECT");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
+
+        /* Test multiple reject codes */
+        dmaapResponse.getBody().getStatus().setCode(306);
+        dmaapResponse.getBody().getStatus().setMessage("REJECT");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
+
+        dmaapResponse.getBody().getStatus().setCode(313);
+        dmaapResponse.getBody().getStatus().setMessage("REJECT");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
+
+        /* If APPC returns failure, PolicyResult is failure */
+        dmaapResponse.getBody().getStatus().setCode(401);
+        dmaapResponse.getBody().getStatus().setMessage("FAILURE");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE, result.getKey());
+
+        /* Test multiple failure codes */
+        dmaapResponse.getBody().getStatus().setCode(406);
+        dmaapResponse.getBody().getStatus().setMessage("FAILURE");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE, result.getKey());
+
+        dmaapResponse.getBody().getStatus().setCode(450);
+        dmaapResponse.getBody().getStatus().setMessage("FAILURE");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE, result.getKey());
+
+        /* If APPC returns partial success, PolicyResult is failure exception */
+        dmaapResponse.getBody().getStatus().setCode(500);
+        dmaapResponse.getBody().getStatus().setMessage("PARTIAL SUCCESS");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
+
+        /* If APPC returns partial failure, PolicyResult is failure exception */
+        dmaapResponse.getBody().getStatus().setCode(501);
+        dmaapResponse.getBody().getStatus().setMessage("PARTIAL FAILURE");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
+
+        /* Test multiple partial failure codes */
+        dmaapResponse.getBody().getStatus().setCode(599);
+        dmaapResponse.getBody().getStatus().setMessage("PARTIAL FAILURE");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
+
+        dmaapResponse.getBody().getStatus().setCode(550);
+        dmaapResponse.getBody().getStatus().setMessage("PARTIAL FAILURE");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
+
+        /* If APPC code is unknown to Policy, PolicyResult is failure exception */
+        dmaapResponse.getBody().getStatus().setCode(700);
+        dmaapResponse.getBody().getStatus().setMessage("UNKNOWN");
+        result = AppcLcmActorServiceProvider.processResponse(dmaapResponse);
+        assertEquals(PolicyResult.FAILURE_EXCEPTION, result.getKey());
+    }
+
+    /**
+     * This test ensures that that if the the source entity is also the target entity, the source
+     * will be used for the APPC request.
+     */
+    @Test
+    public void sourceIsTargetTest() {
+        String resourceId = "82194af1-3c2c-485a-8f44-420e22a9eaa4";
+        String targetVnfId = null;
+        try {
+            targetVnfId = AppcLcmActorServiceProvider.vnfNamedQuery(resourceId, "vnf01");
+        } catch (AaiException e) {
+            logger.warn(e.toString());
+            fail("no vnf-id found");
+        }
+        assertNotNull(targetVnfId);
+        assertEquals("vnf01", targetVnfId);
+    }
+
+    /**
+     * THis test exercises getters not exercised in other tests.
+     */
+    @Test
+    public void testMethods() {
+        AppcLcmActorServiceProvider sp = new AppcLcmActorServiceProvider();
+
+        assertEquals("APPC", sp.actor());
+        assertEquals(4, sp.recipes().size());
+        assertEquals("VM", sp.recipeTargets("Restart").get(0));
+        assertEquals("vm-id", sp.recipePayloads("Restart").get(0));
+    }
+
+    @Test
+    public void payloadNotPassedWhenNotSupportedByRecipe() {
+        //given
+        Policy migratePolicy = constructPolicyWithRecipe(RECIPE_MIGRATE);
+        Policy rebuildPolicy = constructPolicyWithRecipe(RECIPE_REBUILD);
+        Policy restartPolicy = constructPolicyWithRecipe(RECIPE_RESTART);
+
+        // when
+        LcmRequestWrapper migrateRequest =
+            AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, migratePolicy, "vnf01");
+        LcmRequestWrapper rebuildRequest =
+            AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, rebuildPolicy, "vnf01");
+        LcmRequestWrapper restartRequest =
+            AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, restartPolicy, "vnf01");
+
+        // then
+        assertNull(migrateRequest.getBody().getPayload());
+        assertNull(rebuildRequest.getBody().getPayload());
+        assertNull(restartRequest.getBody().getPayload());
+    }
+
+    @Test
+    public void payloadNotPassedWhenNotSuppliedOrEmpty() {
+        //given
+        Policy noPayloadPolicy = constructHealthCheckPolicyWithPayload(null);
+        Policy emptyPayloadPolicy = constructHealthCheckPolicyWithPayload(new HashMap<>());
+
+        // when
+        LcmRequestWrapper noPayloadRequest =
+            AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, noPayloadPolicy, "vnf01");
+        LcmRequestWrapper emptyPayloadRequest =
+            AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, emptyPayloadPolicy, "vnf01");
+
+
+        // then
+        assertNull(noPayloadRequest.getBody().getPayload());
+        assertNull(emptyPayloadRequest.getBody().getPayload());
+    }
+
+    @Test
+    public void payloadParsedProperlyForSinglePayloadParameter() {
+        // given
+        HashMap<String, String> payload = new HashMap<>();
+        payload.put("requestParameters", "{\"host-ip-address\":\"10.183.37.25\"}");
+        Policy otherPolicy = constructHealthCheckPolicyWithPayload(payload);
+
+        // when
+        LcmRequestWrapper dmaapRequest =
+            AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, otherPolicy, "vnf01");
+
+        // then
+        assertEquals(dmaapRequest.getBody().getPayload(),
+            "{\"requestParameters\": {\"host-ip-address\":\"10.183.37.25\"}}");
+    }
+
+
+    @Test
+    public void payloadParsedProperlyForMultiplePayloadParameters() {
+        // given
+        HashMap<String, String> payload = new HashMap<>();
+        payload.put("requestParameters", "{\"host-ip-address\":\"10.183.37.25\"}");
+        payload.put("configurationParameters", "[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[9]\","
+            + "\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[16]\","
+            + "\"enabled\":\"$.vf-module-topology.vf-module-parameters.param[23]\"}]");
+        Policy otherPolicy = constructHealthCheckPolicyWithPayload(payload);
+
+        // when
+        LcmRequestWrapper dmaapRequest =
+            AppcLcmActorServiceProvider.constructRequest(onsetEvent, operation, otherPolicy, "vnf01");
+
+        // then
+        assertEquals(dmaapRequest.getBody().getPayload(),
+            "{\"requestParameters\": "
+                + "{\"host-ip-address\":\"10.183.37.25\"},"
+                + "\"configurationParameters\": "
+                + "[{\"ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[9]\","
+                + "\"oam-ip-addr\":\"$.vf-module-topology.vf-module-parameters.param[16]\","
+                + "\"enabled\":\"$.vf-module-topology.vf-module-parameters.param[23]\"}]"
+                + "}");
+    }
+
+    private Policy constructHealthCheckPolicyWithPayload(HashMap<String, String> payload) {
+        return constructHealthCheckPolicyWithPayloadAndRecipe(payload, "Health-Check");
+    }
+
+    private Policy constructPolicyWithRecipe(String recipe) {
+        return constructHealthCheckPolicyWithPayloadAndRecipe(null, recipe);
+    }
+
+    private Policy constructHealthCheckPolicyWithPayloadAndRecipe(HashMap<String, String> payload, String recipe) {
+        Policy otherPolicy = new Policy();
+        otherPolicy.setName("Perform health check");
+        otherPolicy.setDescription("Upon getting the trigger event, perform health check");
+        otherPolicy.setActor("APPC");
+        otherPolicy.setTarget(new Target(TargetType.VNF));
+        otherPolicy.setRecipe(recipe);
+        otherPolicy.setPayload(payload);
+        otherPolicy.setRetry(2);
+        otherPolicy.setTimeout(300);
+        return otherPolicy;
+    }
+}
diff --git a/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmRecipeFormatterTest.java b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmRecipeFormatterTest.java
new file mode 100644
index 0000000..8e9a4c3
--- /dev/null
+++ b/models-interactions/model-actors/actor.appclcm/src/test/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmRecipeFormatterTest.java
@@ -0,0 +1,99 @@
+/*
+ * ============LICENSE_START=======================================================
+ *
+ * ================================================================================
+ * Copyright (C) 2018 Nokia Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.appclcm;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+
+
+public class AppcLcmRecipeFormatterTest {
+
+    @Test
+    public void shouldCorrectlyFormatRestartRequestWhenRestartGiven() {
+        //given
+        AppcLcmRecipeFormatter recipeFormatter = new AppcLcmRecipeFormatter("Restart");
+        String expectedUrlRecipe = "restart";
+        String expectedBodyRecipe = "Restart";
+
+        //when
+        String actualUrlRecipe = recipeFormatter.getUrlRecipe();
+        String actualBodyRecipe = recipeFormatter.getBodyRecipe();
+
+        //then
+        assertEquals(expectedUrlRecipe, actualUrlRecipe);
+        assertEquals(expectedBodyRecipe, actualBodyRecipe);
+    }
+
+    @Test
+    public void shouldReturnCapitalizedBodySingleWordRecipe() {
+        //given
+        AppcLcmRecipeFormatter recipeFormatter = new AppcLcmRecipeFormatter("moDify");
+        String expectedRecipe = "Modify";
+
+        //when
+        String actualRecipe = recipeFormatter.getBodyRecipe();
+
+        //then
+        assertEquals(expectedRecipe, actualRecipe);
+    }
+
+    @Test
+    public void shouldReturnCapitalizeAndJoinedBodyMultiWordRecipe() {
+        //given
+        AppcLcmRecipeFormatter recipeFormatter = new AppcLcmRecipeFormatter("coNfig-moDify");
+        String expectedRecipe = "ConfigModify";
+
+        //when
+        String actualRecipe = recipeFormatter.getBodyRecipe();
+
+        //then
+        assertEquals(expectedRecipe, actualRecipe);
+    }
+
+    @Test
+    public void shouldReturnLowercasedUrlSingleWordRecipe() {
+        //given
+        AppcLcmRecipeFormatter recipeFormatter = new AppcLcmRecipeFormatter("ModIfy");
+        String expectedRecipe = "modify";
+
+        //when
+        String actualRecipe = recipeFormatter.getUrlRecipe();
+
+        //then
+        assertEquals(expectedRecipe, actualRecipe);
+    }
+
+    @Test
+    public void shouldReturnLowercasedDashJoinedUrlMultiWordRecipe() {
+        //given
+        AppcLcmRecipeFormatter recipeFormatter = new AppcLcmRecipeFormatter("Config-MoDify");
+        String expectedRecipe = "config-modify";
+
+        //when
+        String actualRecipe = recipeFormatter.getUrlRecipe();
+
+        //then
+        assertEquals(expectedRecipe, actualRecipe);
+    }
+}
\ No newline at end of file
diff --git a/models-interactions/model-actors/actor.sdnc/pom.xml b/models-interactions/model-actors/actor.sdnc/pom.xml
new file mode 100644
index 0000000..9a451a1
--- /dev/null
+++ b/models-interactions/model-actors/actor.sdnc/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+   <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+    <artifactId>model-actors</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>actor.sdnc</artifactId>
+
+  <dependencies>
+    <dependency>
+     <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+      <artifactId>actorServiceProvider</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>sdnc</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>events</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>aai</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.common</groupId>
+      <artifactId>policy-endpoints</artifactId>
+      <version>${policy.common.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-pdp</groupId>
+      <artifactId>policy-management</artifactId>
+      <version>${policy.drools-pdp.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
+      <artifactId>simulators</artifactId>
+      <version>${policy.drools-applications.version}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProvider.java b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProvider.java
new file mode 100644
index 0000000..4238391
--- /dev/null
+++ b/models-interactions/model-actors/actor.sdnc/src/main/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProvider.java
@@ -0,0 +1,135 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SdncActorServiceProvider
+ * ================================================================================
+ * Copyright (C) 2018 Huawei Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.sdnc;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+
+import org.onap.policy.aai.AaiGetVnfResponse;
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.sdnc.SdncHealNetworkInfo;
+import org.onap.policy.sdnc.SdncHealRequest;
+import org.onap.policy.sdnc.SdncHealRequestHeaderInfo;
+import org.onap.policy.sdnc.SdncHealRequestInfo;
+import org.onap.policy.sdnc.SdncHealServiceInfo;
+import org.onap.policy.sdnc.SdncRequest;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class SdncActorServiceProvider implements Actor {
+    private static final Logger logger = LoggerFactory.getLogger(SdncActorServiceProvider.class);
+
+    // Strings for Sdnc Actor
+    private static final String SDNC_ACTOR = "SDNC";
+
+    // Strings for targets
+    private static final String TARGET_VM = "VM";
+
+    // Strings for recipes
+    private static final String RECIPE_REROUTE = "Reroute";
+
+    private static final ImmutableList<String> recipes = ImmutableList.of(RECIPE_REROUTE);
+    private static final ImmutableMap<String, List<String>> targets =
+            new ImmutableMap.Builder<String, List<String>>().put(RECIPE_REROUTE, ImmutableList.of(TARGET_VM)).build();
+
+    @Override
+    public String actor() {
+        return SDNC_ACTOR;
+    }
+
+    @Override
+    public List<String> recipes() {
+        return ImmutableList.copyOf(recipes);
+    }
+
+    @Override
+    public List<String> recipeTargets(String recipe) {
+        return ImmutableList.copyOf(targets.getOrDefault(recipe, Collections.emptyList()));
+    }
+
+    @Override
+    public List<String> recipePayloads(String recipe) {
+        return Collections.emptyList();
+    }
+
+    /**
+     * Construct a request.
+     *
+     * @param onset the onset event
+     * @param operation the control loop operation
+     * @param policy the policy
+     * @return the constructed request
+     */
+    public static SdncRequest constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation,
+            Policy policy) {
+
+        if (!policy.getRecipe().equalsIgnoreCase(RECIPE_REROUTE)) {
+            return null;
+        }
+
+        // Construct an Sdnc request
+        String serviceInstance = onset.getAai().get("service-instance.service-instance-id");
+        if (serviceInstance == null || serviceInstance.isEmpty()) {
+            // This indicates that AAI Enrichment needs to be done by event producer. 
+            return null;
+        }
+        SdncHealServiceInfo serviceInfo = new SdncHealServiceInfo();
+        serviceInfo.setServiceInstanceId(serviceInstance);
+        
+        String networkId = onset.getAai().get("network-information.network-id");
+        if (networkId == null || networkId.isEmpty()) {
+            // This indicates that AAI Enrichment needs to be done by event producer. 
+            return null;
+        }
+        SdncHealNetworkInfo networkInfo = new SdncHealNetworkInfo();        
+        networkInfo.setNetworkId(networkId);
+
+        SdncHealRequestInfo requestInfo = new SdncHealRequestInfo();
+        requestInfo.setRequestAction("ReoptimizeSOTNInstance");
+
+        SdncHealRequestHeaderInfo headerInfo = new SdncHealRequestHeaderInfo();
+        headerInfo.setSvcAction("reoptimize");
+        headerInfo.setSvcRequestId(UUID.randomUUID().toString());
+
+        SdncRequest request = new SdncRequest();
+        request.setNsInstanceId(serviceInstance);
+        request.setRequestId(onset.getRequestId());
+
+        SdncHealRequest healRequest = new SdncHealRequest();
+        healRequest.setRequestHeaderInfo(headerInfo);
+        healRequest.setNetworkInfo(networkInfo);
+        healRequest.setRequestInfo(requestInfo);
+        healRequest.setServiceInfo(serviceInfo);
+        request.setHealRequest(healRequest);
+
+        return request;
+    }
+}
\ No newline at end of file
diff --git a/models-interactions/model-actors/actor.sdnc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/models-interactions/model-actors/actor.sdnc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
new file mode 100644
index 0000000..f4d1e97
--- /dev/null
+++ b/models-interactions/model-actors/actor.sdnc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
@@ -0,0 +1 @@
+org.onap.policy.controlloop.actor.sdnc.SdncActorServiceProvider
\ No newline at end of file
diff --git a/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java
new file mode 100644
index 0000000..7b64b87
--- /dev/null
+++ b/models-interactions/model-actors/actor.sdnc/src/test/java/org/onap/policy/controlloop/actor/sdnc/SdncActorServiceProviderTest.java
@@ -0,0 +1,115 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * TestSdncActorServiceProvider
+ * ================================================================================
+ * Copyright (C) 2018 Huawei. All rights reserved.
+ * Modifications Copyright (C) 2018 AT&T Corp. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.sdnc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import java.util.Objects;
+import java.util.UUID;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.AaiGetVnfResponse;
+import org.onap.policy.common.endpoints.http.server.HttpServletServer;
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.sdnc.SdncRequest;
+import org.onap.policy.simulators.Util;
+
+public class SdncActorServiceProviderTest {
+
+    /**
+     * Set up for test class.
+     */
+    @BeforeClass
+    public static void setUpSimulator() {
+        try {
+            Util.buildAaiSim();
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @AfterClass
+    public static void tearDownSimulator() {
+        HttpServletServer.factory.destroy();
+    }
+
+    @Test
+    public void testConstructRequest() {
+        VirtualControlLoopEvent onset = new VirtualControlLoopEvent();
+        ControlLoopOperation operation = new ControlLoopOperation();
+
+        Policy policy = new Policy();
+        policy.setRecipe("Reroute");
+
+        assertNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+
+        onset.getAai().put("network-information.network-id", "network-5555");
+        assertNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+
+        PolicyEngine.manager.setEnvironmentProperty("aai.url", "http://localhost:6666");
+        PolicyEngine.manager.setEnvironmentProperty("aai.username", "AAI");
+        PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI");
+        assertNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+
+        UUID requestId = UUID.randomUUID();
+        onset.setRequestId(requestId);
+        assertNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+
+        PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI");
+        assertNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+
+        onset.getAai().put("service-instance.service-instance-id", "service-instance-01");
+        assertNotNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+
+        policy.setRecipe("Reroute");
+        assertNotNull(SdncActorServiceProvider.constructRequest(onset, operation, policy));
+
+        SdncRequest request =
+                SdncActorServiceProvider.constructRequest(onset, operation, policy);
+
+        assertEquals(requestId, Objects.requireNonNull(request).getRequestId());
+        assertEquals("reoptimize", request.getHealRequest().getRequestHeaderInfo().getSvcAction());
+        assertEquals("ReoptimizeSOTNInstance", request.getHealRequest().getRequestInfo().getRequestAction());
+        assertEquals("network-5555", request.getHealRequest().getNetworkInfo().getNetworkId());
+        assertEquals("service-instance-01", request.getHealRequest().getServiceInfo().getServiceInstanceId());
+    }
+
+    @Test
+    public void testMethods() {
+        SdncActorServiceProvider sp = new SdncActorServiceProvider();
+
+        assertEquals("SDNC", sp.actor());
+        assertEquals(1, sp.recipes().size());
+        assertEquals("Reroute", sp.recipes().get(0));
+        assertEquals("VM", sp.recipeTargets("Reroute").get(0));
+        assertEquals(0, sp.recipePayloads("Reroute").size());
+    }
+}
diff --git a/models-interactions/model-actors/actor.sdnr/pom.xml b/models-interactions/model-actors/actor.sdnr/pom.xml
new file mode 100644
index 0000000..ebf1f3e
--- /dev/null
+++ b/models-interactions/model-actors/actor.sdnr/pom.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+   <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+    <artifactId>model-actors</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>actor.sdnr</artifactId>
+
+  <dependencies>
+    <dependency>
+     <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+      <artifactId>actorServiceProvider</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>sdnr</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>events</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
+      <artifactId>simulators</artifactId>
+      <version>${policy.drools-applications.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.common</groupId>
+      <artifactId>policy-endpoints</artifactId>
+      <version>${policy.common.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-pdp</groupId>
+      <artifactId>policy-management</artifactId>
+      <version>${policy.drools-pdp.version}</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProvider.java b/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProvider.java
new file mode 100644
index 0000000..24db0bd
--- /dev/null
+++ b/models-interactions/model-actors/actor.sdnr/src/main/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProvider.java
@@ -0,0 +1,256 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * SdnrActorServiceProvider
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.sdnr;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.controlloop.policy.PolicyResult;
+import org.onap.policy.sdnr.PciCommonHeader;
+import org.onap.policy.sdnr.PciRequest;
+import org.onap.policy.sdnr.PciRequestWrapper;
+import org.onap.policy.sdnr.PciResponse;
+import org.onap.policy.sdnr.PciResponseCode;
+import org.onap.policy.sdnr.PciResponseWrapper;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SdnrActorServiceProvider implements Actor {
+
+    public static class Pair<A, B> {
+        public final A result;
+        public final B message;
+
+        public Pair(A result, B message) {
+            this.result = result;
+            this.message = message;
+        }
+
+        public A getResult() {
+            return this.result;
+        }
+
+        public B getMessage() {
+            return this.message;
+        }
+    }
+
+    private static final Logger logger = LoggerFactory.getLogger(SdnrActorServiceProvider.class);
+
+    // Strings for targets
+    private static final String TARGET_VNF = "VNF";
+
+    // Strings for recipes
+    private static final String RECIPE_MODIFY = "ModifyConfig";
+
+    /* To be used in future releases when pci ModifyConfig is used */
+    private static final String SDNR_REQUEST_PARAMS = "request-parameters";
+    private static final String SDNR_CONFIG_PARAMS = "configuration-parameters";
+
+    private static final ImmutableList<String> recipes = ImmutableList.of(RECIPE_MODIFY);
+    private static final ImmutableMap<String, List<String>> targets = new ImmutableMap.Builder<String, List<String>>()
+            .put(RECIPE_MODIFY, ImmutableList.of(TARGET_VNF)).build();
+    private static final ImmutableMap<String, List<String>> payloads = new ImmutableMap.Builder<String, List<String>>()
+            .put(RECIPE_MODIFY, ImmutableList.of(SDNR_REQUEST_PARAMS, SDNR_CONFIG_PARAMS)).build();
+
+    @Override
+    public String actor() {
+        return "SDNR";
+    }
+
+    @Override
+    public List<String> recipes() {
+        return ImmutableList.copyOf(recipes);
+    }
+
+    @Override
+    public List<String> recipeTargets(String recipe) {
+        return ImmutableList.copyOf(targets.getOrDefault(recipe, Collections.emptyList()));
+    }
+
+    @Override
+    public List<String> recipePayloads(String recipe) {
+        return ImmutableList.copyOf(payloads.getOrDefault(recipe, Collections.emptyList()));
+    }
+
+    /**
+     * Constructs an SDNR request conforming to the pci API. The actual request is
+     * constructed and then placed in a wrapper object used to send through DMAAP.
+     *
+     * @param onset
+     *            the event that is reporting the alert for policy to perform an
+     *            action
+     * @param operation
+     *            the control loop operation specifying the actor, operation,
+     *            target, etc.
+     * @param policy
+     *            the policy the was specified from the yaml generated by CLAMP or
+     *            through the Policy GUI/API
+     * @return an SDNR request conforming to the pci API using the DMAAP wrapper
+     */
+
+    public static PciRequestWrapper constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation,
+            Policy policy) {
+
+        /* Construct an SDNR request using pci Model */
+
+        /*
+         * The actual pci request is placed in a wrapper used to send through dmaap. The
+         * current version is 2.0 as of R1.
+         */
+        PciRequestWrapper dmaapRequest = new PciRequestWrapper();
+        dmaapRequest.setVersion("1.0");
+        dmaapRequest.setCorrelationId(onset.getRequestId() + "-" + operation.getSubRequestId());
+        dmaapRequest.setRpcName(policy.getRecipe().toLowerCase());
+        dmaapRequest.setType("request");
+
+        /* This is the actual request that is placed in the dmaap wrapper. */
+        final PciRequest sdnrRequest = new PciRequest();
+
+        /* The common header is a required field for all SDNR requests. */
+        PciCommonHeader requestCommonHeader = new PciCommonHeader();
+        requestCommonHeader.setRequestId(onset.getRequestId());
+        requestCommonHeader.setSubRequestId(operation.getSubRequestId());
+
+        sdnrRequest.setCommonHeader(requestCommonHeader);
+        sdnrRequest.setPayload(onset.getPayload());
+
+        /*
+         * An action is required for all SDNR requests, this will be the recipe
+         * specified in the policy.
+         */
+        sdnrRequest.setAction(policy.getRecipe());
+
+        /*
+         * Once the pci request is constructed, add it into the body of the dmaap
+         * wrapper.
+         */
+        dmaapRequest.setBody(sdnrRequest);
+        logger.info("SDNR Request to be sent is {}", dmaapRequest);
+
+        /* Return the request to be sent through dmaap. */
+        return dmaapRequest;
+    }
+
+    /**
+     * Parses the operation attempt using the subRequestId of SDNR response.
+     *
+     * @param subRequestId
+     *            the sub id used to send to SDNR, Policy sets this using the
+     *            operation attempt
+     *
+     * @return the current operation attempt
+     */
+    public static Integer parseOperationAttempt(String subRequestId) {
+        Integer operationAttempt;
+        try {
+            operationAttempt = Integer.parseInt(subRequestId);
+        } catch (NumberFormatException e) {
+            logger.debug("A NumberFormatException was thrown in parsing the operation attempt {}", subRequestId);
+            return null;
+        }
+        return operationAttempt;
+    }
+
+    /**
+     * Processes the SDNR pci response sent from SDNR. Determines if the SDNR
+     * operation was successful/unsuccessful and maps this to the corresponding
+     * Policy result.
+     *
+     * @param dmaapResponse
+     *            the dmaap wrapper message that contains the actual SDNR reponse
+     *            inside the body field
+     *
+     * @return an key-value pair that contains the Policy result and SDNR response
+     *         message
+     */
+    public static SdnrActorServiceProvider.Pair<PolicyResult, String> processResponse(
+            PciResponseWrapper dmaapResponse) {
+
+        logger.info("SDNR processResponse called : {}", dmaapResponse);
+
+        /* The actual SDNR response is inside the wrapper's body field. */
+        PciResponse sdnrResponse = dmaapResponse.getBody();
+
+        /* The message returned in the SDNR response. */
+        String message;
+
+        /* The Policy result determined from the SDNR Response. */
+        PolicyResult result;
+
+        /*
+         * If there is no status, Policy cannot determine if the request was successful.
+         */
+        if (sdnrResponse.getStatus() == null) {
+            message = "Policy was unable to parse SDN-R response status field (it was null).";
+            return new SdnrActorServiceProvider.Pair<>(PolicyResult.FAILURE_EXCEPTION, message);
+        }
+
+        /*
+         * If there is no code, Policy cannot determine if the request was successful.
+         */
+        String responseValue = PciResponseCode.toResponseValue(sdnrResponse.getStatus().getCode());
+        if (responseValue == null) {
+            message = "Policy was unable to parse SDN-R response status code field.";
+            return new SdnrActorServiceProvider.Pair<>(PolicyResult.FAILURE_EXCEPTION, message);
+        }
+        logger.info("SDNR Response Code is {}", responseValue);
+
+        /* Save the SDNR response's message for Policy notification message. */
+        message = sdnrResponse.getStatus().getValue();
+        logger.info("SDNR Response Message is {}", message);
+
+        /*
+         * Response and Payload are just printed and no further action needed in
+         * casablanca release
+         */
+        String rspPayload = sdnrResponse.getPayload();
+        logger.info("SDNR Response Payload is {}", rspPayload);
+
+        /* Maps the SDNR response result to a Policy result. */
+        switch (responseValue) {
+            case PciResponseCode.ACCEPTED:
+                /* Nothing to do if code is accept, continue processing */
+                result = null;
+                break;
+            case PciResponseCode.SUCCESS:
+                result = PolicyResult.SUCCESS;
+                break;
+            case PciResponseCode.FAILURE:
+                result = PolicyResult.FAILURE;
+                break;
+            case PciResponseCode.REJECT:
+            case PciResponseCode.ERROR:
+            default:
+                result = PolicyResult.FAILURE_EXCEPTION;
+        }
+        return new SdnrActorServiceProvider.Pair<>(result, message);
+    }
+}
diff --git a/models-interactions/model-actors/actor.sdnr/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/models-interactions/model-actors/actor.sdnr/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
new file mode 100644
index 0000000..c8d5e4c
--- /dev/null
+++ b/models-interactions/model-actors/actor.sdnr/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
@@ -0,0 +1 @@
+org.onap.policy.controlloop.actor.sdnr.SdnrActorServiceProvider
diff --git a/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProviderTest.java b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProviderTest.java
new file mode 100644
index 0000000..a6212d3
--- /dev/null
+++ b/models-interactions/model-actors/actor.sdnr/src/test/java/org/onap/policy/controlloop/actor/sdnr/SdnrActorServiceProviderTest.java
@@ -0,0 +1,148 @@
+/*-
+ * SdnrActorServiceProviderTest
+ * ================================================================================
+ * Copyright (C) 2018 Wipro Limited Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.sdnr;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.time.Instant;
+import java.util.HashMap;
+import java.util.UUID;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.common.endpoints.http.server.HttpServletServer;
+import org.onap.policy.controlloop.ControlLoopEventStatus;
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.ControlLoopTargetType;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.controlloop.policy.Target;
+import org.onap.policy.controlloop.policy.TargetType;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.sdnr.PciRequest;
+import org.onap.policy.sdnr.PciResponse;
+import org.onap.policy.sdnr.util.Serialization;
+import org.onap.policy.simulators.Util;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SdnrActorServiceProviderTest {
+
+    private static final Logger logger = LoggerFactory.getLogger(SdnrActorServiceProviderTest.class);
+
+    private static final VirtualControlLoopEvent onsetEvent;
+    private static final ControlLoopOperation operation;
+    private static final Policy policy;
+
+    static {
+        /*
+         * Construct an onset. Using dummy AAI details since the code mandates AAI
+         * details.
+         */
+        onsetEvent = new VirtualControlLoopEvent();
+        onsetEvent.setClosedLoopControlName("closedLoopControlName-Test");
+        onsetEvent.setRequestId(UUID.randomUUID());
+        onsetEvent.setClosedLoopEventClient("tca.instance00001");
+        onsetEvent.setTargetType(ControlLoopTargetType.VNF);
+        onsetEvent.setTarget("generic-vnf.vnf-name");
+        onsetEvent.setFrom("DCAE");
+        onsetEvent.setClosedLoopAlarmStart(Instant.now());
+        onsetEvent.setAai(new HashMap<>());
+        onsetEvent.getAai().put("generic-vnf.vnf-name", "notused");
+        onsetEvent.setClosedLoopEventStatus(ControlLoopEventStatus.ONSET);
+        onsetEvent.setPayload("some payload");
+
+        /* Construct an operation with an SDNR actor and ModifyConfig operation. */
+        operation = new ControlLoopOperation();
+        operation.setActor("SDNR");
+        operation.setOperation("ModifyConfig");
+        operation.setTarget("VNF");
+        operation.setEnd(Instant.now());
+        operation.setSubRequestId("1");
+
+        /* Construct a policy specifying to modify configuration. */
+        policy = new Policy();
+        policy.setName("Modify PCI Config");
+        policy.setDescription("Upon getting the trigger event, modify pci config");
+        policy.setActor("SDNR");
+        policy.setTarget(new Target(TargetType.VNF));
+        policy.getTarget().setResourceID("Eace933104d443b496b8.nodes.heat.vpg");
+        policy.setRecipe("ModifyConfig");
+        policy.setPayload(null);
+        policy.setRetry(2);
+        policy.setTimeout(300);
+    }
+
+    @Test
+    public void constructModifyConfigRequestTest() {
+
+        PciRequest sdnrRequest;
+        sdnrRequest = SdnrActorServiceProvider.constructRequest(onsetEvent, operation, policy).getBody();
+
+        /* The service provider must return a non null SDNR request */
+        assertNotNull(sdnrRequest);
+
+        /* A common header is required and cannot be null */
+        assertNotNull(sdnrRequest.getCommonHeader());
+        assertEquals(sdnrRequest.getCommonHeader().getRequestId(), onsetEvent.getRequestId());
+
+        /* An action is required and cannot be null */
+        assertNotNull(sdnrRequest.getAction());
+        assertEquals("ModifyConfig", sdnrRequest.getAction());
+
+        /* A payload is required and cannot be null */
+        assertNotNull(sdnrRequest.getPayload());
+        assertEquals("some payload", sdnrRequest.getPayload());
+
+        logger.debug("SDNR Request: \n" + sdnrRequest.toString());
+
+        /* Print out request as json to make sure serialization works */
+        String jsonRequest = Serialization.gsonPretty.toJson(sdnrRequest);
+        logger.debug("JSON Output: \n" + jsonRequest);
+
+        /* The JSON string must contain the following fields */
+        assertTrue(jsonRequest.contains("CommonHeader"));
+        assertTrue(jsonRequest.contains("Action"));
+        assertTrue(jsonRequest.contains("ModifyConfig"));
+        assertTrue(jsonRequest.contains("payload"));
+
+        PciResponse sdnrResponse = new PciResponse(sdnrRequest);
+        sdnrResponse.getStatus().setCode(200);
+        sdnrResponse.getStatus().setValue("SDNR success");
+        /* Print out request as json to make sure serialization works */
+        String jsonResponse = Serialization.gsonPretty.toJson(sdnrResponse);
+        logger.debug("JSON Output: \n" + jsonResponse);
+    }
+
+    @Test
+    public void testMethods() {
+        SdnrActorServiceProvider sp = new SdnrActorServiceProvider();
+
+        assertEquals("SDNR", sp.actor());
+        assertEquals(1, sp.recipes().size());
+        assertEquals("VNF", sp.recipeTargets("ModifyConfig").get(0));
+        assertEquals(2, sp.recipePayloads("ModifyConfig").size());
+    }
+}
diff --git a/models-interactions/model-actors/actor.so/pom.xml b/models-interactions/model-actors/actor.so/pom.xml
new file mode 100644
index 0000000..a634fb9
--- /dev/null
+++ b/models-interactions/model-actors/actor.so/pom.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+   <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+    <artifactId>model-actors</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>actor.so</artifactId>
+
+  <dependencies>
+    <dependency>
+     <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+      <artifactId>actorServiceProvider</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>aai</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>events</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>so</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.drools</groupId>
+      <artifactId>drools-core</artifactId>
+      <version>6.5.0.Final</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.common</groupId>
+      <artifactId>policy-endpoints</artifactId>
+      <version>${policy.common.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-pdp</groupId>
+      <artifactId>policy-management</artifactId>
+      <version>${policy.drools-pdp.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
+      <artifactId>simulators</artifactId>
+      <version>${policy.drools-applications.version}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoActorServiceProvider.java b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoActorServiceProvider.java
new file mode 100644
index 0000000..eef6e7c
--- /dev/null
+++ b/models-interactions/model-actors/actor.so/src/main/java/org/onap/policy/controlloop/actor/so/SoActorServiceProvider.java
@@ -0,0 +1,458 @@
+/*
+ * ============LICENSE_START=======================================================
+ * SOActorServiceProvider
+ * ================================================================================
+ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.so;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.gson.reflect.TypeToken;
+import java.lang.reflect.Type;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import org.drools.core.WorkingMemory;
+import org.onap.policy.aai.AaiNqExtraProperty;
+import org.onap.policy.aai.AaiNqInventoryResponseItem;
+import org.onap.policy.aai.AaiNqResponseWrapper;
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.so.SoCloudConfiguration;
+import org.onap.policy.so.SoManager;
+import org.onap.policy.so.SoModelInfo;
+import org.onap.policy.so.SoOperationType;
+import org.onap.policy.so.SoRelatedInstance;
+import org.onap.policy.so.SoRelatedInstanceListElement;
+import org.onap.policy.so.SoRequest;
+import org.onap.policy.so.SoRequestDetails;
+import org.onap.policy.so.SoRequestInfo;
+import org.onap.policy.so.SoRequestParameters;
+import org.onap.policy.so.util.Serialization;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SoActorServiceProvider implements Actor {
+    private static final Logger logger = LoggerFactory.getLogger(SoActorServiceProvider.class);
+
+    // Strings for SO Actor
+    private static final String SO_ACTOR = "SO";
+
+    // Strings for targets
+    private static final String TARGET_VFC = "VFC";
+
+    // Strings for recipes
+    private static final String RECIPE_VF_MODULE_CREATE = "VF Module Create";
+    private static final String RECIPE_VF_MODULE_DELETE = "VF Module Delete";
+
+    private static final ImmutableList<String> recipes = ImmutableList.of(RECIPE_VF_MODULE_CREATE,
+            RECIPE_VF_MODULE_DELETE);
+    private static final ImmutableMap<String, List<String>> targets = new ImmutableMap.Builder<String, List<String>>()
+                    .put(RECIPE_VF_MODULE_CREATE, ImmutableList.of(TARGET_VFC))
+                    .put(RECIPE_VF_MODULE_DELETE, ImmutableList.of(TARGET_VFC)).build();
+
+    // name of request parameters within policy payload
+    public static final String REQ_PARAM_NM = "requestParameters";
+
+    // name of configuration parameters within policy payload
+    public static final String CONFIG_PARAM_NM = "configurationParameters";
+
+    private static final String MODEL_NAME_PROPERTY_KEY = "model-ver.model-name";
+    private static final String MODEL_VERSION_PROPERTY_KEY = "model-ver.model-version";
+    private static final String MODEL_VERSION_ID_PROPERTY_KEY = "model-ver.model-version-id";
+
+    // used to decode configuration parameters via gson
+    private static final Type CONFIG_TYPE = new TypeToken<List<Map<String, String>>>() {}.getType();
+
+    // Static variables required to hold the IDs of the last service item, VNF item and VF Module.
+    // Note that in
+    // a multithreaded deployment this WILL break
+    private static String lastVNFItemVnfId;
+    private static String lastServiceItemServiceInstanceId;
+    private static String lastVfModuleItemVfModuleInstanceId;
+
+    @Override
+    public String actor() {
+        return SO_ACTOR;
+    }
+
+    @Override
+    public List<String> recipes() {
+        return ImmutableList.copyOf(recipes);
+    }
+
+    @Override
+    public List<String> recipeTargets(String recipe) {
+        return ImmutableList.copyOf(targets.getOrDefault(recipe, Collections.emptyList()));
+    }
+
+    @Override
+    public List<String> recipePayloads(String recipe) {
+        return Collections.emptyList();
+    }
+
+    /**
+     * Constructs a SO request conforming to the lcm API. The actual request is
+     * constructed and then placed in a wrapper object used to send through DMAAP.
+     *
+     * @param onset the event that is reporting the alert for policy to perform an action
+     * @param operation the control loop operation specifying the actor, operation,
+     *        target, etc.
+     * @param policy the policy the was specified from the yaml generated by CLAMP or
+     *        through the Policy GUI/API
+     * @param aaiResponseWrapper wrapper for AAI vserver named-query response
+     * @return a SO request conforming to the lcm API using the DMAAP wrapper
+     */
+    public SoRequest constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation, Policy policy,
+                    AaiNqResponseWrapper aaiResponseWrapper) {
+        if (!SO_ACTOR.equals(policy.getActor()) || !recipes().contains(policy.getRecipe())) {
+            return null;
+        }
+
+        // A&AI named query should have been performed by now. If not, return null
+        if (aaiResponseWrapper == null) {
+            return null;
+        }
+
+        AaiNqInventoryResponseItem vnfItem;
+        AaiNqInventoryResponseItem vnfServiceItem;
+        AaiNqInventoryResponseItem tenantItem;
+
+        // Extract the items we're interested in from the response
+        try {
+            vnfItem = aaiResponseWrapper.getAaiNqResponse().getInventoryResponseItems().get(0).getItems()
+                            .getInventoryResponseItems().get(0);
+        } catch (Exception e) {
+            logger.error("VNF Item not found in AAI response {}", Serialization.gsonPretty.toJson(aaiResponseWrapper),
+                            e);
+            return null;
+        }
+
+        try {
+            vnfServiceItem = vnfItem.getItems().getInventoryResponseItems().get(0);
+        } catch (Exception e) {
+            logger.error("VNF Service Item not found in AAI response {}",
+                            Serialization.gsonPretty.toJson(aaiResponseWrapper), e);
+            return null;
+        }
+
+        try {
+            tenantItem = aaiResponseWrapper.getAaiNqResponse().getInventoryResponseItems().get(0).getItems()
+                            .getInventoryResponseItems().get(1);
+        } catch (Exception e) {
+            logger.error("Tenant Item not found in AAI response {}",
+                            Serialization.gsonPretty.toJson(aaiResponseWrapper), e);
+            return null;
+        }
+
+        // Find the index for base vf module and non-base vf module
+        AaiNqInventoryResponseItem baseItem = findVfModule(aaiResponseWrapper, true);
+        AaiNqInventoryResponseItem vfModuleItem = findVfModule(aaiResponseWrapper, false);
+
+        // Report the error if either base vf module or non-base vf module is not found
+        if (baseItem == null || vfModuleItem == null) {
+            logger.error("Either base or non-base vf module is not found from AAI response.");
+            return null;
+        }
+
+        // Construct SO Request for a policy's recipe
+        if (RECIPE_VF_MODULE_CREATE.equals(policy.getRecipe())) {
+            return constructCreateRequest(aaiResponseWrapper, policy, tenantItem, vnfItem, vnfServiceItem,
+                    vfModuleItem);
+        } else if (RECIPE_VF_MODULE_DELETE.equals(policy.getRecipe())) {
+            return constructDeleteRequest(tenantItem, vnfItem, vnfServiceItem, vfModuleItem);
+        } else {
+            return null;
+        }
+    }
+
+    /**
+     * Construct SO request to create vf-module.
+     *
+     * @param aaiResponseWrapper the AAI response containing the VF modules
+     * @param policy             the policy
+     * @param tenantItem         tenant item from A&AI named-query response
+     * @param vnfItem            vnf item from A&AI named-query response
+     * @param vnfServiceItem     vnf service item from A&AI named-query response
+     * @param vfModuleItem       vf module item from A&AI named-query response
+     * @return SO create vf-module request
+     */
+    private SoRequest constructCreateRequest(AaiNqResponseWrapper aaiResponseWrapper, Policy policy,
+                                             AaiNqInventoryResponseItem tenantItem, AaiNqInventoryResponseItem vnfItem,
+                                             AaiNqInventoryResponseItem vnfServiceItem,
+                                             AaiNqInventoryResponseItem vfModuleItem) {
+        SoRequest request = new SoRequest();
+        request.setOperationType(SoOperationType.SCALE_OUT);
+        //
+        //
+        // Do NOT send So the requestId, they do not support this field
+        //
+        request.setRequestDetails(new SoRequestDetails());
+        request.getRequestDetails().setRequestParameters(new SoRequestParameters());
+        request.getRequestDetails().getRequestParameters().setUserParams(null);
+
+        // cloudConfiguration
+        request.getRequestDetails().setCloudConfiguration(constructCloudConfiguration(tenantItem));
+        // modelInfo
+        request.getRequestDetails().setModelInfo(constructVfModuleModelInfo(vfModuleItem));
+        request.getRequestDetails().getModelInfo().setModelVersionId(vfModuleItem.getVfModule().getModelVersionId());
+
+        // requestInfo
+        request.getRequestDetails().setRequestInfo(constructRequestInfo());
+        String vfModuleName = aaiResponseWrapper.genVfModuleName();
+        request.getRequestDetails().getRequestInfo().setInstanceName(vfModuleName);
+
+        // relatedInstanceList
+        SoRelatedInstanceListElement relatedInstanceListElement1 = new SoRelatedInstanceListElement();
+        SoRelatedInstanceListElement relatedInstanceListElement2 = new SoRelatedInstanceListElement();
+        relatedInstanceListElement1.setRelatedInstance(new SoRelatedInstance());
+        relatedInstanceListElement2.setRelatedInstance(new SoRelatedInstance());
+
+        // Service Item
+        relatedInstanceListElement1.getRelatedInstance()
+                .setInstanceId(vnfServiceItem.getServiceInstance().getServiceInstanceId());
+        relatedInstanceListElement1.getRelatedInstance().setModelInfo(new SoModelInfo());
+        relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelType("service");
+        relatedInstanceListElement1.getRelatedInstance().getModelInfo()
+                .setModelInvariantId(vnfServiceItem.getServiceInstance().getModelInvariantId());
+        for (AaiNqExtraProperty prop : vnfServiceItem.getExtraProperties().getExtraProperty()) {
+            if (prop.getPropertyName().equals(MODEL_NAME_PROPERTY_KEY)) {
+                relatedInstanceListElement1.getRelatedInstance().getModelInfo().setModelName(prop.getPropertyValue());
+            } else if (prop.getPropertyName().equals(MODEL_VERSION_PROPERTY_KEY)) {
+                relatedInstanceListElement1.getRelatedInstance().getModelInfo()
+                        .setModelVersion(prop.getPropertyValue());
+            } else if (prop.getPropertyName().equals(MODEL_VERSION_ID_PROPERTY_KEY)) {
+                relatedInstanceListElement1.getRelatedInstance().getModelInfo()
+                        .setModelVersionId(prop.getPropertyValue());
+            }
+        }
+
+        // VNF Item
+        relatedInstanceListElement2.getRelatedInstance().setInstanceId(vnfItem.getGenericVnf().getVnfId());
+        relatedInstanceListElement2.getRelatedInstance().setModelInfo(new SoModelInfo());
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelType("vnf");
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo()
+                .setModelInvariantId(vnfItem.getGenericVnf().getModelInvariantId());
+        for (AaiNqExtraProperty prop : vnfItem.getExtraProperties().getExtraProperty()) {
+            if (prop.getPropertyName().equals(MODEL_NAME_PROPERTY_KEY)) {
+                relatedInstanceListElement2.getRelatedInstance().getModelInfo().setModelName(prop.getPropertyValue());
+            } else if (prop.getPropertyName().equals(MODEL_VERSION_PROPERTY_KEY)) {
+                relatedInstanceListElement2.getRelatedInstance().getModelInfo()
+                        .setModelVersion(prop.getPropertyValue());
+            } else if (prop.getPropertyName().equals(MODEL_VERSION_ID_PROPERTY_KEY)) {
+                relatedInstanceListElement2.getRelatedInstance().getModelInfo()
+                        .setModelVersionId(prop.getPropertyValue());
+            }
+        }
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo()
+                .setModelCustomizationName(vnfItem.getGenericVnf().getVnfType()
+                        .substring(vnfItem.getGenericVnf().getVnfType().lastIndexOf('/') + 1));
+        relatedInstanceListElement2.getRelatedInstance().getModelInfo()
+                .setModelCustomizationId(vnfItem.getGenericVnf().getModelCustomizationId());
+
+        // Insert the Service Item and VNF Item
+        request.getRequestDetails().getRelatedInstanceList().add(relatedInstanceListElement1);
+        request.getRequestDetails().getRelatedInstanceList().add(relatedInstanceListElement2);
+
+        // Request Parameters
+        buildRequestParameters(policy, request.getRequestDetails());
+
+        // Configuration Parameters
+        buildConfigurationParameters(policy, request.getRequestDetails());
+        // Save the instance IDs for the VNF and service to static fields
+        // vfModuleId is not required for the create vf-module
+        preserveInstanceIds(vnfItem.getGenericVnf().getVnfId(), vnfServiceItem.getServiceInstance()
+                .getServiceInstanceId(), null);
+        if (logger.isDebugEnabled()) {
+            logger.debug("Constructed SO request: {}", Serialization.gsonPretty.toJson(request));
+        }
+        return request;
+    }
+
+    /**
+     * Construct SO request to delete vf-module.
+     *
+     * @param tenantItem         tenant item from A&AI named-query response
+     * @param vnfItem            vnf item from A&AI named-query response
+     * @param vnfServiceItem     vnf service item from A&AI named-query response
+     * @param vfModuleItem       vf module item from A&AI named-query response
+     * @return SO delete vf-module request
+     */
+    private SoRequest constructDeleteRequest(AaiNqInventoryResponseItem tenantItem, AaiNqInventoryResponseItem
+            vnfItem, AaiNqInventoryResponseItem vnfServiceItem, AaiNqInventoryResponseItem vfModuleItem) {
+        SoRequest request = new SoRequest();
+        request.setOperationType(SoOperationType.DELETE_VF_MODULE);
+        request.setRequestDetails(new SoRequestDetails());
+        request.getRequestDetails().setRelatedInstanceList(null);
+        request.getRequestDetails().setConfigurationParameters(null);
+
+        // cloudConfiguration
+        request.getRequestDetails().setCloudConfiguration(constructCloudConfiguration(tenantItem));
+        // modelInfo
+        request.getRequestDetails().setModelInfo(constructVfModuleModelInfo(vfModuleItem));
+        // requestInfo
+        request.getRequestDetails().setRequestInfo(constructRequestInfo());
+        // Save the instance IDs for the VNF, service and vfModule to static fields
+        preserveInstanceIds(vnfItem.getGenericVnf().getVnfId(), vnfServiceItem.getServiceInstance()
+                .getServiceInstanceId(), vfModuleItem.getVfModule().getVfModuleId());
+
+        if (logger.isDebugEnabled()) {
+            logger.debug("Constructed SO request: {}", Serialization.gsonPretty.toJson(request));
+        }
+        return request;
+    }
+
+    /**
+     * Construct requestInfo for the SO requestDetails.
+     *
+     * @return SO request information
+     */
+    private SoRequestInfo constructRequestInfo() {
+        SoRequestInfo soRequestInfo = new SoRequestInfo();
+        soRequestInfo.setSource("POLICY");
+        soRequestInfo.setSuppressRollback(false);
+        soRequestInfo.setRequestorId("policy");
+        return soRequestInfo;
+    }
+
+    /**
+     * Construct modelInfo of the vfModule for the SO requestDetails.
+     *
+     * @param vfModuleItem vf module item from A&AI named-query response
+     * @return SO Model info for the vfModule
+     */
+    private SoModelInfo constructVfModuleModelInfo(AaiNqInventoryResponseItem vfModuleItem) {
+        SoModelInfo soModelInfo = new SoModelInfo();
+        soModelInfo.setModelType("vfModule");
+        soModelInfo.setModelInvariantId(vfModuleItem.getVfModule().getModelInvariantId());
+        soModelInfo.setModelCustomizationId(vfModuleItem.getVfModule().getModelCustomizationId());
+
+        for (AaiNqExtraProperty prop : vfModuleItem.getExtraProperties().getExtraProperty()) {
+            if (prop.getPropertyName().equals(MODEL_NAME_PROPERTY_KEY)) {
+                soModelInfo.setModelName(prop.getPropertyValue());
+            } else if (prop.getPropertyName().equals(MODEL_VERSION_PROPERTY_KEY)) {
+                soModelInfo.setModelVersion(prop.getPropertyValue());
+            }
+        }
+        return soModelInfo;
+    }
+
+    /**
+     * Construct cloudConfiguration for the SO requestDetails.
+     *
+     * @param tenantItem tenant item from A&AI named-query response
+     * @return SO cloud configuration
+     */
+    private SoCloudConfiguration constructCloudConfiguration(AaiNqInventoryResponseItem tenantItem) {
+        SoCloudConfiguration cloudConfiguration = new SoCloudConfiguration();
+        cloudConfiguration.setTenantId(tenantItem.getTenant().getTenantId());
+        cloudConfiguration.setLcpCloudRegionId(tenantItem.getItems().getInventoryResponseItems().get(0)
+                .getCloudRegion().getCloudRegionId());
+        return cloudConfiguration;
+    }
+
+    /**
+     * This method is needed to get the serviceInstanceId and vnfInstanceId which is used
+     * in the asyncSORestCall.
+     *
+     * @param requestId the request Id
+     * @param wm the working memory
+     * @param request the request
+     */
+    public static void sendRequest(String requestId, WorkingMemory wm, Object request) {
+        SoManager soManager = new SoManager();
+        soManager.asyncSoRestCall(requestId, wm, lastServiceItemServiceInstanceId, lastVNFItemVnfId,
+                lastVfModuleItemVfModuleInstanceId, (SoRequest) request);
+    }
+
+    /**
+     * Find the base or non base VF module item in an AAI response.
+     * If there is more than one item, then the <i>last</i> item is returned
+     *
+     * @param aaiResponseWrapper the AAI response containing the VF modules
+     * @param baseFlag true if we are searching for the base, false if we are searching
+     *        for the non base
+     * @return the base or non base VF module item or null if the module was not found
+     */
+    private AaiNqInventoryResponseItem findVfModule(AaiNqResponseWrapper aaiResponseWrapper, boolean baseFlag) {
+        List<AaiNqInventoryResponseItem> lst = aaiResponseWrapper.getVfModuleItems(baseFlag);
+        return (lst.isEmpty() ? null : lst.get(lst.size() - 1));
+    }
+
+    /**
+     * Builds the request parameters from the policy payload.
+     *
+     * @param policy the policy
+     * @param request request into which to stick the request parameters
+     */
+    private void buildRequestParameters(Policy policy, SoRequestDetails request) {
+        // assume null until proven otherwise
+        request.setRequestParameters(null);
+        
+        if (policy.getPayload() == null) {
+            return;
+        }
+
+        String json = policy.getPayload().get(REQ_PARAM_NM);
+        if (json == null) {
+            return;
+        }
+
+        request.setRequestParameters(Serialization.gsonPretty.fromJson(json, SoRequestParameters.class));
+    }
+
+    /**
+     * Builds the configuration parameters from the policy payload.
+     *
+     * @param policy the policy
+     * @param request request into which to stick the configuration parameters
+     */
+    private void buildConfigurationParameters(Policy policy, SoRequestDetails request) {
+        // assume null until proven otherwise
+        request.setConfigurationParameters(null);
+        
+        if (policy.getPayload() == null) {
+            return;
+        }
+
+        String json = policy.getPayload().get(CONFIG_PARAM_NM);
+        if (json == null) {
+            return;
+        }
+
+        request.setConfigurationParameters(Serialization.gsonPretty.fromJson(json, CONFIG_TYPE));
+    }
+
+    /**
+     * This method is called to remember the last service instance ID, VNF Item VNF ID and vf module ID.
+     * Note these fields are static, beware for multithreaded deployments
+     *
+     * @param vnfInstanceId update the last VNF instance ID to this value
+     * @param serviceInstanceId update the last service instance ID to this value
+     * @param vfModuleId update the vfModule instance ID to this value
+     */
+    private static void preserveInstanceIds(final String vnfInstanceId, final String serviceInstanceId,
+                                            final String vfModuleId) {
+        lastVNFItemVnfId = vnfInstanceId;
+        lastServiceItemServiceInstanceId = serviceInstanceId;
+        lastVfModuleItemVfModuleInstanceId = vfModuleId;
+    }
+}
diff --git a/models-interactions/model-actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/models-interactions/model-actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
new file mode 100644
index 0000000..a955eb7
--- /dev/null
+++ b/models-interactions/model-actors/actor.so/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
@@ -0,0 +1 @@
+org.onap.policy.controlloop.actor.so.SoActorServiceProvider
\ No newline at end of file
diff --git a/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorServiceProviderTest.java b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorServiceProviderTest.java
new file mode 100644
index 0000000..d0eab12
--- /dev/null
+++ b/models-interactions/model-actors/actor.so/src/test/java/org/onap/policy/controlloop/actor/so/SoActorServiceProviderTest.java
@@ -0,0 +1,231 @@
+/*
+ * ============LICENSE_START=======================================================
+ * TestSOActorServiceProvider
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Modifications Copyright (C) 2018-2019 AT&T. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.so;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.UUID;
+import org.apache.commons.io.IOUtils;
+import org.junit.Test;
+import org.onap.policy.aai.AaiNqResponse;
+import org.onap.policy.aai.AaiNqResponseWrapper;
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.so.SoOperationType;
+import org.onap.policy.so.SoRequest;
+import org.onap.policy.so.SoRequestParameters;
+import org.onap.policy.so.util.Serialization;
+
+public class SoActorServiceProviderTest {
+
+    private static final String VF_MODULE_CREATE = "VF Module Create";
+    private static final String VF_MODULE_DELETE = "VF Module Delete";
+
+    @Test
+    public void testConstructRequest() throws Exception {
+        VirtualControlLoopEvent onset = new VirtualControlLoopEvent();
+        final ControlLoopOperation operation = new ControlLoopOperation();
+        final AaiNqResponseWrapper aaiNqResp = loadAaiResponse(onset, "aai/AaiNqResponse-Full.json");
+
+        final UUID requestId = UUID.randomUUID();
+        onset.setRequestId(requestId);
+
+        Policy policy = new Policy();
+        policy.setActor("Dorothy");
+        policy.setRecipe("GoToOz");
+        
+        assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp));
+
+        policy.setActor("SO");
+        assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp));
+
+        policy.setRecipe(VF_MODULE_CREATE);
+
+        // empty policy payload
+        SoRequest request = new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp);
+        assertNotNull(request);
+
+        assertEquals("my_module_3", request.getRequestDetails().getRequestInfo().getInstanceName());
+        assertEquals("policy", request.getRequestDetails().getRequestInfo().getRequestorId());
+        assertEquals("RegionOne", request.getRequestDetails().getCloudConfiguration().getLcpCloudRegionId());
+
+        // non-empty policy payload
+        policy.setPayload(makePayload());
+        request = new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp);
+        assertNotNull(request);
+        assertEquals(true, request.getRequestDetails().getRequestParameters().isUsePreload());
+        assertEquals("avalue", request.getRequestDetails().getRequestParameters().getUserParams().get(0).get("akey"));
+        assertEquals(1, request.getRequestDetails().getConfigurationParameters().size());
+        assertEquals("cvalue", request.getRequestDetails().getConfigurationParameters().get(0).get("ckey"));
+        
+        // payload with config, but no request params
+        policy.setPayload(makePayload());
+        policy.getPayload().remove(SoActorServiceProvider.REQ_PARAM_NM);
+        request = new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp);
+        assertNotNull(request);
+        assertNull(request.getRequestDetails().getRequestParameters());
+        assertNotNull(request.getRequestDetails().getConfigurationParameters());
+        
+        // payload with request, but no config params
+        policy.setPayload(makePayload());
+        policy.getPayload().remove(SoActorServiceProvider.CONFIG_PARAM_NM);
+        request = new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp);
+        assertNotNull(request);
+        assertNotNull(request.getRequestDetails().getRequestParameters());
+        assertNull(request.getRequestDetails().getConfigurationParameters());
+
+        // null response
+        assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, null));
+
+        // response has no base VF module
+        assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy,
+                        loadAaiResponse(onset, "aai/AaiNqResponse-NoBase.json")));
+
+        // response has no non-base VF modules (other than the "dummy")
+        assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy,
+                        loadAaiResponse(onset, "aai/AaiNqResponse-NoNonBase.json")));
+
+        policy.setRecipe(VF_MODULE_DELETE);
+        SoRequest deleteRequest = new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp);
+        assertNotNull(deleteRequest);
+        assertEquals(SoOperationType.DELETE_VF_MODULE, deleteRequest.getOperationType());
+
+        /*
+         * NOTE: The remaining tests must be done in order
+         */
+
+        policy.setRecipe(VF_MODULE_CREATE);
+
+        // null tenant
+        aaiNqResp.getAaiNqResponse().getInventoryResponseItems().get(0).getItems().getInventoryResponseItems()
+                        .remove(1);
+        assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp));
+
+        // null service item
+        aaiNqResp.getAaiNqResponse().getInventoryResponseItems().get(0).getItems().getInventoryResponseItems().get(0)
+                        .setItems(null);
+        assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp));
+
+        // null response
+        aaiNqResp.setAaiNqResponse(null);
+        assertNull(new SoActorServiceProvider().constructRequest(onset, operation, policy, aaiNqResp));
+    }
+
+    @Test
+    public void testSendRequest() {
+        try {
+            SoActorServiceProvider.sendRequest(UUID.randomUUID().toString(), null, null);
+        } catch (Exception e) {
+            fail("Test should not throw an exception");
+        }
+    }
+
+    @Test
+    public void testMethods() {
+        SoActorServiceProvider sp = new SoActorServiceProvider();
+
+        assertEquals("SO", sp.actor());
+        assertEquals(2, sp.recipes().size());
+        assertEquals(VF_MODULE_CREATE, sp.recipes().get(0));
+        assertEquals(VF_MODULE_DELETE, sp.recipes().get(1));
+        assertEquals(0, sp.recipePayloads(VF_MODULE_CREATE).size());
+        assertEquals(0, sp.recipeTargets("unknown recipe").size());
+        assertEquals(1, sp.recipeTargets(VF_MODULE_CREATE).size());
+    }
+
+    /**
+     * Creates a policy payload containing request & configuration parameters.
+     *
+     * @return the payload
+     */
+    private Map<String, String> makePayload() {
+        Map<String, String> payload = new TreeMap<>();
+
+        payload.put(SoActorServiceProvider.REQ_PARAM_NM, makeReqParams());
+        payload.put(SoActorServiceProvider.CONFIG_PARAM_NM, makeConfigParams());
+
+        return payload;
+    }
+
+    /**
+     * Creates request parameters.
+     *
+     * @return request parameters, encoded as JSON
+     */
+    private String makeReqParams() {
+        SoRequestParameters params = new SoRequestParameters();
+
+        params.setUsePreload(true);
+
+        Map<String, String> map = new TreeMap<>();
+        map.put("akey", "avalue");
+
+        List<Map<String, String>> lst = new LinkedList<>();
+        lst.add(map);
+
+        params.setUserParams(lst);
+
+        return Serialization.gsonPretty.toJson(params);
+    }
+
+    /**
+     * Creates configuration parameters.
+     *
+     * @return configuration parameters, encoded as JSON
+     */
+    private String makeConfigParams() {
+        Map<String, String> map = new TreeMap<>();
+        map.put("ckey", "cvalue");
+
+        List<Map<String, String>> lst = new LinkedList<>();
+        lst.add(map);
+
+        return Serialization.gsonPretty.toJson(lst);
+    }
+
+    /**
+     * Reads an AAI vserver named-query response from a file.
+     *
+     * @param onset the ONSET event
+     * @param fileName name of the file containing the JSON response
+     * @return output from the AAI vserver named-query
+     * @throws IOException if the file cannot be read
+     */
+    private AaiNqResponseWrapper loadAaiResponse(VirtualControlLoopEvent onset, String fileName) throws IOException {
+        String resp = IOUtils.toString(getClass().getResource(fileName), StandardCharsets.UTF_8);
+        AaiNqResponse aaiNqResponse = Serialization.gsonPretty.fromJson(resp, AaiNqResponse.class);
+
+        return new AaiNqResponseWrapper(onset.getRequestId(), aaiNqResponse);
+    }
+}
diff --git a/models-interactions/model-actors/actor.so/src/test/resources/org/onap/policy/controlloop/actor/so/aai/AaiNqResponse-Full.json b/models-interactions/model-actors/actor.so/src/test/resources/org/onap/policy/controlloop/actor/so/aai/AaiNqResponse-Full.json
new file mode 100644
index 0000000..af40be9
--- /dev/null
+++ b/models-interactions/model-actors/actor.so/src/test/resources/org/onap/policy/controlloop/actor/so/aai/AaiNqResponse-Full.json
@@ -0,0 +1,267 @@
+{
+  "inventory-response-item": [
+    {
+      "vserver": {
+        "vserver-id": "6ed3642c-f7a1-4a7c-9290-3d51fe1531eb",
+        "vserver-name": "zdfw1lb01lb02",
+        "vserver-name2": "zdfw1lb01lb02",
+        "prov-status": "ACTIVE",
+        "vserver-selflink": "http://10.12.25.2:8774/v2.1/41d6d38489bd40b09ea8a6b6b852dcbd/servers/6ed3642c-f7a1-4a7c-9290-3d51fe1531eb",
+        "in-maint": false,
+        "is-closed-loop-disabled": false,
+        "resource-version": "1510606403522"
+      },
+      "extra-properties": {
+        "extra-property": []
+      },
+      "inventory-response-items": {
+        "inventory-response-item": [
+          {
+            "model-name": "vLoadBalancer",
+            "generic-vnf": {
+              "vnf-id": "db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+              "vnf-name": "Vfmodule_vLB1113",
+              "vnf-type": "vLoadBalancer-1106/vLoadBalancer 0",
+              "service-id": "66f157fc-4148-4880-95f5-e120677e98d1",
+              "prov-status": "PREPROV",
+              "in-maint": false,
+              "is-closed-loop-disabled": false,
+              "resource-version": "1510604011851",
+              "model-invariant-id": "cee050ed-92a5-494f-ab04-234307a846dc",
+              "model-version-id": "fd65becc-6b2c-4fe8-ace9-cc29db9a3da2"
+            },
+            "extra-properties": {
+              "extra-property": [
+                {
+                  "property-name": "model-ver.model-version-id",
+                  "property-value": "fd65becc-6b2c-4fe8-ace9-cc29db9a3da2"
+                },
+                {
+                  "property-name": "model-ver.model-name",
+                  "property-value": "vLoadBalancer"
+                },
+                {
+                  "property-name": "model.model-type",
+                  "property-value": "resource"
+                },
+                {
+                  "property-name": "model.model-invariant-id",
+                  "property-value": "cee050ed-92a5-494f-ab04-234307a846dc"
+                },
+                {
+                  "property-name": "model-ver.model-version",
+                  "property-value": "1.0"
+                }
+              ]
+            },
+            "inventory-response-items": {
+              "inventory-response-item": [
+                {
+                  "model-name": "vLoadBalancer-1106",
+                  "service-instance": {
+                    "service-instance-id": "3b12f31f-8f2d-4f5c-b875-61ff1194b941",
+                    "service-instance-name": "vLoadBalancer-1113",
+                    "resource-version": "1510603936425",
+                    "model-invariant-id": "1321d60d-f7ff-4300-96c2-6bf0b3268b7a",
+                    "model-version-id": "732d4692-4b97-46f9-a996-0b3339e88c50"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "732d4692-4b97-46f9-a996-0b3339e88c50"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "vLoadBalancer-1106"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "service"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "1321d60d-f7ff-4300-96c2-6bf0b3268b7a"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1.0"
+                      }
+                    ]
+                  }
+                },
+                {
+                  "model-name": "Vloadbalancer..base_vlb..module-0",
+                  "vf-module": {
+                    "vf-module-id": "e6b3e3eb-34e1-4c00-b8c1-2a4fbe479b12",
+                    "vf-module-name": "Vfmodule_vLB1113-1",
+                    "heat-stack-id": "Vfmodule_vLB1113-1/3dd6d900-772f-4fcc-a0cb-e250ab2bb4db",
+                    "orchestration-status": "active",
+                    "is-base-vf-module": true,
+                    "resource-version": "1510604612557",
+                    "model-invariant-id": "6d760188-9a24-451a-b05b-e08b86cb94f2",
+                    "model-version-id": "93facad9-55f2-4fe0-9574-814c2bc2d071"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "93facad9-55f2-4fe0-9574-814c2bc2d071"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "Vloadbalancer..base_vlb..module-0"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "resource"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "6d760188-9a24-451a-b05b-e08b86cb94f2"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1"
+                      }
+                    ]
+                  }
+                },
+                {
+                  "model-name": "Vloadbalancer..dnsscaling..module-1",
+                  "vf-module": {
+                    "vf-module-id": "dummy_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+                    "vf-module-name": "dummy_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+                    "is-base-vf-module": false,
+                    "resource-version": "1510610079687",
+                    "model-invariant-id": "356a1cff-71f2-4086-9980-a2927ce11c1c",
+                    "model-version-id": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "Vloadbalancer..dnsscaling..module-1"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "resource"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "356a1cff-71f2-4086-9980-a2927ce11c1c"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1"
+                      }
+                    ]
+                  }
+                },
+                {
+                  "model-name": "Vloadbalancer..dnsscaling..module-1",
+                  "vf-module": {
+                    "vf-module-id": "my_module_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+                    "vf-module-name": "my_module_1",
+                    "is-base-vf-module": false,
+                    "resource-version": "1510610079687",
+                    "model-invariant-id": "356a1cff-71f2-4086-9980-a2927ce11c1c",
+                    "model-version-id": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "Vloadbalancer..dnsscaling..module-1"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "resource"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "356a1cff-71f2-4086-9980-a2927ce11c1c"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1"
+                      }
+                    ]
+                  }
+                },
+                {
+                  "model-name": "Vloadbalancer..dnsscaling..module-1",
+                  "vf-module": {
+                    "vf-module-id": "my_module_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+                    "vf-module-name": "my_module_2",
+                    "is-base-vf-module": false,
+                    "resource-version": "1510610079687",
+                    "model-invariant-id": "356a1cff-71f2-4086-9980-a2927ce11c1c",
+                    "model-version-id": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "Vloadbalancer..dnsscaling..module-1"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "resource"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "356a1cff-71f2-4086-9980-a2927ce11c1c"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1"
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "tenant": {
+              "tenant-id": "41d6d38489bd40b09ea8a6b6b852dcbd",
+              "tenant-name": "Integration-SB-00",
+              "resource-version": "1509587770200"
+            },
+            "extra-properties": {
+              "extra-property": []
+            },
+            "inventory-response-items": {
+              "inventory-response-item": [
+                {
+                  "cloud-region": {
+                    "cloud-owner": "CloudOwner",
+                    "cloud-region-id": "RegionOne",
+                    "cloud-region-version": "v1",
+                    "resource-version": "1509587770092"
+                  },
+                  "extra-properties": {
+                    "extra-property": []
+                  }
+                }
+              ]
+            }
+          }
+        ]
+      }
+    }
+  ]
+}
diff --git a/models-interactions/model-actors/actor.so/src/test/resources/org/onap/policy/controlloop/actor/so/aai/AaiNqResponse-NoBase.json b/models-interactions/model-actors/actor.so/src/test/resources/org/onap/policy/controlloop/actor/so/aai/AaiNqResponse-NoBase.json
new file mode 100644
index 0000000..7101f60
--- /dev/null
+++ b/models-interactions/model-actors/actor.so/src/test/resources/org/onap/policy/controlloop/actor/so/aai/AaiNqResponse-NoBase.json
@@ -0,0 +1,230 @@
+{
+  "inventory-response-item": [
+    {
+      "vserver": {
+        "vserver-id": "6ed3642c-f7a1-4a7c-9290-3d51fe1531eb",
+        "vserver-name": "zdfw1lb01lb02",
+        "vserver-name2": "zdfw1lb01lb02",
+        "prov-status": "ACTIVE",
+        "vserver-selflink": "http://10.12.25.2:8774/v2.1/41d6d38489bd40b09ea8a6b6b852dcbd/servers/6ed3642c-f7a1-4a7c-9290-3d51fe1531eb",
+        "in-maint": false,
+        "is-closed-loop-disabled": false,
+        "resource-version": "1510606403522"
+      },
+      "extra-properties": {
+        "extra-property": []
+      },
+      "inventory-response-items": {
+        "inventory-response-item": [
+          {
+            "model-name": "vLoadBalancer",
+            "generic-vnf": {
+              "vnf-id": "db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+              "vnf-name": "Vfmodule_vLB1113",
+              "vnf-type": "vLoadBalancer-1106/vLoadBalancer 0",
+              "service-id": "66f157fc-4148-4880-95f5-e120677e98d1",
+              "prov-status": "PREPROV",
+              "in-maint": false,
+              "is-closed-loop-disabled": false,
+              "resource-version": "1510604011851",
+              "model-invariant-id": "cee050ed-92a5-494f-ab04-234307a846dc",
+              "model-version-id": "fd65becc-6b2c-4fe8-ace9-cc29db9a3da2"
+            },
+            "extra-properties": {
+              "extra-property": [
+                {
+                  "property-name": "model-ver.model-version-id",
+                  "property-value": "fd65becc-6b2c-4fe8-ace9-cc29db9a3da2"
+                },
+                {
+                  "property-name": "model-ver.model-name",
+                  "property-value": "vLoadBalancer"
+                },
+                {
+                  "property-name": "model.model-type",
+                  "property-value": "resource"
+                },
+                {
+                  "property-name": "model.model-invariant-id",
+                  "property-value": "cee050ed-92a5-494f-ab04-234307a846dc"
+                },
+                {
+                  "property-name": "model-ver.model-version",
+                  "property-value": "1.0"
+                }
+              ]
+            },
+            "inventory-response-items": {
+              "inventory-response-item": [
+                {
+                  "model-name": "vLoadBalancer-1106",
+                  "service-instance": {
+                    "service-instance-id": "3b12f31f-8f2d-4f5c-b875-61ff1194b941",
+                    "service-instance-name": "vLoadBalancer-1113",
+                    "resource-version": "1510603936425",
+                    "model-invariant-id": "1321d60d-f7ff-4300-96c2-6bf0b3268b7a",
+                    "model-version-id": "732d4692-4b97-46f9-a996-0b3339e88c50"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "732d4692-4b97-46f9-a996-0b3339e88c50"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "vLoadBalancer-1106"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "service"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "1321d60d-f7ff-4300-96c2-6bf0b3268b7a"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1.0"
+                      }
+                    ]
+                  }
+                },
+                {
+                  "model-name": "Vloadbalancer..dnsscaling..module-1",
+                  "vf-module": {
+                    "vf-module-id": "dummy_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+                    "vf-module-name": "dummy_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+                    "is-base-vf-module": false,
+                    "resource-version": "1510610079687",
+                    "model-invariant-id": "356a1cff-71f2-4086-9980-a2927ce11c1c",
+                    "model-version-id": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "Vloadbalancer..dnsscaling..module-1"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "resource"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "356a1cff-71f2-4086-9980-a2927ce11c1c"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1"
+                      }
+                    ]
+                  }
+                },
+                {
+                  "model-name": "Vloadbalancer..dnsscaling..module-1",
+                  "vf-module": {
+                    "vf-module-id": "my_module_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+                    "vf-module-name": "my_module_1",
+                    "is-base-vf-module": false,
+                    "resource-version": "1510610079687",
+                    "model-invariant-id": "356a1cff-71f2-4086-9980-a2927ce11c1c",
+                    "model-version-id": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "Vloadbalancer..dnsscaling..module-1"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "resource"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "356a1cff-71f2-4086-9980-a2927ce11c1c"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1"
+                      }
+                    ]
+                  }
+                },
+                {
+                  "model-name": "Vloadbalancer..dnsscaling..module-1",
+                  "vf-module": {
+                    "vf-module-id": "my_module_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+                    "vf-module-name": "my_module_2",
+                    "is-base-vf-module": false,
+                    "resource-version": "1510610079687",
+                    "model-invariant-id": "356a1cff-71f2-4086-9980-a2927ce11c1c",
+                    "model-version-id": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "Vloadbalancer..dnsscaling..module-1"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "resource"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "356a1cff-71f2-4086-9980-a2927ce11c1c"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1"
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "tenant": {
+              "tenant-id": "41d6d38489bd40b09ea8a6b6b852dcbd",
+              "tenant-name": "Integration-SB-00",
+              "resource-version": "1509587770200"
+            },
+            "extra-properties": {
+              "extra-property": []
+            },
+            "inventory-response-items": {
+              "inventory-response-item": [
+                {
+                  "cloud-region": {
+                    "cloud-owner": "CloudOwner",
+                    "cloud-region-id": "RegionOne",
+                    "cloud-region-version": "v1",
+                    "resource-version": "1509587770092"
+                  },
+                  "extra-properties": {
+                    "extra-property": []
+                  }
+                }
+              ]
+            }
+          }
+        ]
+      }
+    }
+  ]
+}
diff --git a/models-interactions/model-actors/actor.so/src/test/resources/org/onap/policy/controlloop/actor/so/aai/AaiNqResponse-NoNonBase.json b/models-interactions/model-actors/actor.so/src/test/resources/org/onap/policy/controlloop/actor/so/aai/AaiNqResponse-NoNonBase.json
new file mode 100644
index 0000000..a58100b
--- /dev/null
+++ b/models-interactions/model-actors/actor.so/src/test/resources/org/onap/policy/controlloop/actor/so/aai/AaiNqResponse-NoNonBase.json
@@ -0,0 +1,197 @@
+{
+  "inventory-response-item": [
+    {
+      "vserver": {
+        "vserver-id": "6ed3642c-f7a1-4a7c-9290-3d51fe1531eb",
+        "vserver-name": "zdfw1lb01lb02",
+        "vserver-name2": "zdfw1lb01lb02",
+        "prov-status": "ACTIVE",
+        "vserver-selflink": "http://10.12.25.2:8774/v2.1/41d6d38489bd40b09ea8a6b6b852dcbd/servers/6ed3642c-f7a1-4a7c-9290-3d51fe1531eb",
+        "in-maint": false,
+        "is-closed-loop-disabled": false,
+        "resource-version": "1510606403522"
+      },
+      "extra-properties": {
+        "extra-property": []
+      },
+      "inventory-response-items": {
+        "inventory-response-item": [
+          {
+            "model-name": "vLoadBalancer",
+            "generic-vnf": {
+              "vnf-id": "db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+              "vnf-name": "Vfmodule_vLB1113",
+              "vnf-type": "vLoadBalancer-1106/vLoadBalancer 0",
+              "service-id": "66f157fc-4148-4880-95f5-e120677e98d1",
+              "prov-status": "PREPROV",
+              "in-maint": false,
+              "is-closed-loop-disabled": false,
+              "resource-version": "1510604011851",
+              "model-invariant-id": "cee050ed-92a5-494f-ab04-234307a846dc",
+              "model-version-id": "fd65becc-6b2c-4fe8-ace9-cc29db9a3da2"
+            },
+            "extra-properties": {
+              "extra-property": [
+                {
+                  "property-name": "model-ver.model-version-id",
+                  "property-value": "fd65becc-6b2c-4fe8-ace9-cc29db9a3da2"
+                },
+                {
+                  "property-name": "model-ver.model-name",
+                  "property-value": "vLoadBalancer"
+                },
+                {
+                  "property-name": "model.model-type",
+                  "property-value": "resource"
+                },
+                {
+                  "property-name": "model.model-invariant-id",
+                  "property-value": "cee050ed-92a5-494f-ab04-234307a846dc"
+                },
+                {
+                  "property-name": "model-ver.model-version",
+                  "property-value": "1.0"
+                }
+              ]
+            },
+            "inventory-response-items": {
+              "inventory-response-item": [
+                {
+                  "model-name": "vLoadBalancer-1106",
+                  "service-instance": {
+                    "service-instance-id": "3b12f31f-8f2d-4f5c-b875-61ff1194b941",
+                    "service-instance-name": "vLoadBalancer-1113",
+                    "resource-version": "1510603936425",
+                    "model-invariant-id": "1321d60d-f7ff-4300-96c2-6bf0b3268b7a",
+                    "model-version-id": "732d4692-4b97-46f9-a996-0b3339e88c50"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "732d4692-4b97-46f9-a996-0b3339e88c50"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "vLoadBalancer-1106"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "service"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "1321d60d-f7ff-4300-96c2-6bf0b3268b7a"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1.0"
+                      }
+                    ]
+                  }
+                },
+                {
+                  "model-name": "Vloadbalancer..base_vlb..module-0",
+                  "vf-module": {
+                    "vf-module-id": "e6b3e3eb-34e1-4c00-b8c1-2a4fbe479b12",
+                    "vf-module-name": "Vfmodule_vLB1113-1",
+                    "heat-stack-id": "Vfmodule_vLB1113-1/3dd6d900-772f-4fcc-a0cb-e250ab2bb4db",
+                    "orchestration-status": "active",
+                    "is-base-vf-module": true,
+                    "resource-version": "1510604612557",
+                    "model-invariant-id": "6d760188-9a24-451a-b05b-e08b86cb94f2",
+                    "model-version-id": "93facad9-55f2-4fe0-9574-814c2bc2d071"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "93facad9-55f2-4fe0-9574-814c2bc2d071"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "Vloadbalancer..base_vlb..module-0"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "resource"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "6d760188-9a24-451a-b05b-e08b86cb94f2"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1"
+                      }
+                    ]
+                  }
+                },
+                {
+                  "model-name": "Vloadbalancer..dnsscaling..module-1",
+                  "vf-module": {
+                    "vf-module-id": "dummy_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+                    "vf-module-name": "dummy_db373a8d-f7be-4d02-8ac8-6ca4c305d144",
+                    "is-base-vf-module": false,
+                    "resource-version": "1510610079687",
+                    "model-invariant-id": "356a1cff-71f2-4086-9980-a2927ce11c1c",
+                    "model-version-id": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                  },
+                  "extra-properties": {
+                    "extra-property": [
+                      {
+                        "property-name": "model-ver.model-version-id",
+                        "property-value": "6b93d804-cfc8-4be3-92cc-9336d135859a"
+                      },
+                      {
+                        "property-name": "model-ver.model-name",
+                        "property-value": "Vloadbalancer..dnsscaling..module-1"
+                      },
+                      {
+                        "property-name": "model.model-type",
+                        "property-value": "resource"
+                      },
+                      {
+                        "property-name": "model.model-invariant-id",
+                        "property-value": "356a1cff-71f2-4086-9980-a2927ce11c1c"
+                      },
+                      {
+                        "property-name": "model-ver.model-version",
+                        "property-value": "1"
+                      }
+                    ]
+                  }
+                }
+              ]
+            }
+          },
+          {
+            "tenant": {
+              "tenant-id": "41d6d38489bd40b09ea8a6b6b852dcbd",
+              "tenant-name": "Integration-SB-00",
+              "resource-version": "1509587770200"
+            },
+            "extra-properties": {
+              "extra-property": []
+            },
+            "inventory-response-items": {
+              "inventory-response-item": [
+                {
+                  "cloud-region": {
+                    "cloud-owner": "CloudOwner",
+                    "cloud-region-id": "RegionOne",
+                    "cloud-region-version": "v1",
+                    "resource-version": "1509587770092"
+                  },
+                  "extra-properties": {
+                    "extra-property": []
+                  }
+                }
+              ]
+            }
+          }
+        ]
+      }
+    }
+  ]
+}
diff --git a/models-interactions/model-actors/actor.test/pom.xml b/models-interactions/model-actors/actor.test/pom.xml
new file mode 100644
index 0000000..acef889
--- /dev/null
+++ b/models-interactions/model-actors/actor.test/pom.xml
@@ -0,0 +1,83 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+   <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+    <artifactId>model-actors</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>actor.test</artifactId>
+
+  <build>
+    <plugins>
+      <plugin>
+	<groupId>org.apache.maven.plugins</groupId>
+	<artifactId>maven-surefire-plugin</artifactId>
+      </plugin>
+    </plugins>
+  </build>
+  <dependencies>
+    <dependency>
+     <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+      <artifactId>actorServiceProvider</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>aai</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+     <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+      <artifactId>actor.appc</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+     <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+      <artifactId>actor.so</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+     <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+      <artifactId>actor.appclcm</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+     <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+      <artifactId>actor.vfc</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-actors/actor.vfc/pom.xml b/models-interactions/model-actors/actor.vfc/pom.xml
new file mode 100644
index 0000000..5f0b8ea
--- /dev/null
+++ b/models-interactions/model-actors/actor.vfc/pom.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+   <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+    <artifactId>model-actors</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>actor.vfc</artifactId>
+
+  <dependencies>
+    <dependency>
+     <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+      <artifactId>actorServiceProvider</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>vfc</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>events</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.models.policy-models-interactions.model-impl</groupId>
+      <artifactId>aai</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.common</groupId>
+      <artifactId>policy-endpoints</artifactId>
+      <version>${policy.common.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-pdp</groupId>
+      <artifactId>policy-management</artifactId>
+      <version>${policy.drools-pdp.version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
+      <artifactId>simulators</artifactId>
+      <version>${policy.drools-applications.version}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProvider.java b/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProvider.java
new file mode 100644
index 0000000..52902cb
--- /dev/null
+++ b/models-interactions/model-actors/actor.vfc/src/main/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProvider.java
@@ -0,0 +1,152 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2017-2018 Intel Corp. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.vfc;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.UUID;
+
+import org.onap.policy.aai.AaiGetVnfResponse;
+import org.onap.policy.aai.AaiManager;
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.rest.RestManager;
+import org.onap.policy.vfc.VfcHealActionVmInfo;
+import org.onap.policy.vfc.VfcHealAdditionalParams;
+import org.onap.policy.vfc.VfcHealRequest;
+import org.onap.policy.vfc.VfcRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class VfcActorServiceProvider implements Actor {
+    private static final Logger logger = LoggerFactory.getLogger(VfcActorServiceProvider.class);
+
+    // Strings for VFC Actor
+    private static final String VFC_ACTOR = "VFC";
+
+    // Strings for targets
+    private static final String TARGET_VM = "VM";
+
+    // Strings for recipes
+    private static final String RECIPE_RESTART = "Restart";
+
+    private static final ImmutableList<String> recipes = ImmutableList.of(RECIPE_RESTART);
+    private static final ImmutableMap<String, List<String>> targets =
+            new ImmutableMap.Builder<String, List<String>>().put(RECIPE_RESTART, ImmutableList.of(TARGET_VM)).build();
+
+    @Override
+    public String actor() {
+        return VFC_ACTOR;
+    }
+
+    @Override
+    public List<String> recipes() {
+        return ImmutableList.copyOf(recipes);
+    }
+
+    @Override
+    public List<String> recipeTargets(String recipe) {
+        return ImmutableList.copyOf(targets.getOrDefault(recipe, Collections.emptyList()));
+    }
+
+    @Override
+    public List<String> recipePayloads(String recipe) {
+        return Collections.emptyList();
+    }
+
+    /**
+     * Construct a request.
+     *
+     * @param onset the onset event
+     * @param operation the control loop operation
+     * @param policy the policy
+     * @param vnfResponse the VNF response
+     * @return the constructed request
+     */
+    public static VfcRequest constructRequest(VirtualControlLoopEvent onset, ControlLoopOperation operation,
+            Policy policy, AaiGetVnfResponse vnfResponse) {
+
+        // Construct an VFC request
+        VfcRequest request = new VfcRequest();
+        String serviceInstance = onset.getAai().get("service-instance.service-instance-id");
+        if (serviceInstance == null || "".equals(serviceInstance)) {
+            AaiGetVnfResponse tempVnfResp = vnfResponse;
+            if (tempVnfResp == null) { // if the response is null, we haven't queried
+                // This does the AAI query since we haven't already
+                tempVnfResp = getAaiServiceInstance(onset);
+                if (tempVnfResp == null) {
+                    return null;
+                }
+            }
+            serviceInstance = tempVnfResp.getServiceId();
+        }
+        request.setNsInstanceId(serviceInstance);
+        request.setRequestId(onset.getRequestId());
+        request.setHealRequest(new VfcHealRequest());
+        request.getHealRequest().setVnfInstanceId(onset.getAai().get("generic-vnf.vnf-id"));
+        request.getHealRequest().setCause(operation.getMessage());
+        request.getHealRequest().setAdditionalParams(new VfcHealAdditionalParams());
+
+        if (policy.getRecipe().toLowerCase().equalsIgnoreCase(RECIPE_RESTART)) {
+            request.getHealRequest().getAdditionalParams().setAction("restartvm");
+            request.getHealRequest().getAdditionalParams().setActionInfo(new VfcHealActionVmInfo());
+            request.getHealRequest().getAdditionalParams().getActionInfo()
+                    .setVmid(onset.getAai().get("vserver.vserver-id"));
+            request.getHealRequest().getAdditionalParams().getActionInfo()
+                    .setVmname(onset.getAai().get("vserver.vserver-name"));
+        } else {
+            return null;
+        }
+        return request;
+    }
+
+    private static AaiGetVnfResponse getAaiServiceInstance(VirtualControlLoopEvent event) {
+        AaiGetVnfResponse response = null;
+        UUID requestId = event.getRequestId();
+        String vnfName = event.getAai().get("generic-vnf.vnf-name");
+        String vnfId = event.getAai().get("generic-vnf.vnf-id");
+        String aaiUrl = PolicyEngine.manager.getEnvironmentProperty("aai.url");
+        String aaiUsername = PolicyEngine.manager.getEnvironmentProperty("aai.username");
+        String aaiPassword = PolicyEngine.manager.getEnvironmentProperty("aai.password");
+        try {
+            if (vnfName != null) {
+                String url = aaiUrl + "/aai/v11/network/generic-vnfs/generic-vnf?vnf-name=";
+                response = new AaiManager(new RestManager()).getQueryByVnfName(url, aaiUsername, aaiPassword, requestId,
+                        vnfName);
+            } else if (vnfId != null) {
+                String url = aaiUrl + "/aai/v11/network/generic-vnfs/generic-vnf/";
+                response = new AaiManager(new RestManager()).getQueryByVnfId(url, aaiUsername, aaiPassword, requestId,
+                        vnfId);
+            } else {
+                logger.error("getAAIServiceInstance failed");
+            }
+        } catch (Exception e) {
+            logger.error("getAAIServiceInstance exception: ", e);
+        }
+        return response;
+    }
+}
diff --git a/models-interactions/model-actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor b/models-interactions/model-actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
new file mode 100644
index 0000000..e43c726
--- /dev/null
+++ b/models-interactions/model-actors/actor.vfc/src/main/resources/META-INF/services/org.onap.policy.controlloop.actorServiceProvider.spi.Actor
@@ -0,0 +1 @@
+org.onap.policy.controlloop.actor.vfc.VfcActorServiceProvider
diff --git a/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java
new file mode 100644
index 0000000..5d4447b
--- /dev/null
+++ b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java
@@ -0,0 +1,119 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - Policy Drools Applications
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2018-2019 AT&T Corp. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actor.vfc;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import java.util.Objects;
+import java.util.UUID;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.aai.AaiGetVnfResponse;
+import org.onap.policy.common.endpoints.http.server.HttpServletServer;
+import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.VirtualControlLoopEvent;
+import org.onap.policy.controlloop.policy.Policy;
+import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.simulators.Util;
+import org.onap.policy.vfc.VfcRequest;
+
+public class VfcActorServiceProviderTest {
+
+    /**
+     * Set up for test class.
+     */
+    @BeforeClass
+    public static void setUpSimulator() {
+        try {
+            Util.buildAaiSim();
+        } catch (Exception e) {
+            fail(e.getMessage());
+        }
+    }
+
+    @AfterClass
+    public static void tearDownSimulator() {
+        HttpServletServer.factory.destroy();
+    }
+
+    @Test
+    public void testConstructRequest() {
+        VirtualControlLoopEvent onset = new VirtualControlLoopEvent();
+        ControlLoopOperation operation = new ControlLoopOperation();
+
+        Policy policy = new Policy();
+        policy.setRecipe("GoToOz");
+
+        assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+
+        onset.getAai().put("generic-vnf.vnf-id", "dorothy.gale.1939");
+        assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+
+        PolicyEngine.manager.setEnvironmentProperty("aai.url", "http://localhost:6666");
+        PolicyEngine.manager.setEnvironmentProperty("aai.username", "AAI");
+        PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI");
+        assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+
+        UUID requestId = UUID.randomUUID();
+        onset.setRequestId(requestId);
+        assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+
+        onset.getAai().put("generic-vnf.vnf-name", "Dorothy");
+        PolicyEngine.manager.getEnvironment().remove("aai.password");
+        assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+
+        PolicyEngine.manager.setEnvironmentProperty("aai.password", "AAI");
+        assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+
+        onset.getAai().put("service-instance.service-instance-id", "");
+        assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null));
+
+        assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse()));
+
+        policy.setRecipe("Restart");
+        assertNotNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse()));
+
+        VfcRequest request =
+                VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse());
+
+        assertEquals(requestId, Objects.requireNonNull(request).getRequestId());
+        assertEquals("dorothy.gale.1939", request.getHealRequest().getVnfInstanceId());
+        assertEquals("restartvm", request.getHealRequest().getAdditionalParams().getAction());
+    }
+
+    @Test
+    public void testMethods() {
+        VfcActorServiceProvider sp = new VfcActorServiceProvider();
+
+        assertEquals("VFC", sp.actor());
+        assertEquals(1, sp.recipes().size());
+        assertEquals("Restart", sp.recipes().get(0));
+        assertEquals("VM", sp.recipeTargets("Restart").get(0));
+        assertEquals(0, sp.recipePayloads("Restart").size());
+    }
+}
diff --git a/models-interactions/model-actors/actorServiceProvider/pom.xml b/models-interactions/model-actors/actorServiceProvider/pom.xml
new file mode 100644
index 0000000..9318e8a
--- /dev/null
+++ b/models-interactions/model-actors/actorServiceProvider/pom.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+   <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+    <artifactId>model-actors</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>actorServiceProvider</artifactId>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/ActorService.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/ActorService.java
new file mode 100644
index 0000000..8099361
--- /dev/null
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/ActorService.java
@@ -0,0 +1,73 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ActorService
+ * ================================================================================
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actorserviceprovider;
+
+import com.google.common.collect.ImmutableList;
+
+import java.util.Iterator;
+import java.util.ServiceLoader;
+
+import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ActorService {
+
+    private static final Logger logger = LoggerFactory.getLogger(ActorService.class);
+    private static ActorService service;
+
+    // USed to load actors
+    private final ServiceLoader<Actor> loader;
+
+    private ActorService() {
+        loader = ServiceLoader.load(Actor.class);
+    }
+
+    /**
+     * Get the single instance.
+     *
+     * @return the instance
+     */
+    public static synchronized ActorService getInstance() {
+        if (service == null) {
+            service = new ActorService();
+        }
+        return service;
+    }
+
+    /**
+     * Get the actors.
+     *
+     * @return the actors
+     */
+    public ImmutableList<Actor> actors() {
+        Iterator<Actor> iter = loader.iterator();
+        logger.debug("returning actors");
+        while (iter.hasNext()) {
+            if (logger.isDebugEnabled()) {
+                logger.debug("Got {}", iter.next().actor());
+            }
+        }
+
+        return ImmutableList.copyOf(loader.iterator());
+    }
+}
diff --git a/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/spi/Actor.java b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/spi/Actor.java
new file mode 100644
index 0000000..88f3c16
--- /dev/null
+++ b/models-interactions/model-actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/spi/Actor.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Actor
+ * ================================================================================
+ * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actorserviceprovider.spi;
+
+import java.util.List;
+
+public interface Actor {
+
+    String actor();
+
+    List<String> recipes();
+
+    List<String> recipeTargets(String recipe);
+
+    List<String> recipePayloads(String recipe);
+
+}
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java
new file mode 100644
index 0000000..3354a22
--- /dev/null
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/ActorServiceProviderTest.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * TestActorServiceProvider
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actorserviceprovider;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
+
+public class ActorServiceProviderTest {
+
+    @Test
+    public void testActorServiceProvider() {
+        ActorService actorService = ActorService.getInstance();
+        assertNotNull(actorService);
+
+        assertEquals(1, actorService.actors().size());
+
+        actorService = ActorService.getInstance();
+        assertNotNull(actorService);
+
+        Actor dummyActor = ActorService.getInstance().actors().get(0);
+        assertNotNull(dummyActor);
+
+        assertEquals("DummyActor", dummyActor.actor());
+
+        assertEquals(2, dummyActor.recipes().size());
+        assertEquals("Dorothy", dummyActor.recipes().get(0));
+        assertEquals("Wizard", dummyActor.recipes().get(1));
+
+        assertEquals(2, dummyActor.recipeTargets("Dorothy").size());
+        assertEquals(2, dummyActor.recipePayloads("Dorothy").size());
+    }
+}
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java
new file mode 100644
index 0000000..e9cf238
--- /dev/null
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/DummyActor.java
@@ -0,0 +1,61 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * TestActorServiceProvider
+ * ================================================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
+ * ================================================================================
+ * 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.policy.controlloop.actorserviceprovider;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
+
+public class DummyActor implements Actor {
+    @Override
+    public String actor() {
+        return this.getClass().getSimpleName();
+    }
+
+    @Override
+    public List<String> recipes() {
+        List<String> recipeList = new ArrayList<>();
+        recipeList.add("Dorothy");
+        recipeList.add("Wizard");
+
+        return recipeList;
+    }
+
+    @Override
+    public List<String> recipeTargets(String recipe) {
+        List<String> recipeTargetList = new ArrayList<>();
+        recipeTargetList.add("Wicked Witch");
+        recipeTargetList.add("Wizard of Oz");
+
+        return recipeTargetList;
+    }
+
+    @Override
+    public List<String> recipePayloads(String recipe) {
+        List<String> recipePayloadList = new ArrayList<>();
+        recipePayloadList.add("Dorothy");
+        recipePayloadList.add("Toto");
+
+        return recipePayloadList;
+    }
+}
diff --git a/models-interactions/model-actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor b/models-interactions/model-actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
new file mode 100644
index 0000000..2a4bb57
--- /dev/null
+++ b/models-interactions/model-actors/actorServiceProvider/src/test/resources/META-INF/services/org.onap.policy.controlloop.actorserviceprovider.spi.Actor
@@ -0,0 +1 @@
+org.onap.policy.controlloop.actorserviceprovider.DummyActor
\ No newline at end of file
diff --git a/models-interactions/model-actors/pom.xml b/models-interactions/model-actors/pom.xml
new file mode 100644
index 0000000..1144d8d
--- /dev/null
+++ b/models-interactions/model-actors/pom.xml
@@ -0,0 +1,54 @@
+<!--
+  ============LICENSE_START=======================================================
+  Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+  Modifications Copyright (C) 2019 Nordix Foundation.
+  ================================================================================
+  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=========================================================
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <packaging>pom</packaging>
+  
+  <parent>
+    <groupId>org.onap.policy.models</groupId>
+    <artifactId>policy-models-interactions</artifactId>
+    <version>2.0.0-SNAPSHOT</version>
+  </parent>
+  
+  <groupId>org.onap.policy.models.policy-models-interactions.model-actors</groupId>
+  <artifactId>model-actors</artifactId>
+
+  <modules>
+    <module>actorServiceProvider</module>
+    <module>actor.appc</module>
+    <module>actor.vfc</module>
+    <module>actor.sdnc</module>
+    <module>actor.appclcm</module>
+    <module>actor.sdnr</module>
+    <module>actor.so</module>
+    <module>actor.test</module>
+  </modules>
+  <dependencies>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.onap.policy.drools-applications.controlloop.common</groupId>
+      <artifactId>policy-yaml</artifactId>
+      <version>${policy.drools-applications.version}</version>
+    </dependency>
+  </dependencies>
+</project>
