From 88fedd4d3edbb581eabe20074a65c32b635fc3b2 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 1 Apr 2020 11:03:31 -0400 Subject: Set sub request ID before start callback Modified new actor code to generate the sub request ID before invoking the start callback. Issue-ID: POLICY-2461 Change-Id: I4adabd6efda2c30c0e2da31f95f01dd5fe546c0a Signed-off-by: Jim Hahn --- .../policy/controlloop/actor/appclcm/AppcLcmOperation.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'models-interactions/model-actors/actor.appclcm/src/main') diff --git a/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java b/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java index 87ff357e9..e34d3c586 100644 --- a/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java +++ b/models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java @@ -22,10 +22,8 @@ package org.onap.policy.controlloop.actor.appclcm; import java.util.List; import java.util.Map; -import java.util.UUID; import java.util.concurrent.CompletableFuture; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.tuple.Pair; import org.onap.policy.appclcm.AppcLcmBody; import org.onap.policy.appclcm.AppcLcmCommonHeader; import org.onap.policy.appclcm.AppcLcmDmaapWrapper; @@ -81,9 +79,9 @@ public class AppcLcmOperation extends BidirectionalTopicOperation makeRequest(int attempt) { + protected AppcLcmDmaapWrapper makeRequest(int attempt) { VirtualControlLoopEvent onset = params.getContext().getEvent(); - String subRequestId = UUID.randomUUID().toString(); + String subRequestId = getSubRequestId(); AppcLcmCommonHeader header = new AppcLcmCommonHeader(); header.setOriginatorId(onset.getRequestId().toString()); @@ -126,7 +124,7 @@ public class AppcLcmOperation extends BidirectionalTopicOperation getExpectedKeyValues(int attempt, AppcLcmDmaapWrapper request) { - return List.of(request.getBody().getInput().getCommonHeader().getSubRequestId()); + return List.of(getSubRequestId()); } @Override -- cgit 1.2.3-korg