aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/main/java
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2020-02-04 19:24:45 +0100
committerLukasz Muszkieta <lukasz.muszkieta@nokia.com>2020-02-05 10:55:18 +0100
commitf0b7c139d0638b6f53c40be6a58b08831d558e97 (patch)
treeb6d4695a7b581df79a8266104aa12599052c3b87 /bpmn/so-bpmn-tasks/src/main/java
parent6706ff14fca4a1f66eb739e45654db5f42fd3c3f (diff)
WaitForPnfReadyBB - set orchestration status to Register and then Registered
Issue-ID: SO-2644 Signed-off-by: Lukasz Muszkieta <lukasz.muszkieta@nokia.com> Change-Id: I2796baf4afabd47536ffa0d4deb5096608fc5cce
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/main/java')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java23
1 files changed, 20 insertions, 3 deletions
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
index f1fbe545ce..dab35931f2 100644
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
+++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java
@@ -118,18 +118,35 @@ public class AAIUpdateTasks {
}
}
-
/**
* BPMN access method to update status of Pnf to Active in AAI
*
* @param execution
*/
public void updateOrchestrationStatusActivePnf(BuildingBlockExecution execution) {
+ updateOrchestrationStatusForPnf(execution, OrchestrationStatus.ACTIVE);
+ }
+
+ /**
+ * BPMN access method to update status of Pnf to Register in AAI
+ */
+ public void updateOrchestrationStatusRegisterPnf(BuildingBlockExecution execution) {
+ updateOrchestrationStatusForPnf(execution, OrchestrationStatus.REGISTER);
+ }
+
+ /**
+ * BPMN access method to update status of Pnf to Registered in AAI
+ */
+ public void updateOrchestrationStatusRegisteredPnf(BuildingBlockExecution execution) {
+ updateOrchestrationStatusForPnf(execution, OrchestrationStatus.REGISTERED);
+ }
+
+ private void updateOrchestrationStatusForPnf(BuildingBlockExecution execution, OrchestrationStatus status) {
try {
Pnf pnf = extractPojosForBB.extractByKey(execution, ResourceKey.PNF);
- aaiPnfResources.updateOrchestrationStatusPnf(pnf, OrchestrationStatus.ACTIVE);
+ aaiPnfResources.updateOrchestrationStatusPnf(pnf, status);
} catch (Exception ex) {
- logger.error("Exception occurred in AAIUpdateTasks updateOrchestrationStatusActivePnf", ex);
+ logger.error("Exception occurred in AAIUpdateTasks during update Orchestration Status to {}", status, ex);
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ex);
}
}