summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCommonBPMN/src/main/groovy
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-11-06 15:15:35 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-06 15:15:35 +0000
commit2c9a77e893d414b8af81668dc9945691f4466528 (patch)
treefb1acd7bdfb2bdf34962c3f4b5d43e95d0239908 /bpmn/MSOCommonBPMN/src/main/groovy
parent89f384164a2712f7515497fe16b55e585266c79b (diff)
parentfb6ab40a64e74876ba1f08c4d3bdb6a040c21b94 (diff)
Merge "Bug fixes November 5th" into casablanca
Diffstat (limited to 'bpmn/MSOCommonBPMN/src/main/groovy')
-rw-r--r--bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy22
1 files changed, 21 insertions, 1 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy
index e4bc5f8fa2..c337a21987 100644
--- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy
+++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/AllottedResourceUtils.groovy
@@ -137,7 +137,7 @@ class AllottedResourceUtils {
try {
AAIResourcesClient client = new AAIResourcesClient()
AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE, allottedResourceId)
- AaiUtil aaiUtil = new AaiUtil()
+ AaiUtil aaiUtil = new AaiUtil(taskProcessor)
arLink = aaiUtil.createAaiUri(uri)
} catch (NotFoundException e) {
msoLogger.debug("GET AR received a Not Found (404) Response")
@@ -323,5 +323,25 @@ class AllottedResourceUtils {
msoLogger.trace("Exit BuildAAIErrorResponse Process")
throw new BpmnError("MSOWorkflowException")
}
+
+ public String createARUrl(DelegateExecution execution, AAIResourceUri uri, String allottedResourceId) {
+ AaiUtil aaiUriUtil = new AaiUtil(taskProcessor)
+ AAIResourceUri siResourceLink= uri
+
+ String siUri = ""
+
+ if(siResourceLink != null) {
+ msoLogger.debug("Incoming PSI Resource Link is: " + siResourceLink.build().toString())
+ }
+ else
+ {
+ String msg = "Parent Service Link in AAI is null"
+ msoLogger.debug(msg)
+ exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg)
+ }
+ AAIResourceUri arUri = AAIUriFactory.createResourceFromParentURI(siResourceLink, AAIObjectType.ALLOTTED_RESOURCE, allottedResourceId)
+
+ return aaiUriUtil.createAaiUri(arUri)
+ }
}