summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.appclcm/src/main
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2020-04-01 11:03:31 -0400
committerJim Hahn <jrh3@att.com>2020-04-01 12:04:48 -0400
commit88fedd4d3edbb581eabe20074a65c32b635fc3b2 (patch)
treeb932b653aa2d89557f08570d51fc5204459dae93 /models-interactions/model-actors/actor.appclcm/src/main
parent3a99e95994963c8fd04d7c038cf6b0263b2bbdeb (diff)
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 <jrh3@att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.appclcm/src/main')
-rw-r--r--models-interactions/model-actors/actor.appclcm/src/main/java/org/onap/policy/controlloop/actor/appclcm/AppcLcmOperation.java10
1 files changed, 4 insertions, 6 deletions
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<AppcLcmDmaapWr
}
@Override
- protected Pair<String, AppcLcmDmaapWrapper> 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<AppcLcmDmaapWr
body.setInput(inputRequest);
dmaapRequest.setBody(body);
- return Pair.of(subRequestId, dmaapRequest);
+ return dmaapRequest;
}
/**
@@ -150,7 +148,7 @@ public class AppcLcmOperation extends BidirectionalTopicOperation<AppcLcmDmaapWr
*/
@Override
protected List<String> getExpectedKeyValues(int attempt, AppcLcmDmaapWrapper request) {
- return List.of(request.getBody().getInput().getCommonHeader().getSubRequestId());
+ return List.of(getSubRequestId());
}
@Override