Merge remote-tracking branch 'origin/dublin' into 'origin/master' 97/89597/5
authorBenjamin, Max (mb388a) <mb388a@us.att.com>
Sat, 8 Jun 2019 00:28:02 +0000 (20:28 -0400)
committerBenjamin, Max (mb388a) <mb388a@us.att.com>
Sat, 8 Jun 2019 13:58:45 +0000 (09:58 -0400)
Change-Id: Ib8eaae7ee4a404bde568803afaf6c4e183cbbd53
Issue-ID: SO-2004
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
1  2 
asdc-controller/src/main/java/org/onap/so/asdc/activity/ActivitySpecsActions.java
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateCustomE2EServiceInstance.groovy
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/WorkflowAction.java

@@@ -68,9 -67,10 +68,11 @@@ public class ActivitySpecsActions 
              Response response = httpClient.post(payload);
  
              int statusCode = response.getStatus();
-             if (statusCode != HttpStatus.SC_OK) {
+             if (statusCode == HttpStatus.SC_UNPROCESSABLE_ENTITY) {
 -                logger.warn("{} {} {}", "ActivitySpec", activitySpec.getName(), "already exists in SDC");
++                logger.warn(Strings.repeat("{} ", 3), "ActivitySpec", activitySpec.getName(), "already exists in SDC");
+             } else if (statusCode != HttpStatus.SC_OK && statusCode != HttpStatus.SC_CREATED) {
 -                logger.warn("{} {} {}", "Error creating activity spec", activitySpec.getName(), statusCode);
 +                logger.warn(Strings.repeat("{} ", 3), "Error creating activity spec", activitySpec.getName(),
 +                        statusCode);
              } else {
                  if (response.getEntity() != null) {
                      ActivitySpecCreateResponse activitySpecCreateResponse =
  
              int statusCode = response.getStatus();
  
-             if (statusCode != HttpStatus.SC_OK) {
+             if (statusCode == HttpStatus.SC_UNPROCESSABLE_ENTITY) {
 -                logger.warn("{} {} {}", "ActivitySpec with id", activitySpecId, "is already certified in SDC");
++                logger.warn(Strings.repeat("{} ", 3), "ActivitySpec with id", activitySpecId,
++                        "is already certified in SDC");
+             } else if (statusCode != HttpStatus.SC_OK) {
 -                logger.warn("{} {} {}", "Error certifying activity", activitySpecId, statusCode);
 +                logger.warn(Strings.repeat("{} ", 3), "Error certifying activity", activitySpecId, statusCode);
              } else {
                  certificationResult = true;
              }