diff options
Diffstat (limited to 'examples/examples-onap-vcpe/src/main/resources/logic/standalone/ReceiveEventPolicyExecuteOrLogStateTSL.js')
-rw-r--r-- | examples/examples-onap-vcpe/src/main/resources/logic/standalone/ReceiveEventPolicyExecuteOrLogStateTSL.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/examples/examples-onap-vcpe/src/main/resources/logic/standalone/ReceiveEventPolicyExecuteOrLogStateTSL.js b/examples/examples-onap-vcpe/src/main/resources/logic/standalone/ReceiveEventPolicyExecuteOrLogStateTSL.js index 46a65add3..a291f6afb 100644 --- a/examples/examples-onap-vcpe/src/main/resources/logic/standalone/ReceiveEventPolicyExecuteOrLogStateTSL.js +++ b/examples/examples-onap-vcpe/src/main/resources/logic/standalone/ReceiveEventPolicyExecuteOrLogStateTSL.js @@ -1,6 +1,7 @@ /* * ============LICENSE_START======================================================= * Copyright (C) 2020 Nordix Foundation. + * Modifications Copyright (C) 2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +22,7 @@ executor.logger.info(executor.subject.id); executor.logger.info(executor.inFields); -var returnValue = executor.isTrue; +var returnValue = true; if( executor.inFields.get("vnfID") == null) { executor.logger.info("ControlLoopStatusAlbum: vnfID is null"); @@ -36,20 +37,20 @@ if( executor.inFields.get("vnfID") == null) { var status = vcpeClosedLoopStatus.get("closedLoopEventStatus").toString(); var notification = vcpeClosedLoopStatus.get("notification"); -var returnValue = executor.isTrue; - -if (notification != null && notification === "BLACKLIST") { +if (notification != null && notification == "BLACKLIST") { executor.subject.getTaskKey("StopAndLogTask").copyTo(executor.selectedTask); } else { - if (status === "ONSET") { + if (status == "ONSET") { executor.subject.getTaskKey("InitiateActionsTask").copyTo(executor.selectedTask); - } else if (status === "ABATED") { + } else if (status == "ABATED") { executor.subject.getTaskKey("StopAndLogTask").copyTo(executor.selectedTask); } else { executor.message = "closedLoopEventStatus is \"" + status + "\", it must be either \"ONSET\" or \"ABATED\""; - returnValue = executor.isFalse; + returnValue = false; } } executor.logger.info("ReceiveEventPolicyOnsetOrAbatedStateTSL State Selected Task:" + executor.selectedTask); + +returnValue; |