From 6d566613d2ed18ac571f2a2dd7ac084c569c54b5 Mon Sep 17 00:00:00 2001 From: "saul.gill" Date: Fri, 27 Aug 2021 14:11:52 +0100 Subject: Fixed participant registration ACK Particiapnts now send status message after registration This adds participants to the DB in Runtime Issue-ID: POLICY-3588 Change-Id: Idb62b429a6e2e0047d6946d9718c78560a7cd659 Signed-off-by: saul.gill --- .../participant/intermediary/handler/ParticipantHandler.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java index 66e09e7f6..860df7fa3 100644 --- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java +++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/controlloop/participant/intermediary/handler/ParticipantHandler.java @@ -226,6 +226,14 @@ public class ParticipantHandler implements Closeable { public void handleParticipantRegisterAck(ParticipantRegisterAck participantRegisterAckMsg) { LOGGER.debug("ParticipantRegisterAck message received as responseTo {}", participantRegisterAckMsg.getResponseTo()); + if (ParticipantHealthStatus.UNKNOWN.equals(this.healthStatus)) { + this.healthStatus = ParticipantHealthStatus.HEALTHY; + } + + if (ParticipantState.UNKNOWN.equals(this.state)) { + this.state = ParticipantState.PASSIVE; + } + sender.sendParticipantStatus(makeHeartbeat(false)); } /** -- cgit 1.2.3-korg