aboutsummaryrefslogtreecommitdiffstats
path: root/participant/participant-intermediary/src/main/java/org/onap
diff options
context:
space:
mode:
authorFrancescoFioraEst <francesco.fiora@est.tech>2024-08-12 11:07:22 +0100
committerFrancescoFioraEst <francesco.fiora@est.tech>2024-08-14 10:12:54 +0100
commit7c5744fecbc2067e800cd3bc90acac0e44318ada (patch)
tree04762cea36d9b8611f159368b0f7143f26ef1336 /participant/participant-intermediary/src/main/java/org/onap
parent036e873dea28748ded7a735b2aa3456865643af9 (diff)
Fix issue using stage in ACM intermediary
Issue-ID: POLICY-5091 Change-Id: I4d96e6472d61c3dfa3de5bfe5c94651b753a95f5 Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
Diffstat (limited to 'participant/participant-intermediary/src/main/java/org/onap')
-rw-r--r--participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java
index 7aa06badb..65ad627d1 100644
--- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java
+++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/CacheProvider.java
@@ -287,10 +287,16 @@ public class CacheProvider {
*/
public Map<UUID, CompositionElementDto> getCompositionElementDtoMap(AutomationComposition automationComposition,
UUID compositionId) {
+ var definitions = acElementsDefinitions.get(compositionId);
Map<UUID, CompositionElementDto> map = new HashMap<>();
for (var element : automationComposition.getElements().values()) {
- var compositionInProperties = getCommonProperties(compositionId, element.getDefinition());
- var compositionElement = createCompositionElementDto(compositionId, element, compositionInProperties);
+ var definition = definitions.get(element.getDefinition());
+ var compositionElement = (definition != null)
+ ? new CompositionElementDto(compositionId, element.getDefinition(),
+ definition.getAutomationCompositionElementToscaNodeTemplate().getProperties(),
+ definition.getOutProperties()) :
+ new CompositionElementDto(compositionId, element.getDefinition(),
+ Map.of(), Map.of(), ElementState.NOT_PRESENT);
map.put(element.getId(), compositionElement);
}
return map;