aboutsummaryrefslogtreecommitdiffstats
path: root/examples/examples-decisionmaker/src/main/resources/logic
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-03-23 17:49:50 +0000
committerliamfallon <liam.fallon@est.tech>2020-03-24 17:40:27 +0000
commit2f75e9d08d1e47e2b9b39ec21653bc3b4d65d00a (patch)
treebe5374421d8b3f026175ab51d197289ea9dbbe0d /examples/examples-decisionmaker/src/main/resources/logic
parentf7746d758149bc68584c01dc0fe15130c7a866b1 (diff)
Launch separate threads for Javascript task execution
When a policy is loaded, a separate thread is spawned for each Javascript script executor. This allows us to precompile the Javascript scripts and also to have a larger stack available for script execution. Issue-ID: POLICY-2106 Change-Id: I97323aafb623ba537ac1889b3c9504b345b4f67e Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'examples/examples-decisionmaker/src/main/resources/logic')
-rw-r--r--examples/examples-decisionmaker/src/main/resources/logic/MakeDecisionStateTSL.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/examples-decisionmaker/src/main/resources/logic/MakeDecisionStateTSL.js b/examples/examples-decisionmaker/src/main/resources/logic/MakeDecisionStateTSL.js
index 33af49534..e49438d14 100644
--- a/examples/examples-decisionmaker/src/main/resources/logic/MakeDecisionStateTSL.js
+++ b/examples/examples-decisionmaker/src/main/resources/logic/MakeDecisionStateTSL.js
@@ -34,9 +34,9 @@ else if (executor.inFields.get("mode").equals("optimistic")) {
else if (executor.inFields.get("mode").equals("dithering")) {
executor.subject.getTaskKey("DitheringAnswerTask").copyTo(executor.selectedTask);
}
-//else if (executor.inFields.get("mode").equals("roundrobin")) {
-// executor.subject.getTaskKey("RoundRobinAnswerTask").copyTo(executor.selectedTask);
-//}
+else if (executor.inFields.get("mode").equals("roundrobin")) {
+ executor.subject.getTaskKey("RoundRobinAnswerTask").copyTo(executor.selectedTask);
+}
executor.logger.info("Answer Selected Task:" + executor.selectedTask);