private static final String PNF = "Pnf";
private static final String VFMODULE = "VfModule";
private static final String NETWORK = "Network";
+ private static final String HEALTH_CHECK = "HealthCheckBB";
+ private static final String UPGRADE_CNF = "UpgradeVfModuleBB";
protected List<ExecuteBuildingBlock> buildExecuteBuildingBlockList(List<OrchestrationFlow> orchFlows,
List<Resource> originalResourceList, String requestId, String apiVersion, String resourceId,
String requestId, String apiVersion, String resourceId, String requestAction, String vnfType,
WorkflowResourceIds workflowResourceIds, RequestDetails requestDetails, boolean replaceVnf) {
List<ExecuteBuildingBlock> flowsToExecute = new ArrayList<>();
- if (orchFlow.getFlowName().contains(SERVICE) || (orchFlow.getFlowName().contains(CONTROLLER)
+ if (orchFlow.getFlowName().contains(CHILD_SERVICE)) {
+ if (WorkflowType.SERVICE.equals(resource.getResourceType()) && resource.hasParent()) {
+ addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.SERVICE, orchFlow, requestId,
+ apiVersion, resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false,
+ false);
+ }
+ } else if (orchFlow.getFlowName().contains(SERVICE) || (orchFlow.getFlowName().contains(CONTROLLER)
&& (SERVICE).equalsIgnoreCase(orchFlow.getBpmnScope()))) {
if (!replaceVnf) {
workflowResourceIds.setServiceInstanceId(resourceId);
}
- addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.SERVICE, orchFlow, requestId,
- apiVersion, resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false, false);
+ if (!resource.hasParent()) {
+ addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.SERVICE, orchFlow, requestId,
+ apiVersion, resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false,
+ false);
+ }
} else if (orchFlow.getFlowName().contains(VNF)
|| (orchFlow.getFlowName().contains(CONTROLLER) && (VNF).equalsIgnoreCase(orchFlow.getBpmnScope()))) {
addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.VNF, orchFlow, requestId, apiVersion,
resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false, false);
+ } else if ((orchFlow.getFlowName().equalsIgnoreCase(HEALTH_CHECK))
+ && (VNF).equalsIgnoreCase(orchFlow.getBpmnScope())) {
+ addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.VNF, orchFlow, requestId, apiVersion,
+ resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false, false);
+ } else if ((orchFlow.getFlowName().equalsIgnoreCase(UPGRADE_CNF))
+ && (VNF).equalsIgnoreCase(orchFlow.getBpmnScope())) {
+ addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.VNF, orchFlow, requestId, apiVersion,
+ resourceId, requestAction, vnfType, workflowResourceIds, requestDetails, false, false);
} else if (orchFlow.getFlowName().contains(PNF)
|| (orchFlow.getFlowName().contains(CONTROLLER) && (PNF).equalsIgnoreCase(orchFlow.getBpmnScope()))) {
addBuildingBlockToExecuteBBList(flowsToExecute, resource, WorkflowType.PNF, orchFlow, requestId, apiVersion,