summaryrefslogtreecommitdiffstats
path: root/controlloop/common/controller-usecases
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/controller-usecases')
-rw-r--r--controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java5
-rw-r--r--controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManagerTest.java10
2 files changed, 8 insertions, 7 deletions
diff --git a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java
index 0649f1882..d586240d9 100644
--- a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java
+++ b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManager.java
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP
* ================================================================================
- * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -550,7 +550,8 @@ public class UsecasesEventManager extends ControlLoopEventManager implements Ste
public void storeInDataBase(OperationOutcome2 outcome) {
String targetEntity = getProperty(OperationProperties.AAI_TARGET_ENTITY);
- getDataManager().store(requestIdStr, event, targetEntity, outcome.getClOperation());
+ getDataManager().store(requestIdStr, event.getClosedLoopControlName(), event, targetEntity,
+ outcome.getClOperation());
}
/**
diff --git a/controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManagerTest.java b/controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManagerTest.java
index 98758f4da..7160f372f 100644
--- a/controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManagerTest.java
+++ b/controlloop/common/controller-usecases/src/test/java/org/onap/policy/drools/apps/controller/usecases/UsecasesEventManagerTest.java
@@ -523,10 +523,9 @@ public class UsecasesEventManagerTest {
*/
@Test
public void testLoadPreprocessorStepsNeedTargetEntity() {
- stepa = new Step2(mgr,
- ControlLoopOperationParams.builder()
- .targetType(TargetType.toTargetType(event.getTargetType()))
- .targetEntityIds(Map.of()).build(), event) {
+ stepa = new Step2(mgr, ControlLoopOperationParams.builder()
+ .targetType(TargetType.toTargetType(event.getTargetType())).targetEntityIds(Map.of()).build(),
+ event) {
@Override
public List<String> getPropertyNames() {
return List.of(OperationProperties.AAI_TARGET_ENTITY);
@@ -758,7 +757,8 @@ public class UsecasesEventManagerTest {
mgr.storeInDataBase(mgr.getPartialHistory().peekLast());
- verify(dataMgr).store(REQ_ID.toString(), event, null, mgr.getPartialHistory().peekLast().getClOperation());
+ verify(dataMgr).store(REQ_ID.toString(), event.getClosedLoopControlName(), event, null,
+ mgr.getPartialHistory().peekLast().getClOperation());
}
@Test