Remove event context from Operation post processor
[policy/models.git] / models-interactions / model-actors / actor.aai / src / main / java / org / onap / policy / controlloop / actor / aai / AaiGetOperation.java
index c18d06c..c91e2a0 100644 (file)
@@ -112,9 +112,10 @@ public class AaiGetOperation extends HttpOperation<StandardCoderObject> {
                     Response rawResponse, StandardCoderObject response) {
         String entity = params.getTargetEntity();
 
-        logger.info("{}: caching response of {} for {}", getFullName(), entity, params.getRequestId());
-
-        params.getContext().setProperty(propertyPrefix + entity, response);
+        if (params.getContext() != null) {
+            logger.info("{}: caching response of {} for {}", getFullName(), entity, params.getRequestId());
+            params.getContext().setProperty(propertyPrefix + entity, response);
+        }
 
         return super.postProcessResponse(outcome, url, rawResponse, response);
     }