aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java
index a096522bc..9d7ca586c 100644
--- a/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java
+++ b/controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager2.java
@@ -41,6 +41,7 @@ import lombok.ToString;
import org.onap.policy.aai.AaiConstants;
import org.onap.policy.aai.AaiCqResponse;
import org.onap.policy.controlloop.ControlLoopOperation;
+import org.onap.policy.controlloop.ControlLoopResponse;
import org.onap.policy.controlloop.actorserviceprovider.OperationOutcome;
import org.onap.policy.controlloop.actorserviceprovider.controlloop.ControlLoopEventContext;
import org.onap.policy.controlloop.actorserviceprovider.parameters.ControlLoopOperationParams;
@@ -137,6 +138,9 @@ public class ControlLoopOperationManager2 implements Serializable {
private final transient ControlLoopOperationParams params;
private final transient PipelineUtil taskUtil;
+ @Getter
+ private ControlLoopResponse controlLoopResponse;
+
/**
* Time when the lock was first requested.
*/
@@ -195,6 +199,7 @@ public class ControlLoopOperationManager2 implements Serializable {
private int attempt;
private PolicyResult policyResult;
private ControlLoopOperation clOperation;
+ private ControlLoopResponse clResponse;
/**
* Constructs the object.
@@ -206,6 +211,7 @@ public class ControlLoopOperationManager2 implements Serializable {
policyResult = outcome.getResult();
clOperation = outcome.toControlLoopOperation();
clOperation.setTarget(policy.getTarget().toString());
+ clResponse = outcome.getControlLoopResponse();
}
}
@@ -437,6 +443,7 @@ public class ControlLoopOperationManager2 implements Serializable {
}
if (outcome.isFinalOutcome() && outcome.isFor(actor, operation)) {
+ controlLoopResponse = null;
return false;
}
@@ -458,6 +465,8 @@ public class ControlLoopOperationManager2 implements Serializable {
OperationOutcome outcome = outcomes.peek();
logger.debug("process outcome={} for {}", outcome, requestId);
+ controlLoopResponse = null;
+
switch (outcome.getActor()) {
case CL_TIMEOUT_ACTOR:
@@ -501,6 +510,7 @@ public class ControlLoopOperationManager2 implements Serializable {
*/
state = (outcome.getResult() == PolicyResult.SUCCESS ? State.OPERATION_SUCCESS
: State.OPERATION_FAILURE);
+ controlLoopResponse = outcome.getControlLoopResponse();
if (!operationHistory.isEmpty() && operationHistory.peekLast().getClOperation().getEnd() == null) {
operationHistory.removeLast();
}