diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
index 1c46b99..a1b63e4 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java
@@ -165,7 +165,7 @@
         else {
             throw new ControlLoopException("The target is null");
         }
-        return null;
+        throw new ControlLoopException("Target does not match target type");
     }
 	
 	public ControlLoopOperationManager(ControlLoopEvent onset, Policy policy, ControlLoopEventManager em) throws ControlLoopException, AAIException {
@@ -289,9 +289,12 @@
 
 			return operationRequest;
 		case "VFC":
-                        this.operationRequest = VFCActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset, operation.operation, this.policy, this.eventManager.getVnfResponse());
-                        this.currentOperation = operation;
-                        return operationRequest;
+            this.operationRequest = VFCActorServiceProvider.constructRequest((VirtualControlLoopEvent) onset, operation.operation, this.policy, this.eventManager.getVnfResponse());
+            this.currentOperation = operation;
+            if (this.operationRequest == null) {
+                this.policyResult = PolicyResult.FAILURE;
+            }
+            return operationRequest;
 
 		}
 		return null;
diff --git a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
index 725e01e..93b4e0a 100644
--- a/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
+++ b/controlloop/templates/archetype-cl-amsterdam/src/main/resources/archetype-resources/src/main/resources/__closedLoopControlName__.drl
@@ -604,6 +604,11 @@
 			retract($operation);
 			modify($manager) {finishOperation($operation)};
 		}
+		else if ("vfc".equalsIgnoreCase($operation.policy.getActor())) {
+		    retract($opTimer);
+			retract($operation);
+			modify($manager) {finishOperation($operation)};
+		}
 
     }
 end
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFCControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFCControlLoopTest.java
index 2581e3d..39dac81 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFCControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFCControlLoopTest.java
@@ -166,6 +166,56 @@
          */
         dumpFacts(kieSession);
 	}
+	
+	@Test
+	public void nullRequestTest() throws IOException {
+        
+        /*
+         * Allows the PolicyEngine to callback to this object to
+         * notify that there is an event ready to be pulled 
+         * from the queue
+         */
+        for (TopicSink sink : noopTopics) {
+            assertTrue(sink.start());
+            sink.register(this);
+        }
+        
+        /*
+         * Create a unique requestId
+         */
+        requestID = UUID.randomUUID();
+        
+        /* 
+         * Simulate an onset event the policy engine will 
+         * receive from DCAE to kick off processing through
+         * the rules
+         */
+        
+        VirtualControlLoopEvent event = new VirtualControlLoopEvent();
+        event.closedLoopControlName = pair.a.getControlLoop().getControlLoopName();
+        event.requestID = UUID.randomUUID();
+        event.closedLoopEventClient = "tca.instance00009";
+        event.target_type = ControlLoopTargetType.VM;
+        event.target = "vserver.vserver-name";
+        event.from = "DCAE";
+        event.closedLoopAlarmStart = Instant.now();
+        event.AAI = new HashMap<String, String>();
+        event.AAI.put("vserver.vserver-name", "nullRequest");
+        event.closedLoopEventStatus = ControlLoopEventStatus.ONSET;
+        kieSession.insert(event);
+        
+        kieSession.fireUntilHalt();
+        
+        /*
+         * The only fact in memory should be Params
+         */
+        assertEquals(1, kieSession.getFactCount());
+        
+        /*
+         * Print what's left in memory
+         */
+        dumpFacts(kieSession);
+	}
 
 	/**
 	 * This method will start a kie session and instantiate
@@ -274,7 +324,12 @@
             }
             else if (policyName.endsWith("EVENT.MANAGER")) {
                 logger.debug("Rule Fired: " + notification.policyName);
-                assertTrue(ControlLoopNotificationType.FINAL_SUCCESS.equals(notification.notification));
+                if ("nullRequest".equals(notification.AAI.get("vserver.vserver-name"))){
+                	assertEquals(ControlLoopNotificationType.FINAL_FAILURE, notification.notification);
+                }
+                else {
+                     assertEquals(ControlLoopNotificationType.FINAL_SUCCESS, notification.notification);
+                }
                 kieSession.halt();
             }
             else if (policyName.endsWith("EVENT.MANAGER.TIMEOUT")) {
@@ -304,7 +359,7 @@
        event.requestID = UUID.randomUUID();
        event.closedLoopEventClient = "tca.instance00009";
        event.target_type = ControlLoopTargetType.VM;
-       event.target = "VM_NAME";
+       event.target = "vserver.vserver-name";
        event.from = "DCAE";
        event.closedLoopAlarmStart = Instant.now();
        event.AAI = new HashMap<String, String>();
