summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-common/src/main/groovy
diff options
context:
space:
mode:
authormarios.iakovidis <marios.iakovidis@huawei.com>2019-05-23 18:29:10 +0300
committermarios.iakovidis <marios.iakovidis@huawei.com>2019-05-27 11:17:47 +0300
commit0d9e1e9383e17e715fdabac7744c6b930eca1b20 (patch)
treef46e859a51320c3d72a56423430d4e92fcb87a67 /bpmn/so-bpmn-infrastructure-common/src/main/groovy
parent16c6cc1e5cdaad24b92114ebf6c5396453194778 (diff)
fixed typos and added SERVICE_INSTANCE_ID
Change-Id: I68174bf2e67280a4bf65d8f26b04793b76896f04 Issue-ID: SO-1913 Signed-off-by: MariosIakovidis <marios.iakovidis@huawei.com>
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-common/src/main/groovy')
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy12
1 files changed, 10 insertions, 2 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
index 261f107140..f06d71cec4 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/HandlePNF.groovy
@@ -38,18 +38,26 @@ public class HandlePNF extends AbstractServiceTaskProcessor{
@Override
void preProcessRequest(DelegateExecution execution) {
logger.debug("Start preProcess for HandlePNF")
-
// set correlation ID
def resourceInput = execution.getVariable("resourceInput")
String serInput = jsonUtil.getJsonValue(resourceInput, "requestsInputs")
String correlationId = jsonUtil.getJsonValue(serInput, "service.parameters.requestInputs.ont_ont_pnf_name")
if (!StringUtils.isEmpty(correlationId)) {
- execution.setVariable(ExecutionVariableNames.CORRELATION_ID, correlationId)
+ execution.setVariable(ExecutionVariableNames.PNF_CORRELATION_ID, correlationId)
logger.debug("Found correlation id : " + correlationId)
} else {
logger.error("== correlation id is empty ==")
exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "correlation id is not provided")
}
+
+ String serviceInstanceID = jsonUtil.getJsonValue(resourceInput, ExecutionVariableNames.SERVICE_INSTANCE_ID)
+ if (!StringUtils.isEmpty(serviceInstanceID)) {
+ execution.setVariable(ExecutionVariableNames.SERVICE_INSTANCE_ID, serviceInstanceID)
+ logger.debug("found serviceInstanceID: "+serviceInstanceID)
+ } else {
+ logger.error("== serviceInstance ID is empty ==")
+ exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "serviceInstance ID is not provided")
+ }
// next task will set the uuid
logger.debug("exit preProcess for HandlePNF")