aboutsummaryrefslogtreecommitdiffstats
path: root/services/services-engine/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'services/services-engine/src/test')
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/JSONEventGenerator.java442
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJSONEventHandler.java316
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJSONTaggedEventConsumer.java130
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestPluginFactories.java62
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/TestApexCommandLineArguments.java186
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java276
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java184
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java239
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java266
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java362
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java392
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java89
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java106
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventSubscriber.java82
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java40
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventConverter.java58
-rw-r--r--services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java54
-rw-r--r--services/services-engine/src/test/resources/logback-test.xml50
-rw-r--r--services/services-engine/src/test/resources/main/DummyModelFile.json3
-rw-r--r--services/services-engine/src/test/resources/parameters/badParams.json31
-rw-r--r--services/services-engine/src/test/resources/parameters/blankParams.json11
-rw-r--r--services/services-engine/src/test/resources/parameters/empty.json1
-rw-r--r--services/services-engine/src/test/resources/parameters/factoryGoodParams.json64
-rw-r--r--services/services-engine/src/test/resources/parameters/goodParams.json64
-rw-r--r--services/services-engine/src/test/resources/parameters/noParams.json2
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json42
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsBadEPParClass.json42
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsBadFileName.json42
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsMismatchCTParClass.json42
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsMismatchEPParClass.json42
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsNoCT.json42
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsNoCTParClass.json41
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsNoEP.json42
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsNoEPParClass.json41
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsOKFileName.json42
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsWrongTypeCTParClass.json42
-rw-r--r--services/services-engine/src/test/resources/parameters/prodConsWrongTypeEPParClass.json42
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json23
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json23
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json15
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json23
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextBadParams.json15
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json15
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json15
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextNoParams.json15
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json45
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextOKDistParams.json48
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextOKFlushParams.json49
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json59
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceExecutorBadParams.json18
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json23
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json23
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json25
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json23
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json20
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json13
-rw-r--r--services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json40
-rw-r--r--services/services-engine/src/test/resources/parameters/superDooperParams.json55
-rw-r--r--services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json72
-rw-r--r--services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json65
-rw-r--r--services/services-engine/src/test/resources/parameters/syncBadParamsInvalidTimeout.json76
-rw-r--r--services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json71
-rw-r--r--services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json72
-rw-r--r--services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json76
-rw-r--r--services/services-engine/src/test/resources/parameters/syncGoodParams.json72
-rw-r--r--services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json76
-rw-r--r--services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json74
-rw-r--r--services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json74
-rw-r--r--services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json72
-rw-r--r--services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json72
-rw-r--r--services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json72
-rw-r--r--services/services-engine/src/test/resources/policymodels/SamplePolicyModelMVEL.json7372
72 files changed, 12913 insertions, 0 deletions
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/JSONEventGenerator.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/JSONEventGenerator.java
new file mode 100644
index 000000000..4da8c4201
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/JSONEventGenerator.java
@@ -0,0 +1,442 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.event;
+
+import java.util.Random;
+
+/**
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class JSONEventGenerator {
+ private static int nextEventNo = 0;
+
+ public static String jsonEvents(final int eventCount) {
+ final StringBuilder builder = new StringBuilder();
+
+ for (int i = 0; i < eventCount; i++) {
+ if (i > 0) {
+ builder.append("\n");
+ }
+ builder.append(jsonEvent());
+ }
+
+ return builder.toString();
+ }
+
+ public static String jsonEvent() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100");
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"" + eventName + "\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventNoName() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100");
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"namez\": \"" + eventName + "\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventBadName() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"%%%%\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventNoExName() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"I_DONT_EXIST\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventNoVersion() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100");
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"" + eventName + "\",\n");
+ builder.append(" \"versiion\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventBadVersion() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100");
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"" + eventName + "\",\n");
+ builder.append(" \"version\": \"#####\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventNoExVersion() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"Event0000\",\n");
+ builder.append(" \"version\": \"1.2.3\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventNoNamespace() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100");
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpacee\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"" + eventName + "\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventBadNamespace() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100");
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"hello.&&&&\",\n");
+ builder.append(" \"name\": \"" + eventName + "\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventNoExNamespace() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"pie.in.the.sky\",\n");
+ builder.append(" \"name\": \"Event0000\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventNoSource() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100");
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"" + eventName + "\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"sourcee\": \"test\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventBadSource() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100");
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"" + eventName + "\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"%!@**@!\",\n");
+ builder.append(" \"target\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventNoTarget() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100");
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"" + eventName + "\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"targett\": \"apex\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventBadTarget() {
+ final Random rand = new Random();
+
+ final StringBuilder builder = new StringBuilder();
+
+ int nextEventNo = rand.nextInt(2);
+ final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100");
+ final int nextMatchCase = rand.nextInt(4);
+ final float nextTestTemperature = rand.nextFloat() * 10000;
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"" + eventName + "\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"KNIO(*S)A(S)D\",\n");
+ builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n");
+ builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n");
+ builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n");
+ builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventMissingFields() {
+ final StringBuilder builder = new StringBuilder();
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"Event0000\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"apex\"\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static String jsonEventNullFields() {
+ final StringBuilder builder = new StringBuilder();
+
+ builder.append("{\n");
+ builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n");
+ builder.append(" \"name\": \"Event0000\",\n");
+ builder.append(" \"version\": \"0.0.1\",\n");
+ builder.append(" \"source\": \"test\",\n");
+ builder.append(" \"target\": \"Apex\",\n");
+ builder.append(" \"TestSlogan\": null,\n");
+ builder.append(" \"TestMatchCase\": -1,\n");
+ builder.append(" \"TestTimestamp\": -1,\n");
+ builder.append(" \"TestTemperature\": -1.0\n");
+ builder.append("}");
+
+ return builder.toString();
+ }
+
+ public static void main(final String[] args) {
+ if (args.length != 1) {
+ System.err.println("usage EventGenerator #events");
+ return;
+ }
+
+ int eventCount = 0;
+ try {
+ eventCount = Integer.parseInt(args[0]);
+ } catch (final Exception e) {
+ System.err.println("usage EventGenerator #events");
+ e.printStackTrace();
+ return;
+ }
+
+ System.out.println(jsonEvents(eventCount));
+ }
+
+ public static int getNextEventNo() {
+ return nextEventNo;
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJSONEventHandler.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJSONEventHandler.java
new file mode 100644
index 000000000..be61b165e
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJSONEventHandler.java
@@ -0,0 +1,316 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.event;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.apex.context.parameters.SchemaParameters;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader;
+import org.onap.policy.apex.model.basicmodel.service.ModelService;
+import org.onap.policy.apex.model.eventmodel.concepts.AxEvent;
+import org.onap.policy.apex.model.eventmodel.concepts.AxEvents;
+import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
+import org.onap.policy.apex.model.utilities.TextFileUtils;
+import org.onap.policy.apex.service.engine.event.impl.jsonprotocolplugin.Apex2JSONEventConverter;
+import org.onap.policy.apex.service.engine.event.impl.jsonprotocolplugin.JSONEventProtocolParameters;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+/**
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class TestJSONEventHandler {
+ private static final XLogger logger = XLoggerFactory.getXLogger(TestJSONEventHandler.class);
+
+ @BeforeClass
+ public static void setupEventModel() throws IOException, ApexModelException {
+ final String policyModelString =
+ TextFileUtils.getTextFileAsString("src/test/resources/policymodels/SamplePolicyModelMVEL.json");
+ final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<AxPolicyModel>(AxPolicyModel.class);
+ final AxPolicyModel apexPolicyModel = modelReader.read(new ByteArrayInputStream(policyModelString.getBytes()));
+
+ // Set up the models in the model service
+ apexPolicyModel.register();
+ }
+
+ @Before
+ public void initializeDefaultSchemaParameters() {
+ new SchemaParameters();
+ }
+
+ @Test
+ public void testJSONtoApexEvent() throws ApexException {
+ try {
+ final Apex2JSONEventConverter jsonEventConverter = new Apex2JSONEventConverter();
+ assertNotNull(jsonEventConverter);
+ jsonEventConverter.init(new JSONEventProtocolParameters());
+
+ final String apexEventJSONStringIn = JSONEventGenerator.jsonEvent();
+
+ logger.debug("input event\n" + apexEventJSONStringIn);
+
+ final List<ApexEvent> apexEventList = jsonEventConverter.toApexEvent(null, apexEventJSONStringIn);
+ for (final ApexEvent apexEvent : apexEventList) {
+ assertNotNull(apexEvent);
+
+ logger.debug(apexEvent.toString());
+
+ assertTrue(apexEvent.getName().equals("Event0000") || apexEvent.getName().equals("Event0100"));
+ assertTrue(apexEvent.getVersion().equals("0.0.1"));
+ assertTrue(apexEvent.getNameSpace().equals("org.onap.policy.apex.sample.events"));
+ assertTrue(apexEvent.getSource().equals("test"));
+ assertTrue(apexEvent.getTarget().equals("apex"));
+ assertTrue(apexEvent.get("TestSlogan").toString().startsWith("Test slogan for External Event"));
+
+ final Object testMatchCaseSelected = apexEvent.get("TestMatchCaseSelected");
+ assertTrue(testMatchCaseSelected == null);
+ }
+ } catch (final Exception e) {
+ e.printStackTrace();
+ throw new ApexException("Exception reading Apex event JSON file", e);
+ }
+ }
+
+ @Test
+ public void testJSONtoApexBadEvent() throws ApexException {
+ try {
+ final Apex2JSONEventConverter jsonEventConverter = new Apex2JSONEventConverter();
+ assertNotNull(jsonEventConverter);
+ jsonEventConverter.init(new JSONEventProtocolParameters());
+
+ String apexEventJSONStringIn = null;
+
+ try {
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventNoName();
+ jsonEventConverter.toApexEvent(null, apexEventJSONStringIn);
+ fail("Test should throw an exception here");
+ } catch (final ApexEventException e) {
+ assertEquals("Failed to unmarshal JSON event: event received without mandatory parameter \"name\" ",
+ e.getMessage().substring(0, 82));
+ }
+
+ try {
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventBadName();
+ jsonEventConverter.toApexEvent(null, apexEventJSONStringIn);
+ fail("Test should throw an exception here");
+ } catch (final ApexEventException e) {
+ assertTrue(e.getMessage()
+ .startsWith("Failed to unmarshal JSON event: field \"name\" with value \"%%%%\" is invalid"));
+ }
+
+ try {
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventNoExName();
+ jsonEventConverter.toApexEvent(null, apexEventJSONStringIn);
+ fail("Test should throw an exception here");
+ } catch (final ApexEventException e) {
+ assertEquals("Failed to unmarshal JSON event: an event definition for an event named \"I_DONT_EXI",
+ e.getMessage().substring(0, 82));
+ }
+
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventNoVersion();
+ ApexEvent event = jsonEventConverter.toApexEvent(null, apexEventJSONStringIn).get(0);
+ assertEquals("0.0.1", event.getVersion());
+
+ try {
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventBadVersion();
+ jsonEventConverter.toApexEvent(null, apexEventJSONStringIn);
+ fail("Test should throw an exception here");
+ } catch (final ApexEventException e) {
+ assertTrue(e.getMessage().startsWith(
+ "Failed to unmarshal JSON event: field \"version\" with value \"#####\" is invalid"));
+ }
+
+ try {
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventNoExVersion();
+ jsonEventConverter.toApexEvent(null, apexEventJSONStringIn);
+ fail("Test should throw an exception here");
+ } catch (final ApexEventException e) {
+ assertTrue(e.getMessage().startsWith(
+ "Failed to unmarshal JSON event: an event definition for an event named \"Event0000\" with version \"1.2.3\" not found in Apex model"));
+ }
+
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventNoNamespace();
+ event = jsonEventConverter.toApexEvent(null, apexEventJSONStringIn).get(0);
+ assertEquals("org.onap.policy.apex.sample.events", event.getNameSpace());
+
+ try {
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventBadNamespace();
+ jsonEventConverter.toApexEvent(null, apexEventJSONStringIn);
+ fail("Test should throw an exception here");
+ } catch (final ApexEventException e) {
+ assertTrue(e.getMessage().startsWith(
+ "Failed to unmarshal JSON event: field \"nameSpace\" with value \"hello.&&&&\" is invalid"));
+ }
+
+ try {
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventNoExNamespace();
+ jsonEventConverter.toApexEvent(null, apexEventJSONStringIn);
+ fail("Test should throw an exception here");
+ } catch (final ApexEventException e) {
+ assertTrue(e.getMessage().startsWith(
+ "Failed to unmarshal JSON event: namespace \"pie.in.the.sky\" on event \"Event0000\" "
+ + "does not match namespace \"org.onap.policy.apex.sample.events\" for that event in the Apex model"));
+ }
+
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventNoSource();
+ event = jsonEventConverter.toApexEvent(null, apexEventJSONStringIn).get(0);
+ assertEquals("Outside", event.getSource());
+
+ try {
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventBadSource();
+ jsonEventConverter.toApexEvent(null, apexEventJSONStringIn);
+ fail("Test should throw an exception here");
+ } catch (final ApexEventException e) {
+ assertTrue(e.getMessage().startsWith(
+ "Failed to unmarshal JSON event: field \"source\" with value \"%!@**@!\" is invalid"));
+ }
+
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventNoTarget();
+ event = jsonEventConverter.toApexEvent(null, apexEventJSONStringIn).get(0);
+ assertEquals("Match", event.getTarget());
+
+ try {
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventBadTarget();
+ jsonEventConverter.toApexEvent(null, apexEventJSONStringIn);
+ fail("Test should throw an exception here");
+ } catch (final ApexEventException e) {
+ assertTrue(e.getMessage().startsWith(
+ "Failed to unmarshal JSON event: field \"target\" with value \"KNIO(*S)A(S)D\" is invalid"));
+ }
+
+ try {
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventMissingFields();
+ jsonEventConverter.toApexEvent(null, apexEventJSONStringIn);
+ fail("Test should throw an exception here");
+ } catch (final ApexEventException e) {
+ assertTrue(e.getMessage().startsWith("Failed to unmarshal JSON event: error parsing Event0000:0.0.1 "
+ + "event from Json. Field \"TestMatchCase\" is missing, but is mandatory."));
+ }
+
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventNullFields();
+ event = jsonEventConverter.toApexEvent(null, apexEventJSONStringIn).get(0);
+ assertEquals(event.get("TestSlogan"), null);
+ assertEquals(event.get("TestMatchCase"), (byte) -1);
+ assertEquals(event.get("TestTimestamp"), (long) -1);
+ assertEquals(event.get("TestTemperature"), -1.0);
+
+ // Set the missing fields as optional in the model
+ final AxEvent eventDefinition = ModelService.getModel(AxEvents.class).get("Event0000");
+ eventDefinition.getParameterMap().get("TestSlogan").setOptional(true);
+ eventDefinition.getParameterMap().get("TestMatchCase").setOptional(true);
+ eventDefinition.getParameterMap().get("TestTimestamp").setOptional(true);
+ eventDefinition.getParameterMap().get("TestTemperature").setOptional(true);
+
+ apexEventJSONStringIn = JSONEventGenerator.jsonEventMissingFields();
+ event = jsonEventConverter.toApexEvent(null, apexEventJSONStringIn).get(0);
+ assertEquals(null, event.get("TestSlogan"));
+ assertEquals(null, event.get("TestMatchCase"));
+ assertEquals(null, event.get("TestTimestamp"));
+ assertEquals(null, event.get("TestTemperature"));
+ } catch (final Exception e) {
+ e.printStackTrace();
+ throw new ApexException("Exception reading Apex event JSON file", e);
+ }
+ }
+
+ @Test
+ public void testApexEventToJSON() throws ApexException {
+ try {
+ final Apex2JSONEventConverter jsonEventConverter = new Apex2JSONEventConverter();
+ assertNotNull(jsonEventConverter);
+
+ final Date event0000StartTime = new Date();
+ final Map<String, Object> event0000DataMap = new HashMap<String, Object>();
+ event0000DataMap.put("TestSlogan", "This is a test slogan");
+ event0000DataMap.put("TestMatchCase", 12345);
+ event0000DataMap.put("TestTimestamp", event0000StartTime.getTime());
+ event0000DataMap.put("TestTemperature", 34.5445667);
+
+ final ApexEvent apexEvent0000 =
+ new ApexEvent("Event0000", "0.0.1", "org.onap.policy.apex.sample.events", "test", "apex");
+ apexEvent0000.putAll(event0000DataMap);
+
+ final String apexEvent0000JSONString = (String) jsonEventConverter.fromApexEvent(apexEvent0000);
+
+ logger.debug(apexEvent0000JSONString);
+
+ assertTrue(apexEvent0000JSONString.contains("\"name\": \"Event0000\""));
+ assertTrue(apexEvent0000JSONString.contains("\"version\": \"0.0.1\""));
+ assertTrue(apexEvent0000JSONString.contains("\"nameSpace\": \"org.onap.policy.apex.sample.events\""));
+ assertTrue(apexEvent0000JSONString.contains("\"source\": \"test\""));
+ assertTrue(apexEvent0000JSONString.contains("\"target\": \"apex\""));
+ assertTrue(apexEvent0000JSONString.contains("\"TestSlogan\": \"This is a test slogan\""));
+ assertTrue(apexEvent0000JSONString.contains("\"TestMatchCase\": 12345"));
+ assertTrue(apexEvent0000JSONString.contains("\"TestTimestamp\": " + event0000StartTime.getTime()));
+ assertTrue(apexEvent0000JSONString.contains("\"TestTemperature\": 34.5445667"));
+
+ final Date event0004StartTime = new Date(1434363272000L);
+ final Map<String, Object> event0004DataMap = new HashMap<String, Object>();
+ event0004DataMap.put("TestSlogan", "Test slogan for External Event");
+ event0004DataMap.put("TestMatchCase", new Integer(2));
+ event0004DataMap.put("TestTimestamp", new Long(event0004StartTime.getTime()));
+ event0004DataMap.put("TestTemperature", new Double(1064.43));
+ event0004DataMap.put("TestMatchCaseSelected", new Integer(2));
+ event0004DataMap.put("TestMatchStateTime", new Long(1434370506078L));
+ event0004DataMap.put("TestEstablishCaseSelected", new Integer(0));
+ event0004DataMap.put("TestEstablishStateTime", new Long(1434370506085L));
+ event0004DataMap.put("TestDecideCaseSelected", new Integer(3));
+ event0004DataMap.put("TestDecideStateTime", new Long(1434370506092L));
+ event0004DataMap.put("TestActCaseSelected", new Integer(2));
+ event0004DataMap.put("TestActStateTime", new Long(1434370506095L));
+
+ final ApexEvent apexEvent0004 =
+ new ApexEvent("Event0004", "0.0.1", "org.onap.policy.apex.sample.events", "test", "apex");
+ apexEvent0004.putAll(event0004DataMap);
+
+ final String apexEvent0004JSONString = (String) jsonEventConverter.fromApexEvent(apexEvent0004);
+
+ logger.debug(apexEvent0004JSONString);
+
+ assertTrue(apexEvent0004JSONString.contains("\"name\": \"Event0004\""));
+ assertTrue(apexEvent0004JSONString.contains("\"version\": \"0.0.1\""));
+ assertTrue(apexEvent0004JSONString.contains("\"nameSpace\": \"org.onap.policy.apex.sample.events\""));
+ assertTrue(apexEvent0004JSONString.contains("\"source\": \"test\""));
+ assertTrue(apexEvent0004JSONString.contains("\"target\": \"apex\""));
+ assertTrue(apexEvent0004JSONString.contains("\"TestSlogan\": \"Test slogan for External Event\""));
+ assertTrue(apexEvent0004JSONString.contains("1434370506078"));
+ assertTrue(apexEvent0004JSONString.contains("1064.43"));
+ } catch (final Exception e) {
+ e.printStackTrace();
+ throw new ApexException("Exception reading Apex event JSON file", e);
+ }
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJSONTaggedEventConsumer.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJSONTaggedEventConsumer.java
new file mode 100644
index 000000000..b19cceec9
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJSONTaggedEventConsumer.java
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.event;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.junit.Test;
+import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.consumer.CharacterDelimitedTextBlockReader;
+import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.consumer.TextBlock;
+
+/**
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class TestJSONTaggedEventConsumer {
+
+ @Test
+ public void testGarbageText() throws IOException {
+ final InputStream jsonInputStream = new ByteArrayInputStream("hello there".getBytes());
+
+ final CharacterDelimitedTextBlockReader taggedReader = new CharacterDelimitedTextBlockReader('{', '}');
+ taggedReader.init(jsonInputStream);
+
+ final TextBlock textBlock = taggedReader.readTextBlock();
+ assertNull(textBlock.getText());
+ assertTrue(textBlock.isEndOfText());
+ }
+
+ @Test
+ public void testPartialEvent() throws IOException {
+ final InputStream jsonInputStream = new ByteArrayInputStream("\"TestTimestamp\": 1469781869268}".getBytes());
+
+ final CharacterDelimitedTextBlockReader taggedReader = new CharacterDelimitedTextBlockReader('{', '}');
+ taggedReader.init(jsonInputStream);
+
+ final TextBlock textBlock = taggedReader.readTextBlock();
+ assertNull(textBlock.getText());
+ assertTrue(textBlock.isEndOfText());
+ }
+
+ @Test
+ public void testFullEvent() throws IOException {
+ final InputStream jsonInputStream = new ByteArrayInputStream("{TestTimestamp\": 1469781869268}".getBytes());
+
+ final CharacterDelimitedTextBlockReader taggedReader = new CharacterDelimitedTextBlockReader('{', '}');
+ taggedReader.init(jsonInputStream);
+
+ TextBlock textBlock = taggedReader.readTextBlock();
+ assertEquals(textBlock.getText(), "{TestTimestamp\": 1469781869268}");
+
+ textBlock = taggedReader.readTextBlock();
+ assertNull(textBlock.getText());
+ assertTrue(textBlock.isEndOfText());
+ }
+
+ @Test
+ public void testFullEventGarbageBefore() throws IOException {
+ final InputStream jsonInputStream =
+ new ByteArrayInputStream("Garbage{TestTimestamp\": 1469781869268}".getBytes());
+
+ final CharacterDelimitedTextBlockReader taggedReader = new CharacterDelimitedTextBlockReader('{', '}');
+ taggedReader.init(jsonInputStream);
+
+ TextBlock textBlock = taggedReader.readTextBlock();
+ assertEquals(textBlock.getText(), "{TestTimestamp\": 1469781869268}");
+ assertFalse(textBlock.isEndOfText());
+
+ textBlock = taggedReader.readTextBlock();
+ assertNull(textBlock.getText());
+ assertTrue(textBlock.isEndOfText());
+ }
+
+ @Test
+ public void testFullEventGarbageBeforeAfter() throws IOException {
+ final InputStream jsonInputStream =
+ new ByteArrayInputStream("Garbage{TestTimestamp\": 1469781869268}Rubbish".getBytes());
+
+ final CharacterDelimitedTextBlockReader taggedReader = new CharacterDelimitedTextBlockReader('{', '}');
+ taggedReader.init(jsonInputStream);
+
+ TextBlock textBlock = taggedReader.readTextBlock();
+ assertEquals(textBlock.getText(), "{TestTimestamp\": 1469781869268}");
+ assertFalse(textBlock.isEndOfText());
+
+ textBlock = taggedReader.readTextBlock();
+ assertNull(textBlock.getText());
+ assertTrue(textBlock.isEndOfText());
+ }
+
+ @Test
+ public void testFullEventGarbageAfter() throws IOException {
+ final InputStream jsonInputStream =
+ new ByteArrayInputStream("{TestTimestamp\": 1469781869268}Rubbish".getBytes());
+
+ final CharacterDelimitedTextBlockReader taggedReader = new CharacterDelimitedTextBlockReader('{', '}');
+ taggedReader.init(jsonInputStream);
+
+ TextBlock textBlock = taggedReader.readTextBlock();
+ assertEquals(textBlock.getText(), "{TestTimestamp\": 1469781869268}");
+ assertFalse(textBlock.isEndOfText());
+
+ textBlock = taggedReader.readTextBlock();
+ assertNull(textBlock.getText());
+ assertTrue(textBlock.isEndOfText());
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestPluginFactories.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestPluginFactories.java
new file mode 100644
index 000000000..5d77bfd2a
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestPluginFactories.java
@@ -0,0 +1,62 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.event;
+
+import static org.junit.Assert.assertNotNull;
+
+import java.util.Map.Entry;
+
+import org.junit.Test;
+import org.onap.policy.apex.service.engine.event.impl.EventConsumerFactory;
+import org.onap.policy.apex.service.engine.event.impl.EventProducerFactory;
+import org.onap.policy.apex.service.engine.main.ApexCommandLineArguments;
+
+import org.onap.policy.apex.service.parameters.ApexParameterException;
+import org.onap.policy.apex.service.parameters.ApexParameterHandler;
+import org.onap.policy.apex.service.parameters.ApexParameters;
+import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters;
+
+/**
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ * @author John Keeney (john.keeney@ericsson.com)
+ */
+public class TestPluginFactories {
+
+ @Test
+ public void testEventConsumerFactory() throws ApexEventException, ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/factoryGoodParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+
+ for (final Entry<String, EventHandlerParameters> ce : parameters.getEventInputParameters().entrySet()) {
+ final ApexEventConsumer consumer = new EventConsumerFactory().createConsumer(
+ parameters.getEngineServiceParameters().getName() + "_consumer_" + ce.getKey(), ce.getValue());
+ assertNotNull(consumer);
+ }
+
+ for (final Entry<String, EventHandlerParameters> pe : parameters.getEventOutputParameters().entrySet()) {
+ final ApexEventProducer producer = new EventProducerFactory().createProducer(
+ parameters.getEngineServiceParameters().getName() + "_producer_" + pe.getKey(), pe.getValue());
+ assertNotNull(producer);
+ }
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/TestApexCommandLineArguments.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/TestApexCommandLineArguments.java
new file mode 100644
index 000000000..247f9b935
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/TestApexCommandLineArguments.java
@@ -0,0 +1,186 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.main;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import org.junit.Test;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+
+/**
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class TestApexCommandLineArguments {
+
+ @Test
+ public void testCommandLineArguments() {
+ final ApexCommandLineArguments apexArguments = new ApexCommandLineArguments();
+
+ final String[] args00 = {""};
+ try {
+ apexArguments.parse(args00);
+ apexArguments.validate();
+ fail("Test should throw an exception here");
+ } catch (final ApexException e) {
+ assertEquals("Apex configuration file was not specified as an argument", e.getMessage());
+ }
+
+ final String[] args01 = {"-h"};
+ try {
+ final String result = apexArguments.parse(args01);
+ assertTrue(result.startsWith("usage: org.onap.policy.apex.service.engine.main.ApexMain [options...]"));
+ } catch (final ApexException e) {
+ e.printStackTrace();
+ fail("Test should not throw an exception");
+ }
+
+ final String[] args02 = {"-v"};
+ try {
+ final String result = apexArguments.parse(args02);
+ assertTrue(result.startsWith("Apex Adaptive Policy Engine"));
+ } catch (final ApexException e) {
+ e.printStackTrace();
+ fail("Test should not throw an exception");
+ }
+
+ final String[] args03 = {"-v", "-h"};
+ try {
+ final String result = apexArguments.parse(args03);
+ assertTrue(result.startsWith("usage: org.onap.policy.apex.service.engine.main.ApexMain [options...]"));
+ } catch (final ApexException e) {
+ e.printStackTrace();
+ fail("Test should not throw an exception");
+ }
+
+ final String[] args04 = {"-h", "-v"};
+ try {
+ final String result = apexArguments.parse(args04);
+ assertTrue(result.startsWith("usage: org.onap.policy.apex.service.engine.main.ApexMain [options...]"));
+ } catch (final ApexException e) {
+ e.printStackTrace();
+ fail("Test should not throw an exception");
+ }
+
+ final String[] args05 = {"-a"};
+ try {
+ apexArguments.parse(args05);
+ } catch (final ApexException e) {
+ assertEquals("invalid command line arguments specified : Unrecognized option: -a", e.getMessage());
+ }
+
+ final String[] args06 = {"-c", "hello", "-m", "goodbye", "-h", "-v"};
+ try {
+ final String result = apexArguments.parse(args06);
+ assertTrue(result.startsWith("usage: org.onap.policy.apex.service.engine.main.ApexMain [options...]"));
+ } catch (final ApexException e) {
+ assertEquals("invalid command line arguments specified : Unrecognized option: -a", e.getMessage());
+ }
+
+ final String[] args07 = {"-c", "hello", "-m", "goodbye", "-h", "aaa"};
+ try {
+ final String result = apexArguments.parse(args07);
+ assertTrue(result.startsWith("usage: org.onap.policy.apex.service.engine.main.ApexMain [options...]"));
+ } catch (final ApexException e) {
+ assertEquals("too many command line arguments specified : [-c, hello, -m, goodbye, -h, aaa]",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void testCommandLineFileParameters() {
+ final ApexCommandLineArguments apexArguments = new ApexCommandLineArguments();
+
+ final String[] args00 = {"-c", "zooby"};
+ try {
+ apexArguments.parse(args00);
+ apexArguments.validate();
+ fail("Test should throw an exception here");
+ } catch (final ApexException e) {
+ assertEquals("Apex configuration file \"zooby\" does not exist", e.getMessage());
+ }
+
+ final String[] args01 = {"-c"};
+ try {
+ apexArguments.parse(args01);
+ apexArguments.validate();
+ fail("Test should throw an exception here");
+ } catch (final ApexException e) {
+ assertEquals("invalid command line arguments specified : Missing argument for option: c", e.getMessage());
+ }
+
+ final String[] args02 = {"-c", "src/test/resources/parameters/goodParams.json"};
+ try {
+ apexArguments.parse(args02);
+ apexArguments.validate();
+ } catch (final ApexException e) {
+ e.printStackTrace();
+ fail("Test should not throw an exception");
+ }
+
+ final String[] args03 = {"-c", "src/test/resources/parameters/goodParams.json", "-m", "zooby"};
+ try {
+ apexArguments.parse(args03);
+ apexArguments.validate();
+ fail("Test should throw an exception here");
+ } catch (final ApexException e) {
+ assertEquals("Apex model file \"zooby\" does not exist", e.getMessage());
+ }
+
+ final String[] args04 = {"-m"};
+ try {
+ apexArguments.parse(args04);
+ apexArguments.validate();
+ fail("Test should throw an exception here");
+ } catch (final ApexException e) {
+ assertEquals("invalid command line arguments specified : Missing argument for option: m", e.getMessage());
+ }
+
+ final String[] args05 = {"-c", "src/test/resources/parameters/goodParams.json", "-m"};
+ try {
+ apexArguments.parse(args05);
+ apexArguments.validate();
+ fail("Test should throw an exception here");
+ } catch (final ApexException e) {
+ assertEquals("invalid command line arguments specified : Missing argument for option: m", e.getMessage());
+ }
+
+ final String[] args06 = {"-c", "src/test/resources/parameters/goodParams.json", "-m",
+ "src/test/resources/main/DummyModelFile.json"};
+ try {
+ apexArguments.parse(args06);
+ apexArguments.validate();
+ } catch (final ApexException e) {
+ e.printStackTrace();
+ fail("Test should not throw an exception");
+ }
+
+ final String[] args07 = {"-c", "parameters/goodParams.json", "-m", "main/DummyModelFile.json"};
+ try {
+ apexArguments.parse(args07);
+ apexArguments.validate();
+ } catch (final ApexException e) {
+ e.printStackTrace();
+ fail("Test should not throw an exception");
+ }
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
new file mode 100644
index 000000000..33bcd0d5f
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
@@ -0,0 +1,276 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import org.junit.Test;
+import org.onap.policy.apex.service.engine.main.ApexCommandLineArguments;
+import org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperDistributorParameters;
+import org.onap.policy.apex.service.parameters.ApexParameterException;
+import org.onap.policy.apex.service.parameters.ApexParameterHandler;
+import org.onap.policy.apex.service.parameters.ApexParameters;
+
+/**
+ * Test for an empty parameter file
+ *
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class ContextParameterTests {
+
+ @Test
+ public void noParamsTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextNoParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceContextNoParams.json\"\n"
+ + "(ApexParameterRuntimeException):could not find field \"parameterClassName\" in \"contextParameters\" entry",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void badParamsTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceContextBadParams.json\"\n"
+ + "(ApexParameterRuntimeException):failed to deserialize the parameters for \"contextParameters\" to parameter class \"hello\"\n"
+ + "java.lang.ClassNotFoundException: hello",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void badPluginParamNameTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadPluginNameParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceContextBadPluginNameParams.json\"\n"
+ + "(ApexParameterRuntimeException):could not find field \"parameterClassName\" in \"contextParameters\" entry",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void badClassParamTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceContextBadClassParams.json\"\n"
+ + "(ApexParameterRuntimeException):failed to deserialize the parameters for \"contextParameters\" to parameter class \"java.lang.Integer\"\n"
+ + "com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected NUMBER but was BEGIN_OBJECT at path $",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void badPluginClassTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadPluginClassParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceContextBadPluginClassParams.json\"\n"
+ + "(ClassCastException):org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters cannot be cast to org.onap.policy.apex.context.parameters.ContextParameters",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void okFlushParamTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKFlushParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
+ .getEngineServiceParameters().getEngineParameters().getContextParameters().getParameterClassName());
+ assertEquals(123456, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getPersistorParameters().getFlushPeriod());
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw any exception: " + e.getMessage());
+ }
+ }
+
+ @Test
+ public void okDefaultParamTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKDefaultParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
+ .getEngineServiceParameters().getEngineParameters().getContextParameters().getParameterClassName());
+ assertEquals(300000, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getPersistorParameters().getFlushPeriod());
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw any exception: " + e.getMessage());
+ }
+ }
+
+ @Test
+ public void okDistParamTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKDistParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
+ .getEngineServiceParameters().getEngineParameters().getContextParameters().getParameterClassName());
+ assertEquals("org.onap.policy.apex.context.parameters.DistributorParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getDistributorParameters().getParameterClassName());
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw any exception: " + e.getMessage());
+ }
+ }
+
+ @Test
+ public void okFullDefaultParamTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
+ .getEngineServiceParameters().getEngineParameters().getContextParameters().getParameterClassName());
+ assertEquals("org.onap.policy.apex.context.parameters.DistributorParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getDistributorParameters().getParameterClassName());
+ assertEquals("org.onap.policy.apex.context.parameters.LockManagerParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getLockManagerParameters().getParameterClassName());
+ assertEquals("org.onap.policy.apex.context.parameters.PersistorParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getPersistorParameters().getParameterClassName());
+ assertEquals(300000, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getPersistorParameters().getFlushPeriod());
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw any exception: " + e.getMessage());
+ }
+ }
+
+ @Test
+ public void okFullParamTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextOKFullParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+ assertEquals("org.onap.policy.apex.context.parameters.ContextParameters", parameters
+ .getEngineServiceParameters().getEngineParameters().getContextParameters().getParameterClassName());
+ assertEquals("org.onap.policy.apex.context.parameters.LockManagerParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getLockManagerParameters().getParameterClassName());
+ assertEquals("org.onap.policy.apex.context.parameters.PersistorParameters",
+ parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getPersistorParameters().getParameterClassName());
+ assertEquals(123456, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
+ .getPersistorParameters().getFlushPeriod());
+
+ final SuperDooperDistributorParameters infinispanParameters =
+ (SuperDooperDistributorParameters) parameters.getEngineServiceParameters().getEngineParameters()
+ .getContextParameters().getDistributorParameters();
+ assertEquals("org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperDistributorParameters",
+ infinispanParameters.getParameterClassName());
+ assertEquals("my/lovely/configFile.xml", infinispanParameters.getConfigFile());
+ assertEquals("holy/stone.xml", infinispanParameters.getJgroupsFile());
+ assertEquals(false, infinispanParameters.preferIPv4Stack());
+ assertEquals("fatherted", infinispanParameters.getjGroupsBindAddress());
+
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw any exception: " + e.getMessage());
+ }
+ }
+
+ @Test
+ public void badClassDistParamTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassDistParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceContextBadClassDistParams.json\"\n"
+ + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to org.onap.policy.apex.context.parameters.DistributorParameters",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void badClassLockParamTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassLockParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceContextBadClassLockParams.json\"\n"
+ + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to org.onap.policy.apex.context.parameters.LockManagerParameters",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void badClassPersistParamTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceContextBadClassPersistParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceContextBadClassPersistParams.json\"\n"
+ + "(ClassCastException):org.onap.policy.apex.context.parameters.ContextParameters cannot be cast to org.onap.policy.apex.context.parameters.PersistorParameters",
+ e.getMessage());
+ }
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java
new file mode 100644
index 000000000..b14cc22be
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java
@@ -0,0 +1,184 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import org.junit.Test;
+import org.onap.policy.apex.service.engine.main.ApexCommandLineArguments;
+import org.onap.policy.apex.service.parameters.ApexParameterException;
+import org.onap.policy.apex.service.parameters.ApexParameterHandler;
+import org.onap.policy.apex.service.parameters.ApexParameters;
+
+/**
+ * Test for an empty parameter file
+ *
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class ExecutorParameterTests {
+
+ @Test
+ public void noParamsTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorNoParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+ assertEquals(0,
+ parameters.getEngineServiceParameters().getEngineParameters().getExecutorParameterMap().size());
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw any exception: " + e.getMessage());
+ }
+ }
+
+ @Test
+ public void badParamsTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceExecutorBadParams.json\"\n"
+ + "(ApexParameterRuntimeException):value of \"executorParameters:ZOOBY\" entry is not a parameter JSON object",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void noExecutorParamsTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorNoExecutorParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceExecutorNoExecutorParams.json\"\n"
+ + "(ApexParameterRuntimeException):no \"executorParameters\" entry found in parameters, at least one executor parameter entry must be specified",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void emptyParamsTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorEmptyParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceExecutorEmptyParams.json\"\n"
+ + "(ApexParameterRuntimeException):could not find field \"parameterClassName\" in \"executorParameters:ZOOBY\" entry",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void badPluginParamNameTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginNameParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceExecutorBadPluginNameParams.json\"\n"
+ + "(ApexParameterRuntimeException):could not find field \"parameterClassName\" in \"executorParameters:ZOOBY\" entry",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void badPluginParamObjectTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json\"\n"
+ + "(ApexParameterRuntimeException):value for field \"parameterClassName\" in \"executorParameters:LOOBY\" entry is not a plain string",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void badPluginParamBlankTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json\"\n"
+ + "(ApexParameterRuntimeException):value for field \"parameterClassName\" in \"executorParameters:LOOBY\" entry is not specified or is blank",
+ e.getMessage());
+ }
+ }
+
+
+ @Test
+ public void badPluginParamValueTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/serviceExecutorBadPluginValueParams.json\"\n"
+ + "(ApexParameterRuntimeException):failed to deserialize the parameters for \"executorParameters:LOOBY\" to parameter class \"helloworld\"\n"
+ + "java.lang.ClassNotFoundException: helloworld",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void goodParametersTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+
+ assertEquals("MyApexEngine", parameters.getEngineServiceParameters().getName());
+ assertEquals("0.0.1", parameters.getEngineServiceParameters().getVersion());
+ assertEquals(45, parameters.getEngineServiceParameters().getId());
+ assertEquals(19, parameters.getEngineServiceParameters().getInstanceCount());
+ assertEquals(65522, parameters.getEngineServiceParameters().getDeploymentPort());
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw any exception: " + e.getMessage());
+ }
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
new file mode 100644
index 000000000..6ea8d5924
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
@@ -0,0 +1,239 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Arrays;
+
+import org.junit.Test;
+import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.consumer.ApexFileEventConsumer;
+import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.producer.ApexFileEventProducer;
+import org.onap.policy.apex.service.engine.main.ApexCommandLineArguments;
+import org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters;
+import org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperEventProducer;
+import org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperEventSubscriber;
+import org.onap.policy.apex.service.parameters.ApexParameterException;
+import org.onap.policy.apex.service.parameters.ApexParameterHandler;
+import org.onap.policy.apex.service.parameters.ApexParameters;
+import org.onap.policy.apex.service.parameters.carriertechnology.CarrierTechnologyParameters;
+import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolParameters;
+
+/**
+ * Test for an empty parameter file
+ *
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class ParameterTests {
+ @Test
+ public void invalidParametersNoFileTest() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/invalidNoFile.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertTrue(e.getMessage().startsWith("error reading parameters from \"src"));
+ assertTrue(e.getMessage().contains("FileNotFoundException"));
+ }
+ }
+
+ @Test
+ public void invalidParametersEmptyTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/empty.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertTrue(e.getMessage()
+ .startsWith("validation error(s) on parameters from \"src/test/resources/parameters/empty.json\""));
+ }
+ }
+
+ @Test
+ public void invalidParametersNoParamsTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/noParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals("validation error(s) on parameters from \"src/test/resources/parameters/noParams.json\"\n"
+ + "Apex parameters invalid\n" + " engine service parameters are not specified\n"
+ + " at least one event output and one event input must be specified", e.getMessage());
+ }
+ }
+
+ @Test
+ public void invalidParametersBlankParamsTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/blankParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+
+ assertEquals("validation error(s) on parameters from \"src/test/resources/parameters/blankParams.json\"\n"
+ + "Apex parameters invalid\n" + " engine service parameters invalid\n"
+ + " id not specified or specified value [-1] invalid, must be specified as id >= 0\n"
+ + " at least one event output and one event input must be specified", e.getMessage());
+ }
+ }
+
+ @Test
+ public void invalidParametersTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/badParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/badParams.json\"\n"
+ + "Apex parameters invalid\n" + " engine service parameters invalid\n"
+ + " name [hello there] and/or version [PA1] invalid\n"
+ + " parameter \"name\": value \"hello there\", does not match regular expression \"[A-Za-z0-9\\-_\\.]+\"\n"
+ + " id not specified or specified value [-45] invalid, must be specified as id >= 0\n"
+ + " instanceCount [-345] invalid, must be specified as instanceCount >= 1\n"
+ + " deploymentPort [65536] invalid, must be specified as 1024 <= port <= 65535\n"
+ + " policyModelFileName [/some/file/name.xml] not found or is not a plain file\n"
+ + " event input (TheFileConsumer1) parameters invalid\n"
+ + " fileName not specified or is blank or null, it must be specified as a valid file location\n"
+ + " event output (FirstProducer) parameters invalid\n"
+ + " fileName not specified or is blank or null, it must be specified as a valid file location",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void goodParametersTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+
+ assertEquals(2, parameters.getEventInputParameters().size());
+ assertEquals(2, parameters.getEventOutputParameters().size());
+
+ assertTrue(parameters.getEventOutputParameters().containsKey("FirstProducer"));
+ assertTrue(parameters.getEventOutputParameters().containsKey("MyOtherProducer"));
+ assertEquals("FILE", parameters.getEventOutputParameters().get("FirstProducer")
+ .getCarrierTechnologyParameters().getLabel());
+ assertEquals("FILE", parameters.getEventOutputParameters().get("MyOtherProducer")
+ .getCarrierTechnologyParameters().getLabel());
+ assertEquals(ApexFileEventProducer.class.getCanonicalName(), parameters.getEventOutputParameters()
+ .get("MyOtherProducer").getCarrierTechnologyParameters().getEventProducerPluginClass());
+ assertEquals(ApexFileEventConsumer.class.getCanonicalName(), parameters.getEventOutputParameters()
+ .get("MyOtherProducer").getCarrierTechnologyParameters().getEventConsumerPluginClass());
+ assertEquals("JSON",
+ parameters.getEventOutputParameters().get("FirstProducer").getEventProtocolParameters().getLabel());
+ assertEquals("JSON", parameters.getEventOutputParameters().get("MyOtherProducer")
+ .getEventProtocolParameters().getLabel());
+
+ assertTrue(parameters.getEventInputParameters().containsKey("TheFileConsumer1"));
+ assertTrue(parameters.getEventInputParameters().containsKey("MySuperDooperConsumer1"));
+ assertEquals("FILE", parameters.getEventInputParameters().get("TheFileConsumer1")
+ .getCarrierTechnologyParameters().getLabel());
+ assertEquals("SUPER_DOOPER", parameters.getEventInputParameters().get("MySuperDooperConsumer1")
+ .getCarrierTechnologyParameters().getLabel());
+ assertEquals("JSON", parameters.getEventInputParameters().get("TheFileConsumer1")
+ .getEventProtocolParameters().getLabel());
+ assertEquals("SUPER_TOK_DEL", parameters.getEventInputParameters().get("MySuperDooperConsumer1")
+ .getEventProtocolParameters().getLabel());
+ assertEquals(ApexFileEventProducer.class.getCanonicalName(), parameters.getEventInputParameters()
+ .get("TheFileConsumer1").getCarrierTechnologyParameters().getEventProducerPluginClass());
+ assertEquals(ApexFileEventConsumer.class.getCanonicalName(), parameters.getEventInputParameters()
+ .get("TheFileConsumer1").getCarrierTechnologyParameters().getEventConsumerPluginClass());
+ assertEquals(SuperDooperEventProducer.class.getCanonicalName(), parameters.getEventInputParameters()
+ .get("MySuperDooperConsumer1").getCarrierTechnologyParameters().getEventProducerPluginClass());
+ assertEquals(SuperDooperEventSubscriber.class.getCanonicalName(), parameters.getEventInputParameters()
+ .get("MySuperDooperConsumer1").getCarrierTechnologyParameters().getEventConsumerPluginClass());
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw an exception");
+ }
+ }
+
+ @Test
+ public void superDooperParametersTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/superDooperParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+
+ assertEquals("MyApexEngine", parameters.getEngineServiceParameters().getName());
+ assertEquals("0.0.1", parameters.getEngineServiceParameters().getVersion());
+ assertEquals(45, parameters.getEngineServiceParameters().getId());
+ assertEquals(345, parameters.getEngineServiceParameters().getInstanceCount());
+ assertEquals(65522, parameters.getEngineServiceParameters().getDeploymentPort());
+
+ final CarrierTechnologyParameters prodCT =
+ parameters.getEventOutputParameters().get("FirstProducer").getCarrierTechnologyParameters();
+ final EventProtocolParameters prodEP =
+ parameters.getEventOutputParameters().get("FirstProducer").getEventProtocolParameters();
+ final CarrierTechnologyParameters consCT =
+ parameters.getEventInputParameters().get("MySuperDooperConsumer1").getCarrierTechnologyParameters();
+ final EventProtocolParameters consEP =
+ parameters.getEventInputParameters().get("MySuperDooperConsumer1").getEventProtocolParameters();
+
+ assertEquals("SUPER_DOOPER", prodCT.getLabel());
+ assertEquals("SUPER_TOK_DEL", prodEP.getLabel());
+ assertEquals("SUPER_DOOPER", consCT.getLabel());
+ assertEquals("JSON", consEP.getLabel());
+
+ assertTrue(prodCT instanceof SuperDooperCarrierTechnologyParameters);
+
+ final SuperDooperCarrierTechnologyParameters superDooperParameters =
+ (SuperDooperCarrierTechnologyParameters) prodCT;
+ assertEquals("somehost:12345", superDooperParameters.getBootstrapServers());
+ assertEquals("0", superDooperParameters.getAcks());
+ assertEquals(25, superDooperParameters.getRetries());
+ assertEquals(98765, superDooperParameters.getBatchSize());
+ assertEquals(21, superDooperParameters.getLingerTime());
+ assertEquals(50505050, superDooperParameters.getBufferMemory());
+ assertEquals("first-group-id", superDooperParameters.getGroupId());
+ assertFalse(superDooperParameters.isEnableAutoCommit());
+ assertEquals(441, superDooperParameters.getAutoCommitTime());
+ assertEquals(987, superDooperParameters.getSessionTimeout());
+ assertEquals("producer-out", superDooperParameters.getProducerTopic());
+ assertEquals(101, superDooperParameters.getConsumerPollTime());
+ assertEquals("some.key.serailizer", superDooperParameters.getKeySerializer());
+ assertEquals("some.value.serailizer", superDooperParameters.getValueSerializer());
+ assertEquals("some.key.deserailizer", superDooperParameters.getKeyDeserializer());
+ assertEquals("some.value.deserailizer", superDooperParameters.getValueDeserializer());
+
+ final String[] consumerTopics = {"consumer-out-0", "consumer-out-1", "consumer-out-2"};
+ assertEquals(Arrays.asList(consumerTopics), superDooperParameters.getConsumerTopicList());
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw an exception");
+ }
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java
new file mode 100644
index 000000000..dad989913
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java
@@ -0,0 +1,266 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import org.junit.Test;
+import org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FILECarrierTechnologyParameters;
+import org.onap.policy.apex.service.engine.main.ApexCommandLineArguments;
+import org.onap.policy.apex.service.parameters.ApexParameterException;
+import org.onap.policy.apex.service.parameters.ApexParameterHandler;
+import org.onap.policy.apex.service.parameters.ApexParameters;
+
+/**
+ * Test for an empty parameter file
+ *
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class ProducerConsumerTests {
+ @Test
+ public void goodParametersTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+
+ assertEquals("MyApexEngine", parameters.getEngineServiceParameters().getName());
+ assertEquals("0.0.1", parameters.getEngineServiceParameters().getVersion());
+ assertEquals(45, parameters.getEngineServiceParameters().getId());
+ assertEquals(19, parameters.getEngineServiceParameters().getInstanceCount());
+ assertEquals(65522, parameters.getEngineServiceParameters().getDeploymentPort());
+ assertEquals("FILE", parameters.getEventOutputParameters().get("FirstProducer")
+ .getCarrierTechnologyParameters().getLabel());
+ assertEquals("JSON",
+ parameters.getEventOutputParameters().get("FirstProducer").getEventProtocolParameters().getLabel());
+ assertEquals("FILE", parameters.getEventOutputParameters().get("MyOtherProducer")
+ .getCarrierTechnologyParameters().getLabel());
+ assertEquals("JSON", parameters.getEventOutputParameters().get("MyOtherProducer")
+ .getEventProtocolParameters().getLabel());
+ assertEquals("FILE", parameters.getEventInputParameters().get("TheFileConsumer1")
+ .getCarrierTechnologyParameters().getLabel());
+ assertEquals("JSON", parameters.getEventInputParameters().get("TheFileConsumer1")
+ .getEventProtocolParameters().getLabel());
+ assertEquals("SUPER_DOOPER", parameters.getEventInputParameters().get("MySuperDooperConsumer1")
+ .getCarrierTechnologyParameters().getLabel());
+ assertEquals("SUPER_TOK_DEL", parameters.getEventInputParameters().get("MySuperDooperConsumer1")
+ .getEventProtocolParameters().getLabel());
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw an exception");
+ }
+ }
+
+ @Test
+ public void noCarrierTechnology() {
+ final String[] args = {"-c", "src/test/resources/parameters/prodConsNoCT.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals("validation error(s) on parameters from \"src/test/resources/parameters/prodConsNoCT.json\"\n"
+ + "Apex parameters invalid\n" + " event input (aConsumer) parameters invalid\n"
+ + " event handler carrierTechnologyParameters not specified or blank", e.getMessage());
+ }
+ }
+
+ @Test
+ public void noEventProcol() {
+ final String[] args = {"-c", "src/test/resources/parameters/prodConsNoEP.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals("validation error(s) on parameters from \"src/test/resources/parameters/prodConsNoEP.json\"\n"
+ + "Apex parameters invalid\n" + " event input (aConsumer) parameters invalid\n"
+ + " fileName not specified or is blank or null, it must be specified as a valid file location\n"
+ + " event output (aProducer) parameters invalid\n"
+ + " event handler eventProtocolParameters not specified or blank", e.getMessage());
+ }
+ }
+
+ @Test
+ public void noCarrierTechnologyParClass() {
+ final String[] args = {"-c", "src/test/resources/parameters/prodConsNoCTParClass.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/prodConsNoCTParClass.json\"\n"
+ + "(ApexParameterRuntimeException):carrier technology \"SUPER_DOOPER\" does not match plugin \"FILE\" in "
+ + "\"com.ericsson.apex.service.engine.event.impl.filecarrierplugin.FILECarrierTechnologyParameters\", "
+ + "specify correct carrier technology parameter plugin in parameter \"parameterClassName\"",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void mismatchCarrierTechnologyParClass() {
+ final String[] args = {"-c", "src/test/resources/parameters/prodConsMismatchCTParClass.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/prodConsMismatchCTParClass.json\"\n"
+ + "(ApexParameterRuntimeException):carrier technology \"SUPER_LOOPER\" does not match plugin \"SUPER_DOOPER\" in "
+ + "\"com.ericsson.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters\", "
+ + "specify correct carrier technology parameter plugin in parameter \"parameterClassName\"",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void wrongTypeCarrierTechnologyParClass() {
+ final String[] args = {"-c", "src/test/resources/parameters/prodConsWrongTypeCTParClass.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/prodConsWrongTypeCTParClass.json\"\n"
+ + "(ApexParameterRuntimeException):could not create default parameters for carrier technology \"SUPER_DOOPER\"\n"
+ + "com.ericsson.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters "
+ + "cannot be cast to com.ericsson.apex.service.parameters.carriertechnology.CarrierTechnologyParameters",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void okFileNameCarrierTechnology() {
+ final String[] args = {"-c", "src/test/resources/parameters/prodConsOKFileName.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+ final FILECarrierTechnologyParameters fileParams = (FILECarrierTechnologyParameters) parameters
+ .getEventOutputParameters().get("aProducer").getCarrierTechnologyParameters();
+ assertEquals("/tmp/aaa.json", fileParams.getFileName());
+ assertEquals(false, fileParams.isStandardError());
+ assertEquals(false, fileParams.isStandardIO());
+ assertEquals(false, fileParams.isStreamingMode());
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw an exception");
+ }
+ }
+
+ @Test
+ public void badFileNameCarrierTechnology() {
+ final String[] args = {"-c", "src/test/resources/parameters/prodConsBadFileName.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/prodConsBadFileName.json\"\n"
+ + "Apex parameters invalid\n" + " event output (aProducer) parameters invalid\n"
+ + " fileName not specified or is blank or null, it must be specified as a valid file location",
+ e.getMessage());
+ }
+ }
+
+
+ @Test
+ public void badEventProtocolParClass() {
+ final String[] args = {"-c", "src/test/resources/parameters/prodConsBadEPParClass.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/prodConsBadEPParClass.json\"\n"
+ + "(ApexParameterRuntimeException):event protocol \"SUPER_TOK_DEL\" does not match plugin \"JSON\" in "
+ + "\"com.ericsson.apex.service.engine.event.impl.jsonprotocolplugin.JSONEventProtocolParameters\", "
+ + "specify correct event protocol parameter plugin in parameter \"parameterClassName\"",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void noEventProtocolParClass() {
+ final String[] args = {"-c", "src/test/resources/parameters/prodConsNoEPParClass.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/prodConsNoEPParClass.json\"\n"
+ + "(ApexParameterRuntimeException):event protocol \"SUPER_TOK_DEL\" does not match plugin \"JSON\" in "
+ + "\"com.ericsson.apex.service.engine.event.impl.jsonprotocolplugin.JSONEventProtocolParameters\", "
+ + "specify correct event protocol parameter plugin in parameter \"parameterClassName\"",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void mismatchEventProtocolParClass() {
+ final String[] args = {"-c", "src/test/resources/parameters/prodConsMismatchEPParClass.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/prodConsMismatchEPParClass.json\"\n"
+ + "(ApexParameterRuntimeException):event protocol \"SUPER_TOK_BEL\" does not match plugin \"SUPER_TOK_DEL\" in "
+ + "\"com.ericsson.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters\", "
+ + "specify correct event protocol parameter plugin in parameter \"parameterClassName\"",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void wrongTypeEventProtocolParClass() {
+ final String[] args = {"-c", "src/test/resources/parameters/prodConsWrongTypeEPParClass.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "error reading parameters from \"src/test/resources/parameters/prodConsWrongTypeEPParClass.json\"\n"
+ + "(ApexParameterRuntimeException):could not create default parameters for event protocol \"SUPER_TOK_DEL\"\n"
+ + "com.ericsson.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters "
+ + "cannot be cast to com.ericsson.apex.service.parameters.eventprotocol.EventProtocolParameters",
+ e.getMessage());
+ }
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
new file mode 100644
index 000000000..62e27eac9
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/SyncParameterTests.java
@@ -0,0 +1,362 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.util.Arrays;
+
+import org.junit.Test;
+import org.onap.policy.apex.service.engine.main.ApexCommandLineArguments;
+import org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters;
+import org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters;
+import org.onap.policy.apex.service.parameters.ApexParameterException;
+import org.onap.policy.apex.service.parameters.ApexParameterHandler;
+import org.onap.policy.apex.service.parameters.ApexParameters;
+import org.onap.policy.apex.service.parameters.carriertechnology.CarrierTechnologyParameters;
+import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
+import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolParameters;
+
+/**
+ * Test for an empty parameter file
+ *
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class SyncParameterTests {
+ @Test
+ public void syncBadNoSyncWithPeer() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json\"\n"
+ + "Apex parameters invalid\n"
+ + " parameter \\\"synchronousPeer\\\" is illegal on non synchronous event output \"SyncProducer0\"",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void syncBadNotSyncWithPeer() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json\"\n"
+ + "Apex parameters invalid\n"
+ + " parameter \\\"synchronousPeer\\\" is illegal on non synchronous event output \"SyncProducer0\"",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void syncBadSyncBadPeers() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsBadPeers.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/syncBadParamsBadPeers.json\"\n"
+ + "Apex parameters invalid\n"
+ + " specified \"synchronousPeer\" parameter value \"SyncConsumer1\" on event input \"SyncConsumer0\" does not exist or is an invalid peer for this event handler\n"
+ + " specified \"synchronousPeer\" parameter value \"SyncConsumer0\" on event input \"SyncConsumer1\" does not exist or is an invalid peer for this event handler\n"
+ + " specified \"synchronousPeer\" parameter value \"SyncProducer1\" on event output \"SyncProducer0\" does not exist or is an invalid peer for this event handler\n"
+ + " specified \"synchronousPeer\" parameter value \"SyncProducer0\" on event output \"SyncProducer1\" does not exist or is an invalid peer for this event handler",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void syncBadSyncInvalidTimeout() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsInvalidTimeout.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/syncBadParamsInvalidTimeout.json\"\n"
+ + "Apex parameters invalid\n"
+ + " parameter \\\"synchronousTimeout\\\" value \"-1\" is illegal on synchronous event input \"SyncConsumer0\", specify a non-negative timeout value in milliseconds\n"
+ + " parameter \\\"synchronousTimeout\\\" value \"-99999999\" is illegal on synchronous event input \"SyncConsumer1\", specify a non-negative timeout value in milliseconds\n"
+ + " parameter \\\"synchronousTimeout\\\" value \"-10\" is illegal on synchronous event output \"SyncProducer0\", specify a non-negative timeout value in milliseconds\n"
+ + " parameter \\\"synchronousTimeout\\\" value \"-3\" is illegal on synchronous event output \"SyncProducer1\", specify a non-negative timeout value in milliseconds\n"
+ + " synchronous timeout of event input \"SyncConsumer0\" and event output \"SyncProducer0\" [-1/-10] do not match\n"
+ + " synchronous timeout of event input \"SyncConsumer1\" and event output \"SyncProducer1\" [-99999999/-3] do not match",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void syncBadSyncBadTimeout() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsBadTimeout.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/syncBadParamsBadTimeout.json\"\n"
+ + "Apex parameters invalid\n"
+ + " parameter \\\"synchronousTimeout\\\" is illegal on non synchronous event output \"MyOtherProducer\"",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void syncBadSyncUnpairedTimeout() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncBadParamsUnpairedTimeout.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/syncBadParamsUnpairedTimeout.json\"\n"
+ + "Apex parameters invalid\n"
+ + " synchronous timeout of event input \"SyncConsumer0\" and event output \"SyncProducer0\" [1/10] do not match\n"
+ + " synchronous timeout of event input \"SyncConsumer1\" and event output \"SyncProducer1\" [99999999/3] do not match",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void syncGoodSyncGoodTimeoutProducer() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncGoodParamsProducerTimeout.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+ assertEquals(12345, parameters.getEventInputParameters().get("SyncConsumer0")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ assertEquals(1, parameters.getEventInputParameters().get("SyncConsumer1")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ assertEquals(12345, parameters.getEventOutputParameters().get("SyncProducer0")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ assertEquals(1, parameters.getEventOutputParameters().get("SyncProducer1")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ } catch (final Exception e) {
+ fail("This test should not throw an exception");
+ }
+ }
+
+ @Test
+ public void syncGoodSyncGoodTimeoutConsumer() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncGoodParamsConsumerTimeout.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+ assertEquals(12345, parameters.getEventInputParameters().get("SyncConsumer0")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ assertEquals(1, parameters.getEventInputParameters().get("SyncConsumer1")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ assertEquals(12345, parameters.getEventOutputParameters().get("SyncProducer0")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ assertEquals(1, parameters.getEventOutputParameters().get("SyncProducer1")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ } catch (final Exception e) {
+ fail("This test should not throw an exception");
+ }
+ }
+
+ @Test
+ public void syncGoodSyncGoodTimeoutBoth() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncGoodParamsBothTimeout.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+ assertEquals(12345, parameters.getEventInputParameters().get("SyncConsumer0")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ assertEquals(1, parameters.getEventInputParameters().get("SyncConsumer1")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ assertEquals(12345, parameters.getEventOutputParameters().get("SyncProducer0")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ assertEquals(1, parameters.getEventOutputParameters().get("SyncProducer1")
+ .getPeerTimeout(EventHandlerPeeredMode.SYNCHRONOUS));
+ } catch (final Exception e) {
+ fail("This test should not throw an exception");
+ }
+ }
+
+ @Test
+ public void syncUnusedConsumerPeers() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncUnusedConsumerPeers.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/syncUnusedConsumerPeers.json\"\n"
+ + "Apex parameters invalid\n"
+ + " value of parameter \"synchronousPeer\" on event output \"SyncProducer1\" must be unique, it s used on another event output\n"
+ + ""
+ + " synchronous peers of event input \"SyncConsumer1\" and event output \"SyncProducer1/SyncConsumer0\" do not match",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void syncMismatchedPeers() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncMismatchedPeers.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/syncMismatchedPeers.json\"\n"
+ + "Apex parameters invalid\n"
+ + " synchronous peers of event input \"SyncConsumer0\" and event output \"SyncProducer0/SyncConsumer1\" do not match\n"
+ + " synchronous peers of event input \"SyncConsumer1\" and event output \"SyncProducer1/SyncConsumer0\" do not match",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void syncUnusedProducerPeers() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncUnusedProducerPeers.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/syncUnusedProducerPeers.json\"\n"
+ + "Apex parameters invalid\n"
+ + " value of parameter \"synchronousPeer\" on event input \"SyncConsumer1\" must be unique, it s used on another event input\n"
+ + " synchronous peers of event input \"SyncConsumer0\" and event output \"SyncProducer1/SyncConsumer1\" do not match",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void syncMismatchedTimeout() throws ApexParameterException {
+ final String[] args = {"-c", "src/test/resources/parameters/syncUnusedProducerPeers.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ new ApexParameterHandler().getParameters(arguments);
+ fail("This test should throw an exception");
+ } catch (final ApexParameterException e) {
+ assertEquals(
+ "validation error(s) on parameters from \"src/test/resources/parameters/syncUnusedProducerPeers.json\"\n"
+ + "Apex parameters invalid\n"
+ + " value of parameter \"synchronousPeer\" on event input \"SyncConsumer1\" must be unique, it s used on another event input\n"
+ + " synchronous peers of event input \"SyncConsumer0\" and event output \"SyncProducer1/SyncConsumer1\" do not match",
+ e.getMessage());
+ }
+ }
+
+ @Test
+ public void syncGoodParametersTest() {
+ final String[] args = {"-c", "src/test/resources/parameters/SyncGoodParams.json"};
+ final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args);
+
+ try {
+ final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
+
+ assertEquals("MyApexEngine", parameters.getEngineServiceParameters().getName());
+ assertEquals("0.0.1", parameters.getEngineServiceParameters().getVersion());
+ assertEquals(45, parameters.getEngineServiceParameters().getId());
+ assertEquals(19, parameters.getEngineServiceParameters().getInstanceCount());
+ assertEquals(65522, parameters.getEngineServiceParameters().getDeploymentPort());
+
+ final CarrierTechnologyParameters prodCT0 =
+ parameters.getEventOutputParameters().get("SyncProducer0").getCarrierTechnologyParameters();
+ final EventProtocolParameters prodEP0 =
+ parameters.getEventOutputParameters().get("SyncProducer0").getEventProtocolParameters();
+ final CarrierTechnologyParameters consCT0 =
+ parameters.getEventInputParameters().get("SyncConsumer0").getCarrierTechnologyParameters();
+ final EventProtocolParameters consEP0 =
+ parameters.getEventInputParameters().get("SyncConsumer0").getEventProtocolParameters();
+ final CarrierTechnologyParameters prodCT1 =
+ parameters.getEventOutputParameters().get("SyncProducer1").getCarrierTechnologyParameters();
+ final EventProtocolParameters prodEP1 =
+ parameters.getEventOutputParameters().get("SyncProducer1").getEventProtocolParameters();
+ final CarrierTechnologyParameters consCT1 =
+ parameters.getEventInputParameters().get("SyncConsumer1").getCarrierTechnologyParameters();
+ final EventProtocolParameters consEP1 =
+ parameters.getEventInputParameters().get("SyncConsumer1").getEventProtocolParameters();
+
+ assertEquals("FILE", prodCT0.getLabel());
+ assertEquals("JSON", prodEP0.getLabel());
+ assertEquals("FILE", consCT0.getLabel());
+ assertEquals("JSON", consEP0.getLabel());
+ assertEquals("FILE", prodCT1.getLabel());
+ assertEquals("JSON", prodEP1.getLabel());
+ assertEquals("SUPER_DOOPER", consCT1.getLabel());
+ assertEquals("SUPER_TOK_DEL", consEP1.getLabel());
+
+ assertTrue(consCT1 instanceof SuperDooperCarrierTechnologyParameters);
+ assertTrue(consEP1 instanceof SuperTokenDelimitedEventProtocolParameters);
+
+ final SuperDooperCarrierTechnologyParameters superDooperParameters =
+ (SuperDooperCarrierTechnologyParameters) consCT1;
+ assertEquals("localhost:9092", superDooperParameters.getBootstrapServers());
+ assertEquals("all", superDooperParameters.getAcks());
+ assertEquals(0, superDooperParameters.getRetries());
+ assertEquals(16384, superDooperParameters.getBatchSize());
+ assertEquals(1, superDooperParameters.getLingerTime());
+ assertEquals(33554432, superDooperParameters.getBufferMemory());
+ assertEquals("default-group-id", superDooperParameters.getGroupId());
+ assertTrue(superDooperParameters.isEnableAutoCommit());
+ assertEquals(1000, superDooperParameters.getAutoCommitTime());
+ assertEquals(30000, superDooperParameters.getSessionTimeout());
+ assertEquals("apex-out", superDooperParameters.getProducerTopic());
+ assertEquals(100, superDooperParameters.getConsumerPollTime());
+ assertEquals("org.apache.superDooper.common.serialization.StringSerializer",
+ superDooperParameters.getKeySerializer());
+ assertEquals("org.apache.superDooper.common.serialization.StringSerializer",
+ superDooperParameters.getValueSerializer());
+ assertEquals("org.apache.superDooper.common.serialization.StringDeserializer",
+ superDooperParameters.getKeyDeserializer());
+ assertEquals("org.apache.superDooper.common.serialization.StringDeserializer",
+ superDooperParameters.getValueDeserializer());
+
+ final String[] consumerTopics = {"apex-in"};
+ assertEquals(Arrays.asList(consumerTopics), superDooperParameters.getConsumerTopicList());
+ } catch (final ApexParameterException e) {
+ fail("This test should not throw an exception");
+ }
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java
new file mode 100644
index 000000000..ffbd1c0e5
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperCarrierTechnologyParameters.java
@@ -0,0 +1,392 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters.dummyclasses;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Properties;
+
+import org.onap.policy.apex.model.basicmodel.service.ParameterService;
+import org.onap.policy.apex.service.parameters.carriertechnology.CarrierTechnologyParameters;
+
+/**
+ * Apex parameters for SuperDooper as an event carrier technology.
+ *
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class SuperDooperCarrierTechnologyParameters extends CarrierTechnologyParameters {
+ // Default parameter values
+ private static final String DEFAULT_ACKS = "all";
+ private static final String DEFAULT_BOOTSTRAP_SERVERS = "localhost:9092";
+ private static final int DEFAULT_RETRIES = 0;
+ private static final int DEFAULT_BATCH_SIZE = 16384;
+ private static final int DEFAULT_LINGER_TIME = 1;
+ private static final long DEFAULT_BUFFER_MEMORY = 33554432;
+ private static final String DEFAULT_GROUP_ID = "default-group-id";
+ private static final boolean DEFAULT_ENABLE_AUTO_COMMIT = true;
+ private static final int DEFAULT_AUTO_COMMIT_TIME = 1000;
+ private static final int DEFAULT_SESSION_TIMEOUT = 30000;
+ private static final String DEFAULT_PRODUCER_TOPIC = "apex-out";
+ private static final int DEFAULT_CONSUMER_POLL_TIME = 100;
+ private static final String[] DEFAULT_CONSUMER_TOPIC_LIST = {"apex-in"};
+ private static final String DEFAULT_KEY_SERIALIZER = "org.apache.superDooper.common.serialization.StringSerializer";
+ private static final String DEFAULT_VALUE_SERIALIZER =
+ "org.apache.superDooper.common.serialization.StringSerializer";
+ private static final String DEFAULT_KEY_DESERIALIZER =
+ "org.apache.superDooper.common.serialization.StringDeserializer";
+ private static final String DEFAULT_VALUE_DESERIALIZER =
+ "org.apache.superDooper.common.serialization.StringDeserializer";
+
+ // Parameter property map tokens
+ private static final String PROPERTY_BOOTSTRAP_SERVERS = "bootstrap.servers";
+ private static final String PROPERTY_ACKS = "acks";
+ private static final String PROPERTY_RETRIES = "retries";
+ private static final String PROPERTY_BATCH_SIZE = "batch.size";
+ private static final String PROPERTY_LINGER_TIME = "linger.ms";
+ private static final String PROPERTY_BUFFER_MEMORY = "buffer.memory";
+ private static final String PROPERTY_GROUP_ID = "group.id";
+ private static final String PROPERTY_ENABLE_AUTO_COMMIT = "enable.auto.commit";
+ private static final String PROPERTY_AUTO_COMMIT_TIME = "auto.commit.interval.ms";
+ private static final String PROPERTY_SESSION_TIMEOUT = "session.timeout.ms";
+ private static final String PROPERTY_KEY_SERIALIZER = "key.serializer";
+ private static final String PROPERTY_VALUE_SERIALIZER = "value.serializer";
+ private static final String PROPERTY_KEY_DESERIALIZER = "key.deserializer";
+ private static final String PROPERTY_VALUE_DESERIALIZER = "value.deserializer";
+
+ // superDooper carrier parameters
+ private final String bootstrapServers = DEFAULT_BOOTSTRAP_SERVERS;
+ private final String acks = DEFAULT_ACKS;
+ private final int retries = DEFAULT_RETRIES;
+ private final int batchSize = DEFAULT_BATCH_SIZE;
+ private final int lingerTime = DEFAULT_LINGER_TIME;
+ private final long bufferMemory = DEFAULT_BUFFER_MEMORY;
+ private final String groupId = DEFAULT_GROUP_ID;
+ private final boolean enableAutoCommit = DEFAULT_ENABLE_AUTO_COMMIT;
+ private final int autoCommitTime = DEFAULT_AUTO_COMMIT_TIME;
+ private final int sessionTimeout = DEFAULT_SESSION_TIMEOUT;
+ private final String producerTopic = DEFAULT_PRODUCER_TOPIC;
+ private final int consumerPollTime = DEFAULT_CONSUMER_POLL_TIME;
+ private final String[] consumerTopicList = DEFAULT_CONSUMER_TOPIC_LIST;
+ private final String keySerializer = DEFAULT_KEY_SERIALIZER;
+ private final String valueSerializer = DEFAULT_VALUE_SERIALIZER;
+ private final String keyDeserializer = DEFAULT_KEY_DESERIALIZER;
+ private final String valueDeserializer = DEFAULT_VALUE_DESERIALIZER;
+
+ /**
+ * Constructor to create a file carrier technology parameters instance and register the instance
+ * with the parameter service.
+ */
+ public SuperDooperCarrierTechnologyParameters() {
+ super(SuperDooperCarrierTechnologyParameters.class.getCanonicalName());
+ ParameterService.registerParameters(SuperDooperCarrierTechnologyParameters.class, this);
+
+ // Set the carrier technology properties for the FILE carrier technology
+ this.setLabel("SUPER_DOOPER");
+ this.setEventProducerPluginClass(
+ "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperEventProducer");
+ this.setEventConsumerPluginClass(
+ "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperEventSubscriber");
+ }
+
+ /**
+ * Gets the superDooper producer properties.
+ *
+ * @return the superDooper producer properties
+ */
+ public Properties getSuperDooperProducerProperties() {
+ final Properties superDooperProperties = new Properties();
+
+ superDooperProperties.put(PROPERTY_BOOTSTRAP_SERVERS, bootstrapServers);
+ superDooperProperties.put(PROPERTY_ACKS, acks);
+ superDooperProperties.put(PROPERTY_RETRIES, retries);
+ superDooperProperties.put(PROPERTY_BATCH_SIZE, batchSize);
+ superDooperProperties.put(PROPERTY_LINGER_TIME, lingerTime);
+ superDooperProperties.put(PROPERTY_BUFFER_MEMORY, bufferMemory);
+ superDooperProperties.put(PROPERTY_KEY_SERIALIZER, keySerializer);
+ superDooperProperties.put(PROPERTY_VALUE_SERIALIZER, valueSerializer);
+
+ return superDooperProperties;
+ }
+
+ /**
+ * Gets the superDooper consumer properties.
+ *
+ * @return the superDooper consumer properties
+ */
+ public Properties getSuperDooperConsumerProperties() {
+ final Properties superDooperProperties = new Properties();
+
+ superDooperProperties.put(PROPERTY_BOOTSTRAP_SERVERS, bootstrapServers);
+ superDooperProperties.put(PROPERTY_GROUP_ID, groupId);
+ superDooperProperties.put(PROPERTY_ENABLE_AUTO_COMMIT, enableAutoCommit);
+ superDooperProperties.put(PROPERTY_AUTO_COMMIT_TIME, autoCommitTime);
+ superDooperProperties.put(PROPERTY_SESSION_TIMEOUT, sessionTimeout);
+ superDooperProperties.put(PROPERTY_KEY_DESERIALIZER, keyDeserializer);
+ superDooperProperties.put(PROPERTY_VALUE_DESERIALIZER, valueDeserializer);
+
+ return superDooperProperties;
+ }
+
+ /**
+ * Gets the bootstrap servers.
+ *
+ * @return the bootstrap servers
+ */
+ public String getBootstrapServers() {
+ return bootstrapServers;
+ }
+
+ /**
+ * Gets the acks.
+ *
+ * @return the acks
+ */
+ public String getAcks() {
+ return acks;
+ }
+
+ /**
+ * Gets the retries.
+ *
+ * @return the retries
+ */
+ public int getRetries() {
+ return retries;
+ }
+
+ /**
+ * Gets the batch size.
+ *
+ * @return the batch size
+ */
+ public int getBatchSize() {
+ return batchSize;
+ }
+
+ /**
+ * Gets the linger time.
+ *
+ * @return the linger time
+ */
+ public int getLingerTime() {
+ return lingerTime;
+ }
+
+ /**
+ * Gets the buffer memory.
+ *
+ * @return the buffer memory
+ */
+ public long getBufferMemory() {
+ return bufferMemory;
+ }
+
+ /**
+ * Gets the group id.
+ *
+ * @return the group id
+ */
+ public String getGroupId() {
+ return groupId;
+ }
+
+ /**
+ * Checks if is enable auto commit.
+ *
+ * @return true, if checks if is enable auto commit
+ */
+ public boolean isEnableAutoCommit() {
+ return enableAutoCommit;
+ }
+
+ /**
+ * Gets the auto commit time.
+ *
+ * @return the auto commit time
+ */
+ public int getAutoCommitTime() {
+ return autoCommitTime;
+ }
+
+ /**
+ * Gets the session timeout.
+ *
+ * @return the session timeout
+ */
+ public int getSessionTimeout() {
+ return sessionTimeout;
+ }
+
+ /**
+ * Gets the producer topic.
+ *
+ * @return the producer topic
+ */
+ public String getProducerTopic() {
+ return producerTopic;
+ }
+
+ /**
+ * Gets the consumer poll time.
+ *
+ * @return the consumer poll time
+ */
+ public long getConsumerPollTime() {
+ return consumerPollTime;
+ }
+
+ /**
+ * Gets the consumer topic list.
+ *
+ * @return the consumer topic list
+ */
+ public Collection<String> getConsumerTopicList() {
+ return Arrays.asList(consumerTopicList);
+ }
+
+ /**
+ * Gets the key serializer.
+ *
+ * @return the key serializer
+ */
+ public String getKeySerializer() {
+ return keySerializer;
+ }
+
+ /**
+ * Gets the value serializer.
+ *
+ * @return the value serializer
+ */
+ public String getValueSerializer() {
+ return valueSerializer;
+ }
+
+ /**
+ * Gets the key deserializer.
+ *
+ * @return the key deserializer
+ */
+ public String getKeyDeserializer() {
+ return keyDeserializer;
+ }
+
+ /**
+ * Gets the value deserializer.
+ *
+ * @return the value deserializer
+ */
+ public String getValueDeserializer() {
+ return valueDeserializer;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.apps.uservice.parameters.ApexParameterValidator#validate()
+ */
+ @Override
+ public String validate() {
+ final StringBuilder errorMessageBuilder = new StringBuilder();
+
+ errorMessageBuilder.append(super.validate());
+
+ if (bootstrapServers == null || bootstrapServers.trim().length() == 0) {
+ errorMessageBuilder
+ .append(" bootstrapServers not specified, must be specified as a string of form host:port\n");
+ }
+
+ if (acks == null || acks.trim().length() == 0) {
+ errorMessageBuilder.append(" acks not specified, must be specified as a string with values [0|1|all]\n");
+ }
+
+ if (retries < 0) {
+ errorMessageBuilder.append(" retries [" + retries + "] invalid, must be specified as retries >= 0\n");
+ }
+
+ if (batchSize < 0) {
+ errorMessageBuilder
+ .append(" batchSize [" + batchSize + "] invalid, must be specified as batchSize >= 0\n");
+ }
+
+ if (lingerTime < 0) {
+ errorMessageBuilder
+ .append(" lingerTime [" + lingerTime + "] invalid, must be specified as lingerTime >= 0\n");
+ }
+
+ if (bufferMemory < 0) {
+ errorMessageBuilder
+ .append(" bufferMemory [" + bufferMemory + "] invalid, must be specified as bufferMemory >= 0\n");
+ }
+
+ if (groupId == null || groupId.trim().length() == 0) {
+ errorMessageBuilder.append(" groupId not specified, must be specified as a string\n");
+ }
+
+ if (autoCommitTime < 0) {
+ errorMessageBuilder.append(
+ " autoCommitTime [" + autoCommitTime + "] invalid, must be specified as autoCommitTime >= 0\n");
+ }
+
+ if (sessionTimeout < 0) {
+ errorMessageBuilder.append(
+ " sessionTimeout [" + sessionTimeout + "] invalid, must be specified as sessionTimeout >= 0\n");
+ }
+
+ if (producerTopic == null || producerTopic.trim().length() == 0) {
+ errorMessageBuilder.append(" producerTopic not specified, must be specified as a string\n");
+ }
+
+ if (consumerPollTime < 0) {
+ errorMessageBuilder.append(" consumerPollTime [" + consumerPollTime
+ + "] invalid, must be specified as consumerPollTime >= 0\n");
+ }
+
+ if (consumerTopicList == null || consumerTopicList.length == 0) {
+ errorMessageBuilder.append(" consumerTopicList not specified, must be specified as a list of strings\n");
+ }
+
+ for (final String consumerTopic : consumerTopicList) {
+ if (consumerTopic == null || consumerTopic.trim().length() == 0) {
+ errorMessageBuilder.append(" invalid consumer topic \"" + consumerTopic
+ + "\" specified on consumerTopicList, consumer topics must be specified as strings\n");
+ }
+ }
+
+ if (keySerializer == null || keySerializer.trim().length() == 0) {
+ errorMessageBuilder.append(" keySerializer not specified, must be specified as a string\n");
+ }
+
+ if (valueSerializer == null || valueSerializer.trim().length() == 0) {
+ errorMessageBuilder.append(" valueSerializer not specified, must be specified as a string\n");
+ }
+
+ if (keyDeserializer == null || keyDeserializer.trim().length() == 0) {
+ errorMessageBuilder.append(" keyDeserializer not specified, must be specified as a string\n");
+ }
+
+ if (valueDeserializer == null || valueDeserializer.trim().length() == 0) {
+ errorMessageBuilder.append(" valueDeserializer not specified, must be specified as a string\n");
+ }
+
+ return errorMessageBuilder.toString();
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java
new file mode 100644
index 000000000..6d7c6ff7e
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperDistributorParameters.java
@@ -0,0 +1,89 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters.dummyclasses;
+
+import org.onap.policy.apex.context.parameters.DistributorParameters;
+import org.onap.policy.apex.model.basicmodel.service.ParameterService;
+
+/**
+ * Distributor parameters for the Super Dooper Distributor
+ *
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ * @version
+ */
+public class SuperDooperDistributorParameters extends DistributorParameters {
+ // Constants for SuperDooper configuration file locations
+ public static final String DEFAULT_SUPER_DOOPER_DISTRIBUTION_CONFIG_FILE = "superDooper/superDooper.xml";
+ public static final String DEFAULT_SUPER_DOOPER_DISTRIBUTION_JGROUPS_FILE =
+ "superDooper/jgroups-superDooper-apex.xml";
+ public static final boolean DEFAULT_SUPER_DOOPER_JAVA_NET_PREFER_IPV4_STACK = true;
+ public static final String DEFAULT_INFINSPAN_JGROUPS_BIND_ADDRESS = "localhost";
+
+ // SuperDooper configuration file names
+ private String configFile = DEFAULT_SUPER_DOOPER_DISTRIBUTION_CONFIG_FILE;
+ private String jgroupsFile = DEFAULT_SUPER_DOOPER_DISTRIBUTION_JGROUPS_FILE;
+ private boolean preferIPv4Stack = DEFAULT_SUPER_DOOPER_JAVA_NET_PREFER_IPV4_STACK;
+ private String jGroupsBindAddress = DEFAULT_INFINSPAN_JGROUPS_BIND_ADDRESS;
+
+ public SuperDooperDistributorParameters() {
+ super(SuperDooperDistributorParameters.class.getCanonicalName());
+ ParameterService.registerParameters(SuperDooperDistributorParameters.class, this);
+ ParameterService.registerParameters(DistributorParameters.class, this);
+ }
+
+ public String getConfigFile() {
+ return configFile;
+ }
+
+ public void setConfigFile(final String configFile) {
+ this.configFile = configFile;
+ }
+
+ public String getJgroupsFile() {
+ return jgroupsFile;
+ }
+
+ public void setJgroupsFile(final String jgroupsFile) {
+ this.jgroupsFile = jgroupsFile;
+ }
+
+ public boolean preferIPv4Stack() {
+ return preferIPv4Stack;
+ }
+
+ public void setPreferIPv4Stack(final boolean preferIPv4Stack) {
+ this.preferIPv4Stack = preferIPv4Stack;
+ }
+
+ public String getjGroupsBindAddress() {
+ return jGroupsBindAddress;
+ }
+
+ public void setjGroupsBindAddress(final String jGroupsBindAddress) {
+ this.jGroupsBindAddress = jGroupsBindAddress;
+ }
+
+ @Override
+ public String toString() {
+ return "SuperDooperDistributorParameters [configFile=" + configFile + ", jgroupsFile=" + jgroupsFile
+ + ", preferIPv4Stack=" + preferIPv4Stack + ", jGroupsBindAddress=" + jGroupsBindAddress + "]";
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java
new file mode 100644
index 000000000..e405107f0
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventProducer.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters.dummyclasses;
+
+import org.onap.policy.apex.service.engine.event.ApexEventException;
+import org.onap.policy.apex.service.engine.event.ApexEventProducer;
+import org.onap.policy.apex.service.engine.event.PeeredReference;
+import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters;
+import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+/**
+ * @author John Keeney (john.keeney@ericsson.com)
+ */
+public class SuperDooperEventProducer implements ApexEventProducer {
+
+ private static final XLogger LOGGER = XLoggerFactory.getXLogger(SuperDooperEventProducer.class);
+
+ private String name;
+
+ public SuperDooperEventProducer() {}
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.ericsson.apex.service.engine.event.ApexEventProducer#init(java.lang.String,
+ * com.ericsson.apex.service.parameters.producer.ProducerParameters)
+ */
+ @Override
+ public void init(final String name, final EventHandlerParameters producerParameters) throws ApexEventException {
+ this.name = name;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.ericsson.apex.service.engine.event.ApexEventProducer#getName()
+ */
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * com.ericsson.apex.service.engine.event.ApexEventProducer#getPeeredReference(com.ericsson.apex
+ * .service.parameters.eventhandler.EventHandlerPeeredMode)
+ */
+ @Override
+ public PeeredReference getPeeredReference(final EventHandlerPeeredMode peeredMode) {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * com.ericsson.apex.service.engine.event.ApexEventProducer#setPeeredReference(com.ericsson.apex
+ * .service.parameters.eventhandler.EventHandlerPeeredMode,
+ * com.ericsson.apex.service.engine.event.PeeredReference)
+ */
+ @Override
+ public void setPeeredReference(final EventHandlerPeeredMode peeredMode, final PeeredReference peeredReference) {}
+
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.ericsson.apex.service.engine.event.ApexEventProducer#sendEvent(long,
+ * java.lang.String, java.lang.Object)
+ */
+ @Override
+ public void sendEvent(final long executionId, final String eventName, final Object event) {
+ LOGGER.info("Sending Event: " + this.getClass().getCanonicalName() + ":" + this.name + " ... event ("
+ + eventName + ") : " + event);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.ericsson.apex.service.engine.event.ApexEventProducer#stop()
+ */
+ @Override
+ public void stop() {}
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventSubscriber.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventSubscriber.java
new file mode 100644
index 000000000..c791d31e1
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperEventSubscriber.java
@@ -0,0 +1,82 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters.dummyclasses;
+
+import org.onap.policy.apex.service.engine.event.ApexEventConsumer;
+import org.onap.policy.apex.service.engine.event.ApexEventException;
+import org.onap.policy.apex.service.engine.event.ApexEventReceiver;
+import org.onap.policy.apex.service.engine.event.PeeredReference;
+import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters;
+import org.onap.policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+public class SuperDooperEventSubscriber implements ApexEventConsumer {
+
+ private static final XLogger LOGGER = XLoggerFactory.getXLogger(SuperDooperEventSubscriber.class);
+
+ private String name;
+
+ public SuperDooperEventSubscriber() {}
+
+ @Override
+ public void init(final String name, final EventHandlerParameters consumerParameters,
+ final ApexEventReceiver apexEventReceiver) throws ApexEventException {
+ this.name = name;
+ LOGGER.info("Initialising Apex Consumer: " + this.getClass().getCanonicalName() + ":" + this.name);
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.service.engine.event.ApexEventConsumer#getPeeredReference(org.onap.
+ * policy.apex .service.parameters.eventhandler.EventHandlerPeeredMode)
+ */
+ @Override
+ public PeeredReference getPeeredReference(final EventHandlerPeeredMode peeredMode) {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.onap.policy.apex.service.engine.event.ApexEventConsumer#setPeeredReference(org.onap.
+ * policy.apex.service.parameters.eventhandler.EventHandlerPeeredMode,
+ * org.onap.policy.apex.service.engine.event.PeeredReference)
+ */
+ @Override
+ public void setPeeredReference(final EventHandlerPeeredMode peeredMode, final PeeredReference peeredReference) {}
+
+ @Override
+ public void start() {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void stop() {}
+
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java
new file mode 100644
index 000000000..3af772985
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperDooperExecutorParameters.java
@@ -0,0 +1,40 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters.dummyclasses;
+
+import org.onap.policy.apex.core.engine.ExecutorParameters;
+
+/**
+ * Default Executor parameters for MVEL
+ *
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ * @version
+ */
+public class SuperDooperExecutorParameters extends ExecutorParameters {
+ public SuperDooperExecutorParameters() {
+ this.setTaskExecutorPluginClass(
+ "org.onap.policy.apex.service.engine.parameters.dummyclasses.DummyTaskExecutor");
+ this.setTaskSelectionExecutorPluginClass(
+ "org.onap.policy.apex.service.engine.parameters.dummyclasses.DummyTaskSelectExecutor");
+ this.setStateFinalizerExecutorPluginClass(
+ "org.onap.policy.apex.service.engine.parameters.dummyclasses.DummyStateFinalizerExecutor");
+ }
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventConverter.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventConverter.java
new file mode 100644
index 000000000..e807f7fb5
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventConverter.java
@@ -0,0 +1,58 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters.dummyclasses;
+
+import java.util.List;
+
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.service.engine.event.ApexEvent;
+import org.onap.policy.apex.service.engine.event.ApexEventProtocolConverter;
+import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolParameters;
+
+public final class SuperTokenDelimitedEventConverter implements ApexEventProtocolConverter {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.onap.policy.apex.service.engine.event.ApexEventConverter#toApexEvent(java.lang.String,
+ * java.lang.Object)
+ */
+ @Override
+ public List<ApexEvent> toApexEvent(final String eventName, final Object eventOfOtherType) throws ApexException {
+ return null;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.onap.policy.apex.service.engine.event.ApexEventConverter#fromApexEvent(org.onap.policy.
+ * apex.service.engine.event.ApexEvent)
+ */
+ @Override
+ public String fromApexEvent(final ApexEvent apexEvent) throws ApexException {
+ return null;
+ }
+
+ @Override
+ public void init(final EventProtocolParameters parameters) {}
+}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
new file mode 100644
index 000000000..99f938e10
--- /dev/null
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
@@ -0,0 +1,54 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.service.engine.parameters.dummyclasses;
+
+import org.onap.policy.apex.model.basicmodel.service.ParameterService;
+import org.onap.policy.apex.service.engine.event.impl.jsonprotocolplugin.JSONEventProtocolParameters;
+import org.onap.policy.apex.service.parameters.eventprotocol.EventProtocolTextTokenDelimitedParameters;
+
+/**
+ * @author Liam Fallon (liam.fallon@ericsson.com)
+ */
+public class SuperTokenDelimitedEventProtocolParameters extends EventProtocolTextTokenDelimitedParameters {
+ /** The label of this carrier technology. */
+ public static final String SUPER_TOKEN_EVENT_PROTOCOL_LABEL = "SUPER_TOK_DEL";
+
+ // Constants for text delimiter tokeb
+ private static final String SUPER_TOKEN_DELIMITER = "SuperToken";
+
+ /**
+ * Constructor to create a JSON event protocol parameter instance and register the instance with
+ * the parameter service.
+ */
+ public SuperTokenDelimitedEventProtocolParameters() {
+ super(JSONEventProtocolParameters.class.getCanonicalName());
+ ParameterService.registerParameters(SuperTokenDelimitedEventProtocolParameters.class, this);
+
+ // Set the event protocol properties for the JSON carrier technology
+ this.setLabel(SUPER_TOKEN_EVENT_PROTOCOL_LABEL);
+
+ // Set the starting and ending delimiters for text blocks of JSON events
+ this.setDelimiterToken(SUPER_TOKEN_DELIMITER);
+
+ // Set the event protocol plugin class
+ this.setEventProtocolPluginClass(SuperTokenDelimitedEventConverter.class.getCanonicalName());
+ }
+}
diff --git a/services/services-engine/src/test/resources/logback-test.xml b/services/services-engine/src/test/resources/logback-test.xml
new file mode 100644
index 000000000..bb9d0c788
--- /dev/null
+++ b/services/services-engine/src/test/resources/logback-test.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ SPDX-License-Identifier: Apache-2.0
+ ============LICENSE_END=========================================================
+-->
+
+<configuration>
+
+ <contextName>Apex</contextName>
+ <statusListener class="ch.qos.logback.core.status.OnConsoleStatusListener" />
+ <property name="LOG_DIR" value="${java.io.tmpdir}/apex_logging/" />
+
+ <!-- USE FOR STD OUT ONLY -->
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <Pattern>%d %contextName [%t] %level %logger{36} - %msg%n</Pattern>
+ </encoder>
+ </appender>
+
+ <root level="info">
+ <appender-ref ref="STDOUT" />
+ </root>
+
+ <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ <file>${LOG_DIR}/apex.log</file>
+ <encoder>
+ <pattern>%d %-5relative [procId=${processId}] [%thread] %-5level
+ %logger{26} - %msg %n %ex{full}</pattern>
+ </encoder>
+ </appender>
+
+ <logger name="org.onap.policy.apex.service.engine.event" level="info" additivity="false">
+ <appender-ref ref="STDOUT" />
+ </logger>
+</configuration>
diff --git a/services/services-engine/src/test/resources/main/DummyModelFile.json b/services/services-engine/src/test/resources/main/DummyModelFile.json
new file mode 100644
index 000000000..b6cf5bd08
--- /dev/null
+++ b/services/services-engine/src/test/resources/main/DummyModelFile.json
@@ -0,0 +1,3 @@
+{
+ "name": "value"
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/badParams.json b/services/services-engine/src/test/resources/parameters/badParams.json
new file mode 100644
index 000000000..c3b96c7ba
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/badParams.json
@@ -0,0 +1,31 @@
+{
+ "engineServiceParameters": {
+ "name": "hello there",
+ "version": "PA1",
+ "id": -45,
+ "instanceCount": -345,
+ "deploymentPort": 65536,
+ "policyModelFileName": "/some/file/name.xml"
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "TheFileConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/blankParams.json b/services/services-engine/src/test/resources/parameters/blankParams.json
new file mode 100644
index 000000000..d874ae98b
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/blankParams.json
@@ -0,0 +1,11 @@
+{
+ "engineServiceParameters": {
+
+ },
+ "eventInputParameters": {
+
+ },
+ "eventOutputParameters": {
+
+ }
+}
diff --git a/services/services-engine/src/test/resources/parameters/empty.json b/services/services-engine/src/test/resources/parameters/empty.json
new file mode 100644
index 000000000..9e26dfeeb
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/empty.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/factoryGoodParams.json b/services/services-engine/src/test/resources/parameters/factoryGoodParams.json
new file mode 100644
index 000000000..54b58ce00
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/factoryGoodParams.json
@@ -0,0 +1,64 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ },
+ "MyOtherProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "TheFileConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ },
+ "MySuperDooperConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/goodParams.json b/services/services-engine/src/test/resources/parameters/goodParams.json
new file mode 100644
index 000000000..c470f3eea
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/goodParams.json
@@ -0,0 +1,64 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ },
+ "MyOtherProducer": {
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "TheFileConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ },
+ "MySuperDooperConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/noParams.json b/services/services-engine/src/test/resources/parameters/noParams.json
new file mode 100644
index 000000000..7a73a41bf
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/noParams.json
@@ -0,0 +1,2 @@
+{
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json
new file mode 100644
index 000000000..217946956
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json
@@ -0,0 +1,42 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FILECarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsBadEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsBadEPParClass.json
new file mode 100644
index 000000000..0900d5bee
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsBadEPParClass.json
@@ -0,0 +1,42 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.event.impl.jsonprotocolplugin.JSONEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsBadFileName.json b/services/services-engine/src/test/resources/parameters/prodConsBadFileName.json
new file mode 100644
index 000000000..2dc506561
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsBadFileName.json
@@ -0,0 +1,42 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": null
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsMismatchCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsMismatchCTParClass.json
new file mode 100644
index 000000000..e8d1a9632
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsMismatchCTParClass.json
@@ -0,0 +1,42 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_LOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsMismatchEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsMismatchEPParClass.json
new file mode 100644
index 000000000..89e905c3a
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsMismatchEPParClass.json
@@ -0,0 +1,42 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_BEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsNoCT.json b/services/services-engine/src/test/resources/parameters/prodConsNoCT.json
new file mode 100644
index 000000000..7bf3024ba
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsNoCT.json
@@ -0,0 +1,42 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FILECarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsNoCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsNoCTParClass.json
new file mode 100644
index 000000000..9c8723a81
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsNoCTParClass.json
@@ -0,0 +1,41 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsNoEP.json b/services/services-engine/src/test/resources/parameters/prodConsNoEP.json
new file mode 100644
index 000000000..122680dbe
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsNoEP.json
@@ -0,0 +1,42 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameterClassName": "org.onap.policy.apex.service.engine.event.impl.filecarrierplugin.FILECarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsNoEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsNoEPParClass.json
new file mode 100644
index 000000000..8aea0ea3e
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsNoEPParClass.json
@@ -0,0 +1,41 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsOKFileName.json b/services/services-engine/src/test/resources/parameters/prodConsOKFileName.json
new file mode 100644
index 000000000..b2424043e
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsOKFileName.json
@@ -0,0 +1,42 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsWrongTypeCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeCTParClass.json
new file mode 100644
index 000000000..6bfab6a99
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeCTParClass.json
@@ -0,0 +1,42 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/prodConsWrongTypeEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeEPParClass.json
new file mode 100644
index 000000000..d72139de8
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeEPParClass.json
@@ -0,0 +1,42 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "aProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "aConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json
new file mode 100644
index 000000000..6468e10a4
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json
@@ -0,0 +1,23 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+ "distributorParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters"
+ }
+ },
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json
new file mode 100644
index 000000000..57a38024d
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json
@@ -0,0 +1,23 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+ "lockManagerParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters"
+ }
+ },
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json
new file mode 100644
index 000000000..a2920303a
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json
@@ -0,0 +1,15 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+ "parameterClassName": "java.lang.Integer"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json
new file mode 100644
index 000000000..598c20bd7
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json
@@ -0,0 +1,23 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+ "persistorParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters"
+ }
+ },
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadParams.json
new file mode 100644
index 000000000..d850ba290
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextBadParams.json
@@ -0,0 +1,15 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+ "parameterClassName": "hello"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json
new file mode 100644
index 000000000..beb049069
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json
@@ -0,0 +1,15 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json
new file mode 100644
index 000000000..d152809fa
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json
@@ -0,0 +1,15 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+ "parameterClassNamelooby": ""
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextNoParams.json b/services/services-engine/src/test/resources/parameters/serviceContextNoParams.json
new file mode 100644
index 000000000..2d6cb4d85
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextNoParams.json
@@ -0,0 +1,15 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json
new file mode 100644
index 000000000..56294a3c7
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters"
+ },
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "MySuperDooperConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextOKDistParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKDistParams.json
new file mode 100644
index 000000000..1aa2abb0b
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextOKDistParams.json
@@ -0,0 +1,48 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+ "contextParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.DistributorParameters"
+ }
+ },
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "MySuperDooperConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextOKFlushParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKFlushParams.json
new file mode 100644
index 000000000..7d9eb6f2e
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextOKFlushParams.json
@@ -0,0 +1,49 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+ "persistorParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.PersistorParameters",
+ "flushPeriod": 123456
+ }
+ },
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "MySuperDooperConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json
new file mode 100644
index 000000000..22991054a
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json
@@ -0,0 +1,59 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "contextParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters",
+ "distributorParameters": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperDistributorParameters",
+ "configFile": "my/lovely/configFile.xml",
+ "jgroupsFile": "holy/stone.xml",
+ "preferIPv4Stack": false,
+ "jGroupsBindAddress": "fatherted"
+ },
+ "lockManagerParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.LockManagerParameters"
+ },
+ "persistorParameters": {
+ "parameterClassName": "org.onap.policy.apex.context.parameters.PersistorParameters",
+ "flushPeriod": 123456
+ }
+ },
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "MySuperDooperConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadParams.json
new file mode 100644
index 000000000..839694af3
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadParams.json
@@ -0,0 +1,18 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ },
+ "ZOOBY": "hello"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json
new file mode 100644
index 000000000..5a28d8985
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json
@@ -0,0 +1,23 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ },
+ "ZOOBY": {
+ "parameterClassNamelooby": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ },
+ "LOOBY": {
+ "parameterClassNamelooby": ""
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json
new file mode 100644
index 000000000..c70fa4c8b
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json
@@ -0,0 +1,23 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ },
+ "ZOOBY": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ },
+ "LOOBY": {
+ "parameterClassName": " "
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json
new file mode 100644
index 000000000..200d8f1a5
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json
@@ -0,0 +1,25 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ },
+ "ZOOBY": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ },
+ "LOOBY": {
+ "parameterClassName": {
+
+ }
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json
new file mode 100644
index 000000000..b96a27409
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json
@@ -0,0 +1,23 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ },
+ "ZOOBY": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ },
+ "LOOBY": {
+ "parameterClassName": "helloworld"
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json
new file mode 100644
index 000000000..f07eaff9d
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json
@@ -0,0 +1,20 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ },
+ "ZOOBY": {
+
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json
new file mode 100644
index 000000000..44d643cd2
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json
@@ -0,0 +1,13 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "someParameter": "someValue"
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json
new file mode 100644
index 000000000..751ac2171
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json
@@ -0,0 +1,40 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "MySuperDooperConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/superDooperParams.json b/services/services-engine/src/test/resources/parameters/superDooperParams.json
new file mode 100644
index 000000000..75820ebaf
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/superDooperParams.json
@@ -0,0 +1,55 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 345,
+ "deploymentPort": 65522
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters",
+ "parameters": {
+ "bootstrapServers": "somehost:12345",
+ "acks": 0,
+ "retries": 25,
+ "batchSize": 98765,
+ "lingerTime": 21,
+ "bufferMemory": 50505050,
+ "groupId": "first-group-id",
+ "enableAutoCommit": false,
+ "autoCommitTime": 441,
+ "sessionTimeout": 987,
+ "producerTopic": "producer-out",
+ "consumerPollTime": 101,
+ "consumerTopicList": [
+ "consumer-out-0",
+ "consumer-out-1",
+ "consumer-out-2"
+ ],
+ "keySerializer": "some.key.serailizer",
+ "valueSerializer": "some.value.serailizer",
+ "keyDeserializer": "some.key.deserailizer",
+ "valueDeserializer": "some.value.deserailizer"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ },
+ "eventInputParameters": {
+ "MySuperDooperConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json b/services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json
new file mode 100644
index 000000000..6393d4864
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json
@@ -0,0 +1,72 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer1"
+ },
+ "SyncProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer0"
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncConsumer1"
+ },
+ "SyncConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncConsumer0"
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json b/services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json
new file mode 100644
index 000000000..a6de63f30
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json
@@ -0,0 +1,65 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ },
+ "MyOtherProducer": {
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "synchronousTimeout": 12345
+ }
+ },
+ "eventInputParameters": {
+ "TheFileConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ },
+ "MySuperDooperConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsInvalidTimeout.json b/services/services-engine/src/test/resources/parameters/syncBadParamsInvalidTimeout.json
new file mode 100644
index 000000000..ac24c8231
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncBadParamsInvalidTimeout.json
@@ -0,0 +1,76 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousTimeout": -10,
+ "synchronousPeer": "SyncConsumer0"
+ },
+ "SyncProducer1": {
+ "synchronousMode": true,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousTimeout": -3,
+ "synchronousPeer": "SyncConsumer1"
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer0",
+ "synchronousTimeout": -1,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ }
+ },
+ "SyncConsumer1": {
+ "synchronousPeer": "SyncProducer1",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true,
+ "synchronousTimeout": -99999999
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json b/services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json
new file mode 100644
index 000000000..98840912f
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json
@@ -0,0 +1,71 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousPeer": "SyncConsumer0"
+ },
+ "SyncProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncConsumer1"
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer0"
+ },
+ "SyncConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer1"
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json b/services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json
new file mode 100644
index 000000000..477bf8639
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json
@@ -0,0 +1,72 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": false,
+ "synchronousPeer": "SyncConsumer0"
+ },
+ "SyncProducer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncConsumer1"
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer0"
+ },
+ "SyncConsumer1": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer1"
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json b/services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json
new file mode 100644
index 000000000..93c998b29
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json
@@ -0,0 +1,76 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousTimeout": 10,
+ "synchronousPeer": "SyncConsumer0"
+ },
+ "SyncProducer1": {
+ "synchronousMode": true,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousTimeout": 3,
+ "synchronousPeer": "SyncConsumer1"
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer0",
+ "synchronousTimeout": 1,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ }
+ },
+ "SyncConsumer1": {
+ "synchronousPeer": "SyncProducer1",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true,
+ "synchronousTimeout": 99999999
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParams.json b/services/services-engine/src/test/resources/parameters/syncGoodParams.json
new file mode 100644
index 000000000..b2980aaed
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncGoodParams.json
@@ -0,0 +1,72 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncConsumer0"
+ },
+ "SyncProducer1": {
+ "synchronousMode": true,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousPeer": "SyncConsumer1"
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer0",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ }
+ },
+ "SyncConsumer1": {
+ "synchronousPeer": "SyncProducer1",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json b/services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json
new file mode 100644
index 000000000..68626958d
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json
@@ -0,0 +1,76 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "synchronousTimeout": 12345,
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncConsumer0"
+ },
+ "SyncProducer1": {
+ "synchronousTimeout": 1,
+ "synchronousMode": true,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousPeer": "SyncConsumer1"
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousTimeout": 12345,
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer0",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ }
+ },
+ "SyncConsumer1": {
+ "synchronousPeer": "SyncProducer1",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "synchronousTimeout": 1,
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json b/services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json
new file mode 100644
index 000000000..d849040ac
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json
@@ -0,0 +1,74 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncConsumer0"
+ },
+ "SyncProducer1": {
+ "synchronousMode": true,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousPeer": "SyncConsumer1"
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousTimeout": 12345,
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer0",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ }
+ },
+ "SyncConsumer1": {
+ "synchronousPeer": "SyncProducer1",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "synchronousTimeout": 1,
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json b/services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json
new file mode 100644
index 000000000..b248259a4
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json
@@ -0,0 +1,74 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "synchronousTimeout": 12345,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncConsumer0"
+ },
+ "SyncProducer1": {
+ "synchronousMode": true,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousPeer": "SyncConsumer1",
+ "synchronousTimeout": 1
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer0",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ }
+ },
+ "SyncConsumer1": {
+ "synchronousPeer": "SyncProducer1",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json b/services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json
new file mode 100644
index 000000000..9e5399d4f
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json
@@ -0,0 +1,72 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncConsumer1"
+ },
+ "SyncProducer1": {
+ "synchronousMode": true,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousPeer": "SyncConsumer0"
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer0",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ }
+ },
+ "SyncConsumer1": {
+ "synchronousPeer": "SyncProducer1",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json b/services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json
new file mode 100644
index 000000000..71337f340
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json
@@ -0,0 +1,72 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncConsumer0"
+ },
+ "SyncProducer1": {
+ "synchronousMode": true,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousPeer": "SyncConsumer0"
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer0",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ }
+ },
+ "SyncConsumer1": {
+ "synchronousPeer": "SyncProducer1",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json b/services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json
new file mode 100644
index 000000000..4fe58bacc
--- /dev/null
+++ b/services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json
@@ -0,0 +1,72 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 19,
+ "deploymentPort": 65522,
+ "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "SyncProducer0": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncConsumer0"
+ },
+ "SyncProducer1": {
+ "synchronousMode": true,
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/aaa.json"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousPeer": "SyncConsumer1"
+ }
+ },
+ "eventInputParameters": {
+ "SyncConsumer0": {
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ },
+ "synchronousMode": true,
+ "synchronousPeer": "SyncProducer1",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "FILE",
+ "parameters": {
+ "fileName": "/tmp/bbb.json"
+ }
+ }
+ },
+ "SyncConsumer1": {
+ "synchronousPeer": "SyncProducer1",
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "SUPER_DOOPER",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters"
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "SUPER_TOK_DEL",
+ "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters"
+ },
+ "synchronousMode": true
+ }
+ }
+} \ No newline at end of file
diff --git a/services/services-engine/src/test/resources/policymodels/SamplePolicyModelMVEL.json b/services/services-engine/src/test/resources/policymodels/SamplePolicyModelMVEL.json
new file mode 100644
index 000000000..95ea511b1
--- /dev/null
+++ b/services/services-engine/src/test/resources/policymodels/SamplePolicyModelMVEL.json
@@ -0,0 +1,7372 @@
+{
+ "apexPolicyModel": {
+ "key": {
+ "name": "SamplePolicyModelMVEL",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "KeyInformation",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "Context",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Context",
+ "version": "0.0.1"
+ },
+ "UUID": "ca36bfd8-6042-3633-8c85-89c66507c3bf",
+ "description": "Generated description for concept referred to by key \"Context:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Event0000",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0000",
+ "version": "0.0.1"
+ },
+ "UUID": "465a81cc-885f-3a4d-bc4e-1508da92b236",
+ "description": "Generated description for concept referred to by key \"Event0000:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Event0001",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0001",
+ "version": "0.0.1"
+ },
+ "UUID": "36b2d570-fff7-3a4b-bab2-6bf492f5129a",
+ "description": "Generated description for concept referred to by key \"Event0001:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Event0002",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0002",
+ "version": "0.0.1"
+ },
+ "UUID": "ff6160a7-fb5e-379c-a6d2-2cd28053eacf",
+ "description": "Generated description for concept referred to by key \"Event0002:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Event0003",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0003",
+ "version": "0.0.1"
+ },
+ "UUID": "5899e216-2abf-3781-abc4-2c257b92721e",
+ "description": "Generated description for concept referred to by key \"Event0003:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Event0004",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0004",
+ "version": "0.0.1"
+ },
+ "UUID": "7c2692a7-4587-3d09-abf9-d96b339a316f",
+ "description": "Generated description for concept referred to by key \"Event0004:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Event0100",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0100",
+ "version": "0.0.1"
+ },
+ "UUID": "b696048c-c0b0-34c1-8dbe-32ab6c8bc0c7",
+ "description": "Generated description for concept referred to by key \"Event0100:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Event0101",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0101",
+ "version": "0.0.1"
+ },
+ "UUID": "edbfa868-2ab2-30fd-8078-4c7f67ca6122",
+ "description": "Generated description for concept referred to by key \"Event0101:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Event0102",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0102",
+ "version": "0.0.1"
+ },
+ "UUID": "6b6ad2ff-ef63-3f7b-aabb-fba44f8de9d4",
+ "description": "Generated description for concept referred to by key \"Event0102:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Event0103",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0103",
+ "version": "0.0.1"
+ },
+ "UUID": "c2550912-10d9-3000-8826-377288cd6cb1",
+ "description": "Generated description for concept referred to by key \"Event0103:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Event0104",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0104",
+ "version": "0.0.1"
+ },
+ "UUID": "f6d75b71-c8a7-3337-a121-88d68c389f5a",
+ "description": "Generated description for concept referred to by key \"Event0104:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Events",
+ "version": "0.0.1"
+ },
+ "UUID": "0215644c-4531-375c-8335-d558b4de8c03",
+ "description": "Generated description for concept referred to by key \"Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "976a79e7-5c80-3c03-9503-da3f41fec395",
+ "description": "Generated description for concept referred to by key \"ExternalContextAlbum:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "c95e9e5f-d2c7-3ac7-a205-ea3574530cb7",
+ "description": "Generated description for concept referred to by key \"GlobalContextAlbum:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "KeyInformation",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "KeyInformation",
+ "version": "0.0.1"
+ },
+ "UUID": "1ff2f905-685c-3caf-95bc-0bbc90345888",
+ "description": "Generated description for concept referred to by key \"KeyInformation:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "f54c3b2b-be76-31c4-adfc-87c494c06808",
+ "description": "Generated description for concept referred to by key \"Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Policy0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Policy0",
+ "version": "0.0.1"
+ },
+ "UUID": "3410e939-30ca-32c4-a2d8-c30b6fee6eec",
+ "description": "Generated description for concept referred to by key \"Policy0:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "e27564c4-3cbf-3db2-9bf3-83ae80a2f907",
+ "description": "Generated description for concept referred to by key \"Policy0ContextAlbum:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Policy1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Policy1",
+ "version": "0.0.1"
+ },
+ "UUID": "d0b2b585-f344-33b8-af9e-250e7f4cfbce",
+ "description": "Generated description for concept referred to by key \"Policy1:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ },
+ "UUID": "815d74ae-6fc0-3221-87b9-2bb1dfdfa7f0",
+ "description": "Generated description for concept referred to by key \"Policy1ContextAlbum:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "SamplePolicyModelMVEL",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "SamplePolicyModelMVEL",
+ "version": "0.0.1"
+ },
+ "UUID": "a4cc4860-0bbc-389c-b270-e1bf7daffbe2",
+ "description": "Generated description for concept referred to by key \"SamplePolicyModelMVEL:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Act0",
+ "version": "0.0.1"
+ },
+ "UUID": "0589ff20-adcc-3ce5-95fe-8d7978ed54ed",
+ "description": "Generated description for concept referred to by key \"Task_Act0:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Act1",
+ "version": "0.0.1"
+ },
+ "UUID": "095b126d-ca8b-32c9-ad52-d744e817a79c",
+ "description": "Generated description for concept referred to by key \"Task_Act1:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Act2",
+ "version": "0.0.1"
+ },
+ "UUID": "3d786b4c-d9ee-3367-ab71-c67271a4ea2f",
+ "description": "Generated description for concept referred to by key \"Task_Act2:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Act3",
+ "version": "0.0.1"
+ },
+ "UUID": "9231753e-20c5-3436-982f-9100340cc570",
+ "description": "Generated description for concept referred to by key \"Task_Act3:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Decide0",
+ "version": "0.0.1"
+ },
+ "UUID": "502383d3-483f-3a56-a426-2f0406674c8d",
+ "description": "Generated description for concept referred to by key \"Task_Decide0:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Decide1",
+ "version": "0.0.1"
+ },
+ "UUID": "16598106-41c8-3b5a-99c6-5fcf6d1a5ddf",
+ "description": "Generated description for concept referred to by key \"Task_Decide1:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Decide2",
+ "version": "0.0.1"
+ },
+ "UUID": "ad3a89f5-e369-3c66-b22c-669f7b3653b8",
+ "description": "Generated description for concept referred to by key \"Task_Decide2:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Decide3",
+ "version": "0.0.1"
+ },
+ "UUID": "56815939-1164-3867-9ed1-0a27ff8aafb3",
+ "description": "Generated description for concept referred to by key \"Task_Decide3:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Establish0",
+ "version": "0.0.1"
+ },
+ "UUID": "0db0c566-ecd7-3e27-9865-4b82c893abdb",
+ "description": "Generated description for concept referred to by key \"Task_Establish0:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Establish1",
+ "version": "0.0.1"
+ },
+ "UUID": "6944a4c1-6201-317c-8d7e-eaa7f2ee0ea0",
+ "description": "Generated description for concept referred to by key \"Task_Establish1:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Establish2",
+ "version": "0.0.1"
+ },
+ "UUID": "0f766ea9-11cd-3e7d-a8c8-28c8dee6a85a",
+ "description": "Generated description for concept referred to by key \"Task_Establish2:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Establish3",
+ "version": "0.0.1"
+ },
+ "UUID": "c3237a38-cc6d-3418-b1e1-0dc8b4bdcc66",
+ "description": "Generated description for concept referred to by key \"Task_Establish3:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Match0",
+ "version": "0.0.1"
+ },
+ "UUID": "051bcfd5-cf73-3c89-8ee7-ea6e005ec059",
+ "description": "Generated description for concept referred to by key \"Task_Match0:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Match1",
+ "version": "0.0.1"
+ },
+ "UUID": "3754fe19-98f2-34a1-9f45-db31052208d8",
+ "description": "Generated description for concept referred to by key \"Task_Match1:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Match2",
+ "version": "0.0.1"
+ },
+ "UUID": "8c200709-a180-3c8b-916f-275ff49ce194",
+ "description": "Generated description for concept referred to by key \"Task_Match2:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Match3",
+ "version": "0.0.1"
+ },
+ "UUID": "a1a879c6-4510-33b0-bbd0-ad6256189a37",
+ "description": "Generated description for concept referred to by key \"Task_Match3:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "a7fab96b-ce1c-37ce-bbb2-556b6db524a5",
+ "description": "Generated description for concept referred to by key \"Tasks:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "UUID": "0a652886-c88d-3f8c-8994-ae9161e7c963",
+ "description": "Generated description for concept referred to by key \"TestCase:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem000",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem000",
+ "version": "0.0.1"
+ },
+ "UUID": "8efba9fa-371e-33df-a7d6-88b0284e7fd0",
+ "description": "Generated description for concept referred to by key \"TestContextItem000:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem001",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem001",
+ "version": "0.0.1"
+ },
+ "UUID": "3740077c-a2b3-356b-81dc-5ded2118a951",
+ "description": "Generated description for concept referred to by key \"TestContextItem001:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem002",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem002",
+ "version": "0.0.1"
+ },
+ "UUID": "b5c7df95-9af5-322f-9ea8-eb440a2bf926",
+ "description": "Generated description for concept referred to by key \"TestContextItem002:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem003",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem003",
+ "version": "0.0.1"
+ },
+ "UUID": "b36f0aa5-0fb9-3e2c-8fa2-fddb7fd05f4b",
+ "description": "Generated description for concept referred to by key \"TestContextItem003:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem004",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem004",
+ "version": "0.0.1"
+ },
+ "UUID": "093cda11-eaeb-3a46-a5b6-d5e30c00935b",
+ "description": "Generated description for concept referred to by key \"TestContextItem004:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem005",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem005",
+ "version": "0.0.1"
+ },
+ "UUID": "569a758d-ba40-37c0-aebb-7ad138df25ac",
+ "description": "Generated description for concept referred to by key \"TestContextItem005:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem006",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem006",
+ "version": "0.0.1"
+ },
+ "UUID": "252818d9-b61f-3962-a905-8865fb00fb04",
+ "description": "Generated description for concept referred to by key \"TestContextItem006:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem007",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem007",
+ "version": "0.0.1"
+ },
+ "UUID": "fe1a5f7c-c083-377b-a797-752b01fc6c73",
+ "description": "Generated description for concept referred to by key \"TestContextItem007:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem008",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem008",
+ "version": "0.0.1"
+ },
+ "UUID": "aa87d007-d07e-3f67-8c6d-0ebc3d85479d",
+ "description": "Generated description for concept referred to by key \"TestContextItem008:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem009",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem009",
+ "version": "0.0.1"
+ },
+ "UUID": "126e7a3a-11b6-3f88-9397-c21d8819f859",
+ "description": "Generated description for concept referred to by key \"TestContextItem009:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem00A",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem00A",
+ "version": "0.0.1"
+ },
+ "UUID": "0e0e3dec-e03d-3379-a87b-1ecd4aa3d8cc",
+ "description": "Generated description for concept referred to by key \"TestContextItem00A:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem00B",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem00B",
+ "version": "0.0.1"
+ },
+ "UUID": "dbdc98df-3ff4-360c-b8d3-a7a836ac3de6",
+ "description": "Generated description for concept referred to by key \"TestContextItem00B:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem00C",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem00C",
+ "version": "0.0.1"
+ },
+ "UUID": "32a2f355-77f3-3b25-ace6-7a9c5763a5ad",
+ "description": "Generated description for concept referred to by key \"TestContextItem00C:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestDatatypes",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestDatatypes",
+ "version": "0.0.1"
+ },
+ "UUID": "3f95472c-973e-30e2-95f1-bf00cbef909a",
+ "description": "Generated description for concept referred to by key \"TestDatatypes:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestExternalContextItem",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestExternalContextItem",
+ "version": "0.0.1"
+ },
+ "UUID": "610dbbd4-9149-3b3c-9af4-819056f0e169",
+ "description": "Generated description for concept referred to by key \"TestExternalContextItem:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestGlobalContextItem",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestGlobalContextItem",
+ "version": "0.0.1"
+ },
+ "UUID": "07fa8f68-55f1-3fd0-81c1-749a379753a7",
+ "description": "Generated description for concept referred to by key \"TestGlobalContextItem:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestPolicyContextItem",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestPolicyContextItem",
+ "version": "0.0.1"
+ },
+ "UUID": "d9c93cd1-539e-35c5-aaec-bb711ceb1251",
+ "description": "Generated description for concept referred to by key \"TestPolicyContextItem:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "UUID": "683fe492-7eae-3ac7-9924-bb7850208d05",
+ "description": "Generated description for concept referred to by key \"TestSlogan:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "UUID": "bba25b6f-e3cd-3060-9022-4ef3a79f8eb0",
+ "description": "Generated description for concept referred to by key \"TestTemperature:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "UUID": "97b73937-c344-33c0-924c-4d26b6449564",
+ "description": "Generated description for concept referred to by key \"TestTimestamp:0.0.1\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "Policy0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "Policy0",
+ "version": "0.0.1"
+ },
+ "template": "MEDA",
+ "state": {
+ "entry": [
+ {
+ "key": "Act",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Act"
+ },
+ "trigger": {
+ "name": "Event0003",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "Act_NULL",
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Act_NULL"
+ },
+ "outgoingEvent": {
+ "name": "Event0004",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskSelectionLogic": {
+ "key": "TaskSelectionLigic",
+ "logicFlavour": "MVEL",
+ "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;"
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "Task_Act1",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "Task_Act0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Task_Act0_DIRECT_Act_NULL"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Act_NULL"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Task_Act1_DIRECT_Act_NULL"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Act_NULL"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Task_Act2_DIRECT_Act_NULL"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Act_NULL"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Task_Act3_DIRECT_Act_NULL"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Act_NULL"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": "Decide",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Decide"
+ },
+ "trigger": {
+ "name": "Event0002",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "Decide_Act",
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Decide_Act"
+ },
+ "outgoingEvent": {
+ "name": "Event0003",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Act"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskSelectionLogic": {
+ "key": "TaskSelectionLigic",
+ "logicFlavour": "MVEL",
+ "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;"
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "Task_Decide3",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "Task_Decide0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Task_Decide0_DIRECT_Decide_Act"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Decide_Act"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Task_Decide1_DIRECT_Decide_Act"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Decide_Act"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Task_Decide2_DIRECT_Decide_Act"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Decide_Act"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Task_Decide3_DIRECT_Decide_Act"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Decide_Act"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": "Establish",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Establish"
+ },
+ "trigger": {
+ "name": "Event0001",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "Establish_Decide",
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Establish_Decide"
+ },
+ "outgoingEvent": {
+ "name": "Event0002",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Decide"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskSelectionLogic": {
+ "key": "TaskSelectionLigic",
+ "logicFlavour": "MVEL",
+ "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;"
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "Task_Establish2",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "Task_Establish0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Task_Establish0_DIRECT_Establish_Decide"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Establish_Decide"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Task_Establish1_DIRECT_Establish_Decide"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Establish_Decide"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Task_Establish2_DIRECT_Establish_Decide"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Establish_Decide"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Task_Establish3_DIRECT_Establish_Decide"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Establish_Decide"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": "Match",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Match"
+ },
+ "trigger": {
+ "name": "Event0000",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "Match_Establish",
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Match_Establish"
+ },
+ "outgoingEvent": {
+ "name": "Event0001",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Establish"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskSelectionLogic": {
+ "key": "TaskSelectionLigic",
+ "logicFlavour": "MVEL",
+ "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;"
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "Task_Match0",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "Task_Match0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Task_Match0_DIRECT_Match_Establish"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Match_Establish"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Task_Match1_DIRECT_Match_Establish"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Match_Establish"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Task_Match2_DIRECT_Match_Establish"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Match_Establish"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Task_Match3_DIRECT_Match_Establish"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Match_Establish"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "Match"
+ }
+ },
+ {
+ "key": {
+ "name": "Policy1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "Policy1",
+ "version": "0.0.1"
+ },
+ "template": "MEDA",
+ "state": {
+ "entry": [
+ {
+ "key": "Act",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Act"
+ },
+ "trigger": {
+ "name": "Event0103",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "Act_NULL",
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Act_NULL"
+ },
+ "outgoingEvent": {
+ "name": "Event0104",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskSelectionLogic": {
+ "key": "TaskSelectionLigic",
+ "logicFlavour": "MVEL",
+ "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;"
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "Task_Act0",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "Task_Act0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Task_Act0_DIRECT_Act_NULL"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Act_NULL"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Task_Act1_DIRECT_Act_NULL"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Act_NULL"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Task_Act2_DIRECT_Act_NULL"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Act_NULL"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Task_Act3_DIRECT_Act_NULL"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Act",
+ "localName": "Act_NULL"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": "Decide",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Decide"
+ },
+ "trigger": {
+ "name": "Event0102",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "Decide_Act",
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Decide_Act"
+ },
+ "outgoingEvent": {
+ "name": "Event0103",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Act"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskSelectionLogic": {
+ "key": "TaskSelectionLigic",
+ "logicFlavour": "MVEL",
+ "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;"
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "Task_Decide3",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "Task_Decide0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Task_Decide0_DIRECT_Decide_Act"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Decide_Act"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Task_Decide1_DIRECT_Decide_Act"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Decide_Act"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Task_Decide2_DIRECT_Decide_Act"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Decide_Act"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Task_Decide3_DIRECT_Decide_Act"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Decide",
+ "localName": "Decide_Act"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": "Establish",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Establish"
+ },
+ "trigger": {
+ "name": "Event0101",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "Establish_Decide",
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Establish_Decide"
+ },
+ "outgoingEvent": {
+ "name": "Event0102",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Decide"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskSelectionLogic": {
+ "key": "TaskSelectionLigic",
+ "logicFlavour": "MVEL",
+ "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;"
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "Task_Establish1",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "Task_Establish0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Task_Establish0_DIRECT_Establish_Decide"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Establish_Decide"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Task_Establish1_DIRECT_Establish_Decide"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Establish_Decide"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Task_Establish2_DIRECT_Establish_Decide"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Establish_Decide"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Task_Establish3_DIRECT_Establish_Decide"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Establish",
+ "localName": "Establish_Decide"
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": "Match",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Match"
+ },
+ "trigger": {
+ "name": "Event0100",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "Match_Establish",
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Match_Establish"
+ },
+ "outgoingEvent": {
+ "name": "Event0101",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Establish"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskSelectionLogic": {
+ "key": "TaskSelectionLigic",
+ "logicFlavour": "MVEL",
+ "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;"
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "Task_Match3",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "Task_Match0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Task_Match0_DIRECT_Match_Establish"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Match_Establish"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Task_Match1_DIRECT_Match_Establish"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Match_Establish"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Task_Match2_DIRECT_Match_Establish"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Match_Establish"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Task_Match3_DIRECT_Match_Establish"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "Policy1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "Match",
+ "localName": "Match_Establish"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "Match"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "Task_Act0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Act0",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestActCaseSelected",
+ "value": {
+ "key": "TestActCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestActStateTime",
+ "value": {
+ "key": "TestActStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Act0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ },
+ {
+ "key": "Parameter1",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Act0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter1"
+ },
+ "defaultValue": "DefaultValue1"
+ }
+ },
+ {
+ "key": "Parameter2",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Act0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter2"
+ },
+ "defaultValue": "DefaultValue2"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestActCaseSelected\"] = (byte)2;\ntimeNow = new Date();\noutFields[\"TestActStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Act1",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestActCaseSelected",
+ "value": {
+ "key": "TestActCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestActStateTime",
+ "value": {
+ "key": "TestActStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Act1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ },
+ {
+ "key": "Parameter1",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Act1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter1"
+ },
+ "defaultValue": "DefaultValue1"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestActCaseSelected\"] = (byte)3;\ntimeNow = new Date();\noutFields[\"TestActStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Act2",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestActCaseSelected",
+ "value": {
+ "key": "TestActCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestActStateTime",
+ "value": {
+ "key": "TestActStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Act2",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestActCaseSelected\"] = (byte)0;\ntimeNow = new Date();\noutFields[\"TestActStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Act3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Act3",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestActCaseSelected",
+ "value": {
+ "key": "TestActCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestActStateTime",
+ "value": {
+ "key": "TestActStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Act3",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestActCaseSelected\"] = (byte)1;\ntimeNow = new Date();\noutFields[\"TestActStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Decide0",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Decide0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ },
+ {
+ "key": "Parameter1",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Decide0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter1"
+ },
+ "defaultValue": "DefaultValue1"
+ }
+ },
+ {
+ "key": "Parameter2",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Decide0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter2"
+ },
+ "defaultValue": "DefaultValue2"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestDecideCaseSelected\"] = (byte)2;\ntimeNow = new Date();\noutFields[\"TestDecideStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Decide1",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Decide1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ },
+ {
+ "key": "Parameter1",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Decide1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter1"
+ },
+ "defaultValue": "DefaultValue1"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestDecideCaseSelected\"] = (byte)3;\ntimeNow = new Date();\noutFields[\"TestDecideStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Decide2",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Decide2",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestDecideCaseSelected\"] = (byte)0;\ntimeNow = new Date();\noutFields[\"TestDecideStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Decide3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Decide3",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Decide3",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestDecideCaseSelected\"] = (byte)1;\ntimeNow = new Date();\noutFields[\"TestDecideStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Establish0",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Establish0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ },
+ {
+ "key": "Parameter1",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Establish0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter1"
+ },
+ "defaultValue": "DefaultValue1"
+ }
+ },
+ {
+ "key": "Parameter2",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Establish0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter2"
+ },
+ "defaultValue": "DefaultValue2"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestEstablishCaseSelected\"] = (byte)2;\ntimeNow = new Date();\noutFields[\"TestEstablishStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Establish1",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Establish1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ },
+ {
+ "key": "Parameter1",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Establish1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter1"
+ },
+ "defaultValue": "DefaultValue1"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestEstablishCaseSelected\"] = (byte)3;\ntimeNow = new Date();\noutFields[\"TestEstablishStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Establish2",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Establish2",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestEstablishCaseSelected\"] = (byte)0;\ntimeNow = new Date();\noutFields[\"TestEstablishStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Establish3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Establish3",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Establish3",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestEstablishCaseSelected\"] = (byte)1;\ntimeNow = new Date();\noutFields[\"TestEstablishStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match0",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Match0",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Match0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ },
+ {
+ "key": "Parameter1",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Match0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter1"
+ },
+ "defaultValue": "DefaultValue1"
+ }
+ },
+ {
+ "key": "Parameter2",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Match0",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter2"
+ },
+ "defaultValue": "DefaultValue2"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestMatchCaseSelected\"] = (byte)2;\ntimeNow = new Date();\noutFields[\"TestMatchStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match1",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Match1",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Match1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ },
+ {
+ "key": "Parameter1",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Match1",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter1"
+ },
+ "defaultValue": "DefaultValue1"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestMatchCaseSelected\"] = (byte)3;\ntimeNow = new Date();\noutFields[\"TestMatchStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match2",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Match2",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Match2",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestMatchCaseSelected\"] = (byte)0;\ntimeNow = new Date();\noutFields[\"TestMatchStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Task_Match3",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Task_Match3",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": [
+ {
+ "key": "Parameter0",
+ "value": {
+ "key": {
+ "parentKeyName": "Task_Match3",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "Parameter0"
+ },
+ "defaultValue": "DefaultValue0"
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [
+ {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ }
+ ],
+ "taskLogic": {
+ "key": "_TaskLogic",
+ "logicFlavour": "MVEL",
+ "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestMatchCaseSelected\"] = (byte)1;\ntimeNow = new Date();\noutFields[\"TestMatchStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "Event0000",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0000",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.sample.events",
+ "source": "Outside",
+ "target": "Match",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Event0001",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0001",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.sample.events",
+ "source": "Match",
+ "target": "Establish",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Event0002",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0002",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.sample.events",
+ "source": "Establish",
+ "target": "Decide",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Event0003",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0003",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.sample.events",
+ "source": "Decide",
+ "target": "Act",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Event0004",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0004",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.sample.events",
+ "source": "Act",
+ "target": "Outside",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestActCaseSelected",
+ "value": {
+ "key": "TestActCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestActStateTime",
+ "value": {
+ "key": "TestActStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Event0100",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0100",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.sample.events",
+ "source": "Outside",
+ "target": "Match",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Event0101",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0101",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.sample.events",
+ "source": "Match",
+ "target": "Establish",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Event0102",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0102",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.sample.events",
+ "source": "Establish",
+ "target": "Decide",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Event0103",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0103",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.sample.events",
+ "source": "Decide",
+ "target": "Act",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Event0104",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Event0104",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.sample.events",
+ "source": "Act",
+ "target": "Outside",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestActCaseSelected",
+ "value": {
+ "key": "TestActCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestActStateTime",
+ "value": {
+ "key": "TestActStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideCaseSelected",
+ "value": {
+ "key": "TestDecideCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestDecideStateTime",
+ "value": {
+ "key": "TestDecideStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishCaseSelected",
+ "value": {
+ "key": "TestEstablishCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestEstablishStateTime",
+ "value": {
+ "key": "TestEstablishStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCase",
+ "value": {
+ "key": "TestMatchCase",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchCaseSelected",
+ "value": {
+ "key": "TestMatchCaseSelected",
+ "fieldSchemaKey": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestMatchStateTime",
+ "value": {
+ "key": "TestMatchStateTime",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestSlogan",
+ "value": {
+ "key": "TestSlogan",
+ "fieldSchemaKey": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTemperature",
+ "value": {
+ "key": "TestTemperature",
+ "fieldSchemaKey": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ },
+ {
+ "key": "TestTimestamp",
+ "value": {
+ "key": "TestTimestamp",
+ "fieldSchemaKey": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "Context",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": [
+ {
+ "key": {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "ExternalContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "EXTERNAL",
+ "isWritable": false,
+ "itemSchema": {
+ "name": "TestExternalContextItem",
+ "version": "0.0.1"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "GlobalContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "GLOBAL",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "TestGlobalContextItem",
+ "version": "0.0.1"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Policy0ContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "APPLICATION",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "TestPolicyContextItem",
+ "version": "0.0.1"
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "Policy1ContextAlbum",
+ "version": "0.0.1"
+ },
+ "scope": "APPLICATION",
+ "isWritable": true,
+ "itemSchema": {
+ "name": "TestPolicyContextItem",
+ "version": "0.0.1"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "TestDatatypes",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestCase",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Byte"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem000",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem000",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem000"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem001",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem001",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem001"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem002",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem002",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem002"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem003",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem003",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem003"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem004",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem004",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem004"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem005",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem005",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem005"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem006",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem006",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem006"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem007",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem007",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem007"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem008",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem008",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem008"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem009",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem009",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem009"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem00A",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem00A",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem00A"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem00B",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem00B",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem00B"
+ }
+ },
+ {
+ "key": {
+ "name": "TestContextItem00C",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestContextItem00C",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestContextItem00C"
+ }
+ },
+ {
+ "key": {
+ "name": "TestExternalContextItem",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestExternalContextItem",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestExternalContextItem"
+ }
+ },
+ {
+ "key": {
+ "name": "TestGlobalContextItem",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestGlobalContextItem",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestGlobalContextItem"
+ }
+ },
+ {
+ "key": {
+ "name": "TestPolicyContextItem",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestPolicyContextItem",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.context.test.concepts.TestPolicyContextItem"
+ }
+ },
+ {
+ "key": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestSlogan",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.String"
+ }
+ },
+ {
+ "key": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestTemperature",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Double"
+ }
+ },
+ {
+ "key": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestTimestamp",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "java.lang.Long"
+ }
+ }
+ ]
+ }
+ }
+ }
+}