summaryrefslogtreecommitdiffstats
path: root/controlloop/common/eventmanager/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/eventmanager/src/main')
-rw-r--r--controlloop/common/eventmanager/src/main/java/org/onap/policy/controlloop/eventmanager/ControlLoopOperationManager.java7
1 files changed, 5 insertions, 2 deletions
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 add981c65..e13352ac0 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
@@ -375,11 +375,12 @@ public class ControlLoopOperationManager implements Serializable {
} else if (response instanceof VFCResponse) {
VFCResponse vfcResponse = (VFCResponse) response;
+ Integer operationAttempt = this.attempts;
if (vfcResponse.responseDescriptor.getStatus().equalsIgnoreCase("finished")) {
//
// Consider it as success
//
- this.completeOperation(new Integer(1), " Success", PolicyResult.SUCCESS);
+ this.completeOperation(operationAttempt, " Success", PolicyResult.SUCCESS);
if (this.policyResult != null && this.policyResult.equals(PolicyResult.FAILURE_TIMEOUT)) {
return null;
}
@@ -388,10 +389,12 @@ public class ControlLoopOperationManager implements Serializable {
//
// Consider it as failure
//
- this.completeOperation(new Integer(1), " Failed", PolicyResult.FAILURE);
+ this.completeOperation(operationAttempt, " Failed", PolicyResult.FAILURE);
if (this.policyResult != null && this.policyResult.equals(PolicyResult.FAILURE_TIMEOUT)) {
return null;
}
+ // increment operation attempts for retries
+ this.attempts += 1;
return PolicyResult.FAILURE;
}
}