2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * =============================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
19 * ECOMP is a trademark and service mark of AT&T Intellectual Property.
20 * ============LICENSE_END=========================================================
22 package org.onap.appc.flow.controller.node;
24 import com.att.eelf.configuration.EELFLogger;
25 import com.att.eelf.configuration.EELFManager;
26 import com.fasterxml.jackson.annotation.JsonInclude.Include;
27 import com.fasterxml.jackson.databind.DeserializationFeature;
28 import com.fasterxml.jackson.databind.JsonNode;
29 import com.fasterxml.jackson.databind.ObjectMapper;
30 import com.fasterxml.jackson.databind.SerializationFeature;
31 import java.io.FileInputStream;
32 import java.io.IOException;
33 import java.io.InputStream;
34 import java.util.ArrayList;
35 import java.util.Arrays;
36 import java.util.HashMap;
37 import java.util.List;
39 import java.util.Properties;
40 import org.apache.commons.lang3.StringUtils;
41 import org.json.JSONObject;
42 import org.onap.appc.flow.controller.ResponseHandlerImpl.DefaultResponseHandler;
43 import org.onap.appc.flow.controller.data.PrecheckOption;
44 import org.onap.appc.flow.controller.data.ResponseAction;
45 import org.onap.appc.flow.controller.data.Transaction;
46 import org.onap.appc.flow.controller.data.Transactions;
47 import org.onap.appc.flow.controller.dbervices.FlowControlDBService;
48 import org.onap.appc.flow.controller.executorImpl.GraphExecutor;
49 import org.onap.appc.flow.controller.executorImpl.NodeExecutor;
50 import org.onap.appc.flow.controller.executorImpl.RestExecutor;
51 import org.onap.appc.flow.controller.interfaceData.ActionIdentifier;
52 import org.onap.appc.flow.controller.interfaceData.Capabilities;
53 import org.onap.appc.flow.controller.interfaceData.DependencyInfo;
54 import org.onap.appc.flow.controller.interfaceData.Input;
55 import org.onap.appc.flow.controller.interfaceData.InventoryInfo;
56 import org.onap.appc.flow.controller.interfaceData.RequestInfo;
57 import org.onap.appc.flow.controller.interfaceData.Vm;
58 import org.onap.appc.flow.controller.interfaceData.VnfInfo;
59 import org.onap.appc.flow.controller.interfaceData.Vnfcs;
60 import org.onap.appc.flow.controller.interfaceData.Vnfcslist;
61 import org.onap.appc.flow.controller.interfaces.FlowExecutorInterface;
62 import org.onap.appc.flow.controller.utils.EncryptionTool;
63 import org.onap.appc.flow.controller.utils.FlowControllerConstants;
64 import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
65 import org.onap.ccsdk.sli.core.sli.SvcLogicException;
66 import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin;
68 public class FlowControlNode implements SvcLogicJavaPlugin{
70 private static final EELFLogger log = EELFManager.getInstance().getLogger(FlowControlNode.class);
71 private static final String SDNC_CONFIG_DIR_VAR = "SDNC_CONFIG_DIR";
73 public void processFlow(Map<String, String> inParams, SvcLogicContext ctx) throws SvcLogicException {
74 log.debug("Received processParamKeys call with params : " + inParams);
75 String responsePrefix = inParams.get(FlowControllerConstants.INPUT_PARAM_RESPONSE_PRIFIX);
77 responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix+".") : "";
78 FlowControlDBService dbservice = FlowControlDBService.initialise();
79 SvcLogicContext localContext = new SvcLogicContext();
80 localContext.setAttribute(FlowControllerConstants.REQUEST_ID, ctx.getAttribute(FlowControllerConstants.REQUEST_ID));
81 localContext.setAttribute(FlowControllerConstants.VNF_TYPE, ctx.getAttribute(FlowControllerConstants.VNF_TYPE));
82 localContext.setAttribute(FlowControllerConstants.REQUEST_ACTION, ctx.getAttribute(FlowControllerConstants.REQUEST_ACTION));
83 localContext.setAttribute(FlowControllerConstants.ACTION_LEVEL, ctx.getAttribute(FlowControllerConstants.ACTION_LEVEL));
84 localContext.setAttribute(FlowControllerConstants.RESPONSE_PREFIX, responsePrefix);
85 ctx.setAttribute(FlowControllerConstants.RESPONSE_PREFIX, responsePrefix);
86 dbservice.getFlowReferenceData(ctx, inParams, localContext);
88 for (Object key : localContext.getAttributeKeySet()) {
89 String parmName = (String) key;
90 String parmValue = ctx.getAttribute(parmName);
91 log.debug("processFlow " + parmName + "=" + parmValue);
94 processFlowSequence(inParams, ctx, localContext);
95 if(!ctx.getAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_STATUS).equals(FlowControllerConstants.OUTPUT_STATUS_SUCCESS))
96 throw new SvcLogicException(ctx.getAttribute(responsePrefix + FlowControllerConstants.OUTPUT_STATUS_MESSAGE));
98 } catch (Exception e) {
99 ctx.setAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_STATUS, FlowControllerConstants.OUTPUT_STATUS_FAILURE);
100 ctx.setAttribute(responsePrefix + FlowControllerConstants.OUTPUT_PARAM_ERROR_MESSAGE, e.getMessage());
101 log.error("Error occured in processFlow ", e);
102 throw new SvcLogicException(e.getMessage());
106 private void processFlowSequence(Map<String, String> inParams, SvcLogicContext ctx, SvcLogicContext localContext) throws Exception
108 String fn = "FlowExecutorNode.processflowSequence";
109 log.debug(fn + "Received model for flow : " + localContext.toString());
110 FlowControlDBService dbservice = FlowControlDBService.initialise();
111 String flowSequnce = null;
112 for (Object key : localContext.getAttributeKeySet()) {
113 String parmName = (String) key;
114 String parmValue = ctx.getAttribute(parmName);
115 log.debug(parmName + "=" + parmValue);
118 if(localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE) !=null){
120 if(localContext.getAttribute(FlowControllerConstants.GENERATION_NODE) != null){
121 GraphExecutor transactionExecutor = new GraphExecutor();
122 Boolean generatorExists = transactionExecutor.hasGraph("APPC_COMMOM", localContext.getAttribute(FlowControllerConstants.GENERATION_NODE), null, "sync");
124 flowSequnce = transactionExecutor.executeGraph("APPC_COMMOM", localContext.getAttribute(FlowControllerConstants.GENERATION_NODE),
125 null, "sync", null).getProperty(FlowControllerConstants.FLOW_SEQUENCE);
128 throw new Exception("Can not find Custom defined Flow Generator for " + localContext.getAttribute(FlowControllerConstants.GENERATION_NODE));
130 else if((localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE)).equalsIgnoreCase(FlowControllerConstants.DESINGTIME)){
131 localContext.setAttribute(FlowControllerConstants.VNFC_TYPE, ctx.getAttribute(FlowControllerConstants.VNFC_TYPE));
132 flowSequnce = dbservice.getDesignTimeFlowModel(localContext);
133 if(flowSequnce == null)
134 throw new Exception("Flow Sequence is not found User Desinged VNF " + ctx.getAttribute(FlowControllerConstants.VNF_TYPE));
136 else if((localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE)).equalsIgnoreCase(FlowControllerConstants.RUNTIME)){
138 Transaction transaction = new Transaction();
139 String input = collectInputParams(ctx,transaction);
140 log.info("CollectInputParamsData-Input: " + input );
142 RestExecutor restExe = new RestExecutor();
143 HashMap<String,String>flowSeq= restExe.execute(transaction, localContext);
145 JSONObject sequence = new JSONObject(flowSeq.get("restResponse"));
146 if(sequence.has("output"))
147 flowSequnce = sequence.getJSONObject("output").toString();
148 log.info("MultistepSequenceGenerator-Output: "+flowSequnce);
150 if(flowSequnce == null)
151 throw new Exception("Failed to get the Flow Sequece runtime for VNF type" + ctx.getAttribute(FlowControllerConstants.VNF_TYPE));
154 else if((localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE)).equalsIgnoreCase(FlowControllerConstants.EXTERNAL)){
155 //String input = collectInputParams(localContext);
156 // flowSequnce = ""; //get it from the External interface calling the Rest End point - TBD
157 //if(flowSequnce == null)
158 throw new Exception("Flow Sequence not found for " + ctx.getAttribute(FlowControllerConstants.VNF_TYPE));
162 //No other type of model supported...in Future can get flowModel from other generators which will be included here
163 throw new Exception("No information found for sequence Owner Design-Time Vs Run-Time" );
167 FlowGenerator flowGenerator = new FlowGenerator();
168 Transactions trans = flowGenerator.createSingleStepModel(inParams,ctx);
169 ObjectMapper mapper = new ObjectMapper();
170 flowSequnce = mapper.writeValueAsString(trans);
171 log.debug("Single step Flow Sequence : " + flowSequnce);
173 log.debug("Received Flow Sequence : " + flowSequnce);
175 HashMap<Integer, Transaction> transactionMap = createTransactionMap(flowSequnce, localContext);
176 exeuteAllTransaction(transactionMap, ctx);
177 log.info("Executed all the transacstion successfully");
180 private void exeuteAllTransaction(HashMap<Integer, Transaction> transactionMap, SvcLogicContext ctx) throws Exception {
182 String fn = "FlowExecutorNode.exeuteAllTransaction ";
184 FlowExecutorInterface flowExecutor;
185 for (int key = 1; key <= transactionMap.size() ; key++)
187 log.debug(fn + "Starting transactions ID " + key + " :)=" + retry);
188 Transaction transaction = transactionMap.get(key);
189 if(!preProcessor(transactionMap, transaction)){
190 log.info("Skipping Transaction ID " + transaction.getTransactionId());
193 if(transaction.getExecutionType() != null){
194 switch (transaction.getExecutionType()){
195 case FlowControllerConstants.GRAPH :
196 flowExecutor = new GraphExecutor();
198 case FlowControllerConstants.NODE :
199 flowExecutor = new NodeExecutor();
201 case FlowControllerConstants.REST :
202 flowExecutor = new RestExecutor();
205 throw new Exception("No Executor found for transaction ID" + transaction.getTransactionId());
207 flowExecutor.execute(transaction, ctx);
208 ResponseAction responseAction= handleResponse(transaction);
210 if(responseAction.getWait() != null && Integer.parseInt(responseAction.getWait()) > 0){
211 log.debug(fn + "Going to Sleep .... " + responseAction.getWait());
212 Thread.sleep(Integer.parseInt(responseAction.getWait())*1000L);
215 if(responseAction.isIntermediateMessage()){
216 log.debug(fn + "Sending Intermediate Message back .... ");
217 sendIntermediateMessage();
219 if(responseAction.getRetry() != null && Integer.parseInt(responseAction.getRetry()) > retry ){
220 log.debug(fn + "Ooppss!!! We will retry again ....... ");
223 log.debug(fn + "key =" + key + "retry =" + retry);
226 if(responseAction.isIgnore()){
227 log.debug(fn + "Ignoring this Error and moving ahead ....... ");
230 if(responseAction.isStop()){
231 log.debug(fn + "Need to Stop ....... ");
234 if(responseAction.getJump() != null && Integer.parseInt(responseAction.getJump()) > 0 ){
235 key = Integer.parseInt(responseAction.getJump());
238 log.debug(fn + "key =" + key + "retry =" + retry);
241 throw new Exception("Don't know how to execute transaction ID " + transaction.getTransactionId());
246 private void sendIntermediateMessage() {
247 // TODO Auto-generated method stub
250 private ResponseAction handleResponse(Transaction transaction) {
251 log.info("Handling Response for transaction Id " + transaction.getTransactionId());
252 DefaultResponseHandler defaultHandler = new DefaultResponseHandler();
253 return defaultHandler.handlerResponse(transaction);
256 private boolean preProcessor(HashMap<Integer, Transaction> transactionMap, Transaction transaction) throws IOException {
257 log.debug("Starting Preprocessing Logic ");
258 boolean runthisStep = false;
260 if(transaction.getPrecheck() != null && transaction.getPrecheck().getPrecheckOptions() != null
261 && !transaction.getPrecheck().getPrecheckOptions().isEmpty()){
262 List<PrecheckOption> precheckOptions = transaction.getPrecheck().getPrecheckOptions();
263 for(PrecheckOption precheck : precheckOptions){
264 Transaction trans = transactionMap.get(precheck.getpTransactionID());
265 ObjectMapper mapper = new ObjectMapper();
266 log.info("Mapper= " + mapper.writeValueAsString(trans));
267 HashMap trmap = mapper.readValue(mapper.writeValueAsString(trans), HashMap.class);
268 if(trmap.get(precheck.getParamName()) != null &&
269 ((String) trmap.get(precheck.getParamName())).equalsIgnoreCase(precheck.getParamValue()))
274 if(("any").equalsIgnoreCase(transaction.getPrecheck().getPrecheckOperator()) && runthisStep)
278 log.debug("No Pre check defined for transaction ID " + transaction.getTransactionId());
284 log.error("Error occured when Preprocessing Logic ", e);
287 log.debug("Returing process current Transaction = " + runthisStep);
292 private HashMap<Integer, Transaction> createTransactionMap(String flowSequnce, SvcLogicContext localContext) throws Exception {
293 ObjectMapper mapper = new ObjectMapper();
294 Transactions transactions = mapper.readValue(flowSequnce,Transactions.class);
295 HashMap<Integer, Transaction> transMap = new HashMap<>();
296 for(Transaction transaction : transactions.getTransactions()){
297 compileFlowDependencies(transaction, localContext);
298 //loadTransactionIntoStatus(transactions, ctx); //parse the Transactions Object and create records in process_flow_status table
299 transMap.put(transaction.getTransactionId(), transaction);
304 private void compileFlowDependencies(Transaction transaction, SvcLogicContext localContext) throws Exception {
305 FlowControlDBService dbservice = FlowControlDBService.initialise();
306 dbservice.populateModuleAndRPC(transaction, localContext.getAttribute(FlowControllerConstants.VNF_TYPE));
307 ObjectMapper mapper = new ObjectMapper();
308 log.debug("Indivisual Transaction Details :" + transaction.toString());
309 if((localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE) == null) ||
310 (localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE) != null &&
311 ! localContext.getAttribute(FlowControllerConstants.SEQUENCE_TYPE).equalsIgnoreCase(FlowControllerConstants.DESINGTIME))){
312 localContext.setAttribute("artifact-content", mapper.writeValueAsString(transaction));
313 dbservice.loadSequenceIntoDB(localContext);
315 //get a field in transction class as transactionhandle interface and register the Handler here for each trnactions
318 private String collectInputParams(SvcLogicContext ctx,Transaction transaction) throws Exception {
320 String fn = "FlowExecuteNode.collectInputParams";
321 Properties prop = loadProperties();
322 log.info("Loaded Properties " + prop.toString());
324 String vnfId = ctx.getAttribute(FlowControllerConstants.VNF_ID);
325 String inputData = null;
326 log.debug(fn + "vnfId :" + vnfId);
328 if (StringUtils.isBlank(vnfId)) {
329 throw new Exception("VnfId is missing");
334 ActionIdentifier actionIdentifier = new ActionIdentifier();
335 log.debug("Enter ActionIdentifier");
336 if (StringUtils.isNotBlank(vnfId)) {
337 actionIdentifier.setVnfId(vnfId);
339 if (StringUtils.isNotBlank(ctx.getAttribute(FlowControllerConstants.VSERVER_ID))) {
340 actionIdentifier.setVserverId(ctx.getAttribute(FlowControllerConstants.VSERVER_ID));
342 if (StringUtils.isNotBlank(ctx.getAttribute(FlowControllerConstants.VNFC_NAME))) {
343 actionIdentifier.setVnfcName(ctx.getAttribute(FlowControllerConstants.VNFC_NAME));
345 log.info("ActionIdentifierData" + actionIdentifier.toString());
347 RequestInfo requestInfo = new RequestInfo();
348 log.info("Enter RequestInfo");
349 requestInfo.setAction(ctx.getAttribute(FlowControllerConstants.REQUEST_ACTION));
350 requestInfo.setActionLevel(ctx.getAttribute(FlowControllerConstants.ACTION_LEVEL));
351 requestInfo.setPayload(ctx.getAttribute(FlowControllerConstants.PAYLOAD));
352 requestInfo.setActionIdentifier(actionIdentifier);
353 log.debug("RequestInfo: " + requestInfo.toString());
355 InventoryInfo inventoryInfo = getInventoryInfo(ctx, vnfId);
356 DependencyInfo dependencyInfo = getDependencyInfo(ctx);
357 Capabilities capabilites = getCapabilitesData(ctx);
359 Input input = new Input();
360 log.info("Enter InputData");
361 input.setRequestInfo(requestInfo);
362 input.setInventoryInfo(inventoryInfo);
363 input.setDependencyInfo(dependencyInfo);
364 input.setCapabilities(capabilites);
365 log.info(fn + "Input parameters:" + input.toString());
367 ObjectMapper mapper = new ObjectMapper();
368 mapper.setSerializationInclusion(Include.NON_NULL);
369 mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);
370 inputData = mapper.writeValueAsString(input);
371 log.info("InputDataJson:" + inputData);
373 } catch (Exception e) {
374 log.error("Error occured in " + fn, e);
377 String resourceUri = prop.getProperty(FlowControllerConstants.SEQ_GENERATOR_URL);
378 log.info(fn + "resourceUri= " + resourceUri);
380 EncryptionTool et = EncryptionTool.getInstance();
381 String pass = et.decrypt(prop.getProperty(FlowControllerConstants.SEQ_GENERATOR_PWD));
383 transaction.setPayload(inputData);
384 transaction.setExecutionRPC("POST");
385 transaction.setuId(prop.getProperty(FlowControllerConstants.SEQ_GENERATOR_UID));
386 transaction.setPswd(pass);
387 transaction.setExecutionEndPoint(resourceUri);
392 private DependencyInfo getDependencyInfo(SvcLogicContext ctx) throws Exception {
394 String fn = "FlowExecutorNode.getDependencyInfo";
395 DependencyInfo dependencyInfo = new DependencyInfo();
396 FlowControlDBService dbservice = FlowControlDBService.initialise();
397 String dependencyData = dbservice.getDependencyInfo(ctx);
398 log.info(fn + "dependencyDataInput:" + dependencyData);
400 if (dependencyData != null) {
401 ObjectMapper mapper = new ObjectMapper();
402 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
403 mapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
404 //JsonNode dependencyInfoData = mapper.readTree(dependencyData).get("dependencyInfo");
405 JsonNode vnfcData = mapper.readTree(dependencyData).get("vnfcs");
406 List<Vnfcs> vnfclist = Arrays.asList(mapper.readValue(vnfcData.toString(), Vnfcs[].class));
407 dependencyInfo.getVnfcs().addAll(vnfclist);
409 log.info("Dependency Output:"+ dependencyInfo.toString());
411 return dependencyInfo;
414 private Capabilities getCapabilitesData(SvcLogicContext ctx) throws Exception {
416 String fn = "FlowExecutorNode.getCapabilitesData";
417 Capabilities capabilities = new Capabilities();
418 FlowControlDBService dbservice = FlowControlDBService.initialise();
419 String capabilitiesData = dbservice.getCapabilitiesData(ctx);
420 log.info(fn + "capabilitiesDataInput:" + capabilitiesData);
422 if (capabilitiesData != null) {
423 ObjectMapper mapper = new ObjectMapper();
424 mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
425 mapper.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
426 JsonNode capabilitiesNode = mapper.readValue(capabilitiesData,JsonNode.class);
427 log.info("capabilitiesNode:" + capabilitiesNode.toString());
429 JsonNode vnfs = capabilitiesNode.findValue(FlowControllerConstants.VNF);
430 List<String> vnfsList = new ArrayList<>();
432 for (int i = 0; i < vnfs.size(); i++) {
434 String vnf = vnfs.get(i).asText();
439 JsonNode vfModules = capabilitiesNode.findValue(FlowControllerConstants.VF_MODULE);
440 List<String> vfModulesList = new ArrayList<>();
441 if (vfModules != null) {
442 for (int i = 0; i < vfModules.size(); i++) {
444 String vfModule = vfModules.get(i).asText();
445 vfModulesList.add(vfModule);
449 JsonNode vnfcs = capabilitiesNode.findValue(FlowControllerConstants.VNFC);
450 List<String> vnfcsList = new ArrayList<>();
452 for (int i = 0; i < vnfcs.size(); i++) {
454 String vnfc1 = vnfcs.get(i).asText();
455 vnfcsList.add(vnfc1);
459 JsonNode vms = capabilitiesNode.findValue(FlowControllerConstants.VM);
461 List<String> vmList = new ArrayList<>();
463 for (int i = 0; i < vms.size(); i++) {
465 String vm1 = vms.get(i).asText();
470 capabilities.getVnfc().addAll(vnfcsList);
471 capabilities.getVnf().addAll(vnfsList);
472 capabilities.getVfModule().addAll(vfModulesList);
473 capabilities.getVm().addAll(vmList);
475 log.info("Capabilities Output:"+ capabilities.toString());
480 private InventoryInfo getInventoryInfo(SvcLogicContext ctx, String vnfId) throws Exception{
481 String fn = "FlowExecutorNode.getInventoryInfo";
483 VnfInfo vnfInfo = new VnfInfo();
484 vnfInfo.setVnfId(vnfId);
485 vnfInfo.setVnfName(ctx.getAttribute("tmp.vnfInfo.vnf.vnf-name"));
486 vnfInfo.setVnfType(ctx.getAttribute("tmp.vnfInfo.vnf.vnf-type"));
488 String vmcount = ctx.getAttribute("tmp.vnfInfo.vm-count");
489 if(StringUtils.isNotBlank(vmcount)){
490 int vmCount = Integer.parseInt(vmcount);
491 log.info(fn +"vmcount:"+ vmCount);
494 Vnfcslist vnfc = new Vnfcslist();
495 for (int i = 0; i < vmCount; i++) {
497 vm.setVserverId(ctx.getAttribute("tmp.vnfInfo.vm[" + i + "].vserver-id"));
498 String vnfccount = ctx.getAttribute("tmp.vnfInfo.vm[" + i + "].vnfc-count");
499 int vnfcCount = Integer.parseInt(vnfccount);
502 vnfc.setVnfcName(ctx.getAttribute("tmp.vnfInfo.vm[" + i + "].vnfc-name"));
503 vnfc.setVnfcType(ctx.getAttribute("tmp.vnfInfo.vm[" + i + "].vnfc-type"));
506 vnfInfo.getVm().add(vm);
509 InventoryInfo inventoryInfo = new InventoryInfo();
510 inventoryInfo.setVnfInfo(vnfInfo);
511 log.info(fn + "Inventory Output:" +inventoryInfo.toString());
513 return inventoryInfo;
516 private static Properties loadProperties() throws Exception {
517 Properties props = new Properties();
518 String propDir = System.getenv(SDNC_CONFIG_DIR_VAR);
520 throw new Exception("Cannot find Property file -" + SDNC_CONFIG_DIR_VAR);
521 String propFile = propDir + FlowControllerConstants.APPC_FLOW_CONTROLLER;
522 try (InputStream propStream = new FileInputStream(propFile))
524 props.load(propStream);
528 throw new Exception("Could not load properties file " + propFile, e);