Processing Priority for Nested Services 65/128765/1
authorsreeja gattagouni <sg00744975@techmahindra.com>
Thu, 21 Apr 2022 09:54:22 +0000 (15:24 +0530)
committersreeja gattagouni <sg00744975@techmahindra.com>
Thu, 21 Apr 2022 09:54:45 +0000 (15:24 +0530)
- Processing Priority For Nested Services.
- Prioritising services by mentioning priority number while triggering
  requests will allow the Services to be instantiated as per the
  priority in a Nested-Services having Parent-Child Services Relationships.

Issue-ID: SO-3855
Change-Id: I66d83f324c122d842f52f0b808dab5640b8c9abf
Signed-off-by: sreeja gattagouni <sg00744975@techmahindra.com>
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/workflow/tasks/ebb/loader/UserParamsServiceTraversal.java
common/src/main/java/org/onap/so/serviceinstancebeans/Service.java

index 074aa9e..b8b9c45 100644 (file)
@@ -115,6 +115,7 @@ public class UserParamsServiceTraversal {
         for (Service childService : validate.getResources().getServices()) {
             Resource childServiceResource = new Resource(WorkflowType.SERVICE,
                     childService.getModelInfo().getModelVersionId(), false, serviceResource);
+            childServiceResource.setProcessingPriority(childService.getProcessingPriority());
             childServiceResource.setInstanceName(childService.getInstanceName());
             resourceList.add(childServiceResource);
         }
index c368f67..14b1ab5 100644 (file)
@@ -45,6 +45,9 @@ public class Service implements Serializable {
     private List<Map<String, String>> instanceParams = new ArrayList<>();
     @JsonProperty("resources")
     protected Resources resources;
+    @JsonProperty("processingPriority")
+    protected Integer processingPriority = 0;
+
 
     public ModelInfo getModelInfo() {
         return modelInfo;
@@ -86,9 +89,19 @@ public class Service implements Serializable {
         this.resources = resources;
     }
 
+    public Integer getProcessingPriority() {
+        return processingPriority;
+    }
+
+    public void setProcessingPriority(Integer processingPriority) {
+        this.processingPriority = processingPriority;
+    }
+
+
     @Override
     public String toString() {
         return "Service [modelInfo=" + modelInfo + ", cloudConfiguration=" + cloudConfiguration + ", instanceName="
-                + instanceName + ", instanceParams=" + instanceParams + ", resources=" + resources + "]";
+                + instanceName + ", instanceParams=" + instanceParams + ", resources=" + resources
+                + ", processingPriority=" + processingPriority + "]";
     }
 }