import org.openecomp.mso.bpmn.core.WorkflowException \r
import org.openecomp.mso.bpmn.core.json.JsonUtils \r
import org.openecomp.mso.rest.APIResponse\r
-\r
import java.util.UUID;\r
\r
import org.camunda.bpm.engine.delegate.BpmnError \r
* generate the nsParameters\r
*/\r
public void preProcessRequest (DelegateExecution execution) {\r
+ JsonUtils jsonUtil = new JsonUtils()\r
+\r
def isDebugEnabled=execution.getVariable("isDebugLogEnabled")\r
String msg = ""\r
utils.log("INFO", " *** preProcessRequest() *** ", isDebugEnabled)\r
try {\r
//deal with nsName and Description\r
- String nsServiceName = execution.getVariable("nsServiceName")\r
+ String resourceInput = execution.getVariable("resourceInput")\r
+\r
+ // get service name\r
+ String resourceName = jsonUtil.getJsonValue(resourceInput, "resourceInstanceName")\r
+ String nsServiceName = resourceName.substring(resourceName.indexOf("_") + 1)\r
+ execution.setVariable("nsServiceName", nsServiceName)\r
+\r
String nsServiceDescription = execution.getVariable("nsServiceDescription")\r
utils.log("INFO", "nsServiceName:" + nsServiceName + " nsServiceDescription:" + nsServiceDescription, isDebugEnabled)\r
//deal with operation key\r
- String globalSubscriberId = execution.getVariable("globalSubscriberId")\r
+ String globalSubscriberId = jsonUtil.getJsonValue(resourceInput, "globalSubscriberId")\r
utils.log("INFO", "globalSubscriberId:" + globalSubscriberId, isDebugEnabled)\r
+\r
String serviceType = execution.getVariable("serviceType")\r
utils.log("INFO", "serviceType:" + serviceType, isDebugEnabled)\r
- String serviceId = execution.getVariable("serviceId")\r
+\r
+ String serviceId = execution.getVariable("serviceInstanceId")\r
utils.log("INFO", "serviceId:" + serviceId, isDebugEnabled)\r
- String operationId = execution.getVariable("operationId")\r
+\r
+ String operationId = execution.getVariable("mso-request-id")\r
utils.log("INFO", "serviceType:" + serviceType, isDebugEnabled)\r
- String nodeTemplateUUID = execution.getVariable("resourceUUID")\r
+\r
+ String nodeTemplateUUID = jsonUtil.getJsonValue(resourceInput, "resourceModelInfo.modelUuid")\r
utils.log("INFO", "nodeTemplateUUID:" + nodeTemplateUUID, isDebugEnabled)\r
/*\r
* segmentInformation needed as a object of segment\r
<camunda:in source="nsServiceDescription" target="nsServiceDescription" />
<camunda:in source="globalSubscriberId" target="globalSubscriberId" />
<camunda:in source="serviceType" target="serviceType" />
- <camunda:in source="serviceId" target="serviceId" />
+ <camunda:in source="serviceInstanceId" target="serviceInstanceId" />
<camunda:in source="operationId" target="operationId" />
<camunda:in source="resourceType" target="resourceType" />
<camunda:in source="resourceUUID" target="resourceUUID" />
<camunda:in source="serviceInstanceName" target="serviceInstanceName" />
<camunda:in source="serviceDecomposition" target="serviceDecomposition" />
<camunda:in source="uuiRequest" target="uuiRequest" />
+ <camunda:in source="msoRequestId" target="msoRequestId" />
</bpmn2:extensionElements>
<bpmn2:incoming>SequenceFlow_0bf6bzp</bpmn2:incoming>
<bpmn2:outgoing>SequenceFlow_0d0c20n</bpmn2:outgoing>