Use Params makeOutcome() without targetEntity 83/115183/1
authorJim Hahn <jrh3@att.com>
Fri, 20 Nov 2020 16:47:02 +0000 (11:47 -0500)
committerJim Hahn <jrh3@att.com>
Fri, 20 Nov 2020 16:48:29 +0000 (11:48 -0500)
Planning to remove the second flavor of makeOutcome() from the Params,
so modifying the drools-apps code to work with the first flavor.

Issue-ID: POLICY-2804
Change-Id: Iddb288f7cf53e93919e77aca8afe3869fadb0d37
Signed-off-by: Jim Hahn <jrh3@att.com>
controlloop/common/controller-usecases/src/main/resources/usecases.drl
controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/Step.java

index 578bd9c..12c9849 100644 (file)
@@ -395,7 +395,7 @@ rule "EVENT.MANAGER.EXECUTE.STEP"
 
         if (guardDisabled && "GUARD".equals($step.getActorName())) {
             // guard is disabled - just enqueue a "SUCCESS" (i.e., "Permit")
-            OperationOutcome outcome = $step.getParams().makeOutcome(null);
+            OperationOutcome outcome = $step.getParams().makeOutcome();
             outcome.setStart(Instant.now());
             outcome.setEnd(outcome.getStart());
 
index d406e6e..15070bd 100644 (file)
@@ -270,7 +270,10 @@ public class Step {
      * @return a new operation outcome
      */
     public OperationOutcome makeOutcome() {
-        return params.makeOutcome(operation.getProperty(OperationProperties.AAI_TARGET_ENTITY));
+        OperationOutcome outcome = params.makeOutcome();
+        outcome.setTarget(operation.getProperty(OperationProperties.AAI_TARGET_ENTITY));
+
+        return outcome;
     }
 
     @Override