summaryrefslogtreecommitdiffstats
path: root/testsuites/performance/performance-benchmark-test/src
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-11-20 15:59:50 +0000
committerliamfallon <liam.fallon@ericsson.com>2018-11-20 16:56:18 +0000
commit1f7c861c65aa8689f11196581b8ca5e79d7e4e26 (patch)
treeb48c3dc3bec93dd5e52c9a45cb84b88c61d1843f /testsuites/performance/performance-benchmark-test/src
parente8b197315437cac84872752e2ea090d8fb233941 (diff)
Refactor Apex benchmark tests
Apex performance tests are refactored and reorganised to be all in the one place and to be coherent. A test REST server that can generate events in batches is introduced and this can be configured to respond to REST calls from Apex with various batch sizes that can be varied for performance tests. Actual performance tests are added for the various executors in Apex. Change-Id: I692b41e1e4451e821a618c64dead5cc8e9685d08 Issue-ID: POLICY-812 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'testsuites/performance/performance-benchmark-test/src')
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatch.java151
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchStats.java239
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGenerator.java185
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java177
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParameterHandler.java214
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParameters.java156
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorStats.java59
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/InputEvent.java142
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/OutputEvent.java135
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/EventGeneratorConfig.json9
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby01.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby02.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby04.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby08.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby16.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby32.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby64.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java01.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java02.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java04.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java08.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java16.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java32.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java64.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript01.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript02.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript04.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript08.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript16.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript32.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript64.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython01.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython02.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython04.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython08.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython16.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython32.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython64.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel01.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel02.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel04.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel08.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel16.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel32.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel64.json45
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexBaseBenchMarkTest.java175
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexEngineBenchmarkTest.java183
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexEventListenerTest.java126
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchStatsTest.java57
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchTest.java48
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java115
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java325
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersTest.java71
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorStatsTest.java44
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorTest.java160
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/InputEventTest.java68
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/OutputEventTest.java70
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/BadHost.json5
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/BadPort.json5
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Default.json1
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Empty.json0
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/NullHost.json5
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Valid.json5
-rw-r--r--testsuites/performance/performance-benchmark-test/src/test/resources/policymodels/SamplePolicyModelMVEL.json7372
64 files changed, 4021 insertions, 7856 deletions
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatch.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatch.java
new file mode 100644
index 000000000..abf0c993f
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatch.java
@@ -0,0 +1,151 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events.InputEvent;
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events.OutputEvent;
+
+/**
+ * This class keeps track of a batch of events sent to an Apex instance.
+ */
+public class EventBatch {
+ private static AtomicInteger nextBatchNumber = new AtomicInteger();
+
+ private final int batchNumber = nextBatchNumber.getAndIncrement();
+ private final Map<Integer, InputEvent> inputEventMap = new ConcurrentHashMap<>();
+ private final Map<Integer, OutputEvent> outputEventMap = new ConcurrentHashMap<>();
+
+ private final int batchSize;
+ private final String apexClient;
+
+ /**
+ * Create an event batch.
+ *
+ * @param batchSize the size of the batch
+ * @param apexClient the apex client to which the event batch will be sent
+ */
+ public EventBatch(final int batchSize, final String apexClient) {
+ this.batchSize = batchSize;
+ this.apexClient = apexClient;
+
+ // Create the events for the batch of events
+ for (int eventNumber = 0; eventNumber < batchSize; eventNumber++) {
+ InputEvent inputEvent = new InputEvent();
+ inputEvent.setTestSlogan(getEventSlogan(eventNumber));
+ inputEventMap.put(eventNumber, inputEvent);
+ }
+ }
+
+ /**
+ * Get the batch of events as a JSON string.
+ *
+ * @return the JSON string representation of the batch of events.
+ */
+ public String getBatchAsJsonString() {
+ if (batchSize == 1) {
+ return inputEventMap.get(0).asJson();
+ }
+
+ StringBuilder jsonBuilder = new StringBuilder();
+ jsonBuilder.append("[\n");
+ boolean first = true;
+ for (InputEvent inputEvent : inputEventMap.values()) {
+ if (first) {
+ first = false;
+ }
+ else {
+ jsonBuilder.append(",\n");
+ }
+ jsonBuilder.append(inputEvent.asJson());
+ }
+ jsonBuilder.append("\n]\n");
+
+ return jsonBuilder.toString();
+ }
+
+ public int getBatchNumber() {
+ return batchNumber;
+ }
+
+ public int getBatchSize() {
+ return batchSize;
+ }
+
+ public String getApexClient() {
+ return apexClient;
+ }
+
+ /**
+ * Get the event slogan.
+ *
+ * @param eventNumber the number of this event
+ * @return the event slogan
+ */
+ private String getEventSlogan(final int eventNumber) {
+ StringBuilder testSloganBuilder = new StringBuilder();
+ testSloganBuilder.append(batchNumber);
+ testSloganBuilder.append('-');
+ testSloganBuilder.append(eventNumber);
+ testSloganBuilder.append(": ");
+ testSloganBuilder.append(apexClient);
+
+ return testSloganBuilder.toString();
+ }
+
+ /**
+ * Handle a response event.
+ *
+ * @param responseEvent the response event
+ */
+ public void handleResponse(OutputEvent responseEvent) {
+ outputEventMap.put(responseEvent.findEventNumber(), responseEvent);
+ }
+
+ /**
+ * Get the statistics on this event batch.
+ * @return the event batch statistics
+ */
+ public EventBatchStats getStats() {
+ return new EventBatchStats(this);
+ }
+
+ /**
+ * Get an input event for an event number.
+ * @param eventNo the event number
+ * @return the event
+ */
+ public InputEvent getInputEvent(int eventNo) {
+ return inputEventMap.get(eventNo);
+ }
+
+ /**
+ * Get an output event for an event number.
+ * @param eventNo the event number
+ * @return the event
+ */
+ public OutputEvent getOutputEvent(int eventNo) {
+ return outputEventMap.get(eventNo);
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchStats.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchStats.java
new file mode 100644
index 000000000..321cd28e2
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchStats.java
@@ -0,0 +1,239 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import java.util.List;
+
+import org.apache.commons.lang3.tuple.ImmutablePair;
+import org.apache.commons.lang3.tuple.Pair;
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events.OutputEvent;
+
+/**
+ * This POJO class returns statistics on a event batch execution in Apex.
+ */
+public class EventBatchStats {
+ private final int batchNumber;
+ private final int batchSize;
+ private final String apexClient;
+
+ // @formatter:off
+ private long eventsNotSent = 0;
+ private long eventsSent = 0;
+ private long eventsNotReceived = 0;
+ private long eventsReceived = 0;
+ private long averageRoundTripNano = 0;
+ private long shortestRoundTripNano = Long.MAX_VALUE;
+ private long longestRoundTripNano = 0;
+ private long averageApexExecutionNano = 0;
+ private long shortestApexExecutionNano = Long.MAX_VALUE;
+ private long longestApexExecutionNano = 0;
+ // @formatter:on
+
+ /**
+ * Create a statistics object for an event batch.
+ *
+ * @param eventBatch the event batch for these statistics
+ */
+ public EventBatchStats(final EventBatch eventBatch) {
+ this.batchNumber = eventBatch.getBatchNumber();
+ this.batchSize = eventBatch.getBatchSize();
+ this.apexClient = eventBatch.getApexClient();
+
+ calcutateStats(eventBatch);
+ }
+
+ /**
+ * Create a total statistics object for a list of event batches.
+ *
+ * @param eventBatchStatsList the event batch for these statistics
+ */
+ public EventBatchStats(final List<EventBatchStats> eventBatchStatsList) {
+ this.batchNumber = -1;
+ this.apexClient = "TOTAL";
+
+ calcutateStats(eventBatchStatsList);
+
+ this.batchSize = (int)(eventsNotSent + eventsSent);
+ }
+
+ /**
+ * Compile the statistics.
+ * @param eventBatch the event batch for which statisticss should be calculated
+ */
+ private void calcutateStats(final EventBatch eventBatch) {
+ long accumulatedRoundTripTime = 0;
+ long accumulatedApexExecutionTime = 0;
+
+ for (int eventNo = 0; eventNo < batchSize; eventNo++) {
+ Pair<Long, Long> eventTimings = calculateEventTimings(eventBatch, eventNo);
+ if (eventTimings == null) {
+ // The event has not been sent yet or the response has not been received yet
+ continue;
+ }
+
+ accumulatedRoundTripTime += eventTimings.getLeft();
+ accumulatedApexExecutionTime += eventTimings.getRight();
+ }
+
+ if (eventsReceived != 0) {
+ averageRoundTripNano = accumulatedRoundTripTime / eventsReceived;
+ averageApexExecutionNano = accumulatedApexExecutionTime / eventsReceived;
+ }
+ }
+
+ /**
+ * Compile the statistics.
+ * @param eventBatchStatsList the event batch list for which statistics should be calculated
+ */
+ private void calcutateStats(final List<EventBatchStats> eventBatchStatsList) {
+ long accumulatedRoundTripTime = 0;
+ long accumulatedApexExecutionTime = 0;
+
+ for (EventBatchStats eventBatchStats: eventBatchStatsList) {
+ // @formatter:off
+ eventsNotSent += eventBatchStats.getEventsNotSent();
+ eventsSent += eventBatchStats.getEventsSent();
+ eventsNotReceived += eventBatchStats.getEventsNotReceived();
+ eventsReceived += eventBatchStats.getEventsReceived();
+ // @formatter:on
+
+ if (shortestRoundTripNano > eventBatchStats.getShortestRoundTripNano()) {
+ shortestRoundTripNano = eventBatchStats.getShortestRoundTripNano();
+ }
+
+ if (shortestApexExecutionNano > eventBatchStats.getShortestApexExecutionNano()) {
+ shortestApexExecutionNano = eventBatchStats.getShortestApexExecutionNano();
+ }
+
+ if (longestRoundTripNano < eventBatchStats.getLongestRoundTripNano()) {
+ longestRoundTripNano = eventBatchStats.getLongestRoundTripNano();
+ }
+
+ if (longestApexExecutionNano < eventBatchStats.getLongestApexExecutionNano()) {
+ longestApexExecutionNano = eventBatchStats.getLongestApexExecutionNano();
+ }
+
+ accumulatedRoundTripTime += eventBatchStats.getAverageRoundTripNano();
+ accumulatedApexExecutionTime += eventBatchStats.getAverageApexExecutionNano();
+ }
+
+ if (!eventBatchStatsList.isEmpty()) {
+ averageRoundTripNano = accumulatedRoundTripTime / eventBatchStatsList.size();
+ averageApexExecutionNano = accumulatedApexExecutionTime / eventBatchStatsList.size();
+ }
+ }
+
+ /**
+ * Calculate statistics for a single event.
+ * @param eventBatch the event batch for the event
+ * @param eventNo the event number of the event
+ * @return
+ */
+ private Pair<Long, Long> calculateEventTimings(EventBatch eventBatch, int eventNo) {
+ // If an event is in a batch, it has been sent
+ eventsSent++;
+
+ OutputEvent outputEvent = eventBatch.getOutputEvent(eventNo);
+
+ if (outputEvent == null) {
+ eventsNotReceived++;
+ return null;
+
+ }
+ else {
+ eventsReceived++;
+ }
+
+ long roundTrip = outputEvent.getTestReceviedTimestamp() - outputEvent.getTestTimestamp();
+ long apexExecution = outputEvent.getTestActStateTime() - outputEvent.getTestMatchStateTime();
+
+
+ if (shortestRoundTripNano > roundTrip) {
+ shortestRoundTripNano = roundTrip;
+ }
+
+ if (shortestApexExecutionNano > apexExecution) {
+ shortestApexExecutionNano = apexExecution;
+ }
+
+ if (longestRoundTripNano < roundTrip) {
+ longestRoundTripNano = roundTrip;
+ }
+
+ if (longestApexExecutionNano < apexExecution) {
+ longestApexExecutionNano = apexExecution;
+ }
+
+ return new ImmutablePair<>(roundTrip, apexExecution);
+ }
+
+ public int getBatchNumber() {
+ return batchNumber;
+ }
+
+ public int getBatchSize() {
+ return batchSize;
+ }
+
+ public String getApexClient() {
+ return apexClient;
+ }
+
+ public long getEventsNotSent() {
+ return eventsNotSent;
+ }
+
+ public long getEventsSent() {
+ return eventsSent;
+ }
+
+ public long getEventsNotReceived() {
+ return eventsNotReceived;
+ }
+
+ public long getEventsReceived() {
+ return eventsReceived;
+ }
+
+ public long getAverageRoundTripNano() {
+ return averageRoundTripNano;
+ }
+
+ public long getShortestRoundTripNano() {
+ return shortestRoundTripNano;
+ }
+
+ public long getLongestRoundTripNano() {
+ return longestRoundTripNano;
+ }
+
+ public long getAverageApexExecutionNano() {
+ return averageApexExecutionNano;
+ }
+
+ public long getShortestApexExecutionNano() {
+ return shortestApexExecutionNano;
+ }
+
+ public long getLongestApexExecutionNano() {
+ return longestApexExecutionNano;
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGenerator.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGenerator.java
new file mode 100644
index 000000000..a5ed37803
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGenerator.java
@@ -0,0 +1,185 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import java.io.IOException;
+import java.net.URI;
+import java.util.Arrays;
+
+import org.apache.commons.cli.ParseException;
+import org.glassfish.grizzly.http.server.HttpServer;
+import org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpServerFactory;
+import org.glassfish.jersey.server.ResourceConfig;
+import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
+import org.onap.policy.apex.model.utilities.TextFileUtils;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+/**
+ * This class is the main class of a REST server that generates sample events.
+ */
+public class EventGenerator {
+ // Get a reference to the logger
+ private static final XLogger LOGGER = XLoggerFactory.getXLogger(EventGenerator.class);
+
+ // Parameters for event generation
+ private final EventGeneratorParameters parameters;
+
+ // The HTTP server we are running
+ private final HttpServer eventGeneratorServer;
+
+ /**
+ * Instantiates a new event generator with the given parameters.
+ *
+ * @param parameters the parameters for the event generator
+ */
+ public EventGenerator(final EventGeneratorParameters parameters) {
+ this.parameters = parameters;
+
+ // Set the parameters in the event generator endpoint
+ EventGeneratorEndpoint.clearEventGenerationStats();
+ EventGeneratorEndpoint.setParameters(parameters);
+
+ // Add a shutdown hook to shut down the rest services when the process is exiting
+ Runtime.getRuntime().addShutdownHook(new Thread(new EventGeneratorShutdownHook()));
+
+ LOGGER.info("Event generator REST server starting");
+
+ final ResourceConfig rc = new ResourceConfig(EventGeneratorEndpoint.class);
+ eventGeneratorServer = GrizzlyHttpServerFactory.createHttpServer(getBaseUri(), rc);
+
+ // Wait for the HTTP server to come up
+ while (!eventGeneratorServer.isStarted()) {
+ ThreadUtilities.sleep(50);
+ }
+
+ LOGGER.info("Event generator REST server started");
+ }
+
+ /**
+ * Get the current event generation statistics.
+ *
+ * @return the statistics as a JSON string
+ */
+ public String getEventGenerationStats() {
+ return EventGeneratorEndpoint.getEventGenerationStats();
+ }
+
+ /**
+ * Check if event generation is finished.
+ *
+ * @return true if event generation is finished
+ */
+ public boolean isFinished() {
+ return EventGeneratorEndpoint.isFinished();
+ }
+
+ /**
+ * Tear down the event generator.
+ */
+ public void tearDown() {
+ LOGGER.info("Event generator shutting down");
+
+ eventGeneratorServer.shutdown();
+
+ if (parameters.getOutFile() != null) {
+ try {
+ TextFileUtils.putStringAsTextFile(getEventGenerationStats(), parameters.getOutFile());
+ }
+ catch (IOException ioe) {
+ LOGGER.warn("could not output statistics to file \"" + parameters.getOutFile() + "\"", ioe);
+ }
+ }
+
+ LOGGER.info("Event generator shut down");
+ }
+
+ /**
+ * Get the base URI for the server.
+ *
+ * @return the base URI
+ */
+ private URI getBaseUri() {
+ String baseUri = "http://" + parameters.getHost() + ':' + parameters.getPort() + '/' + "/EventGenerator";
+ return URI.create(baseUri);
+ }
+
+ /**
+ * This class is a shutdown hook for the Apex editor command.
+ */
+ private class EventGeneratorShutdownHook implements Runnable {
+ /*
+ * (non-Javadoc)
+ *
+ * @see java.lang.Runnable#run()
+ */
+ @Override
+ public void run() {
+ tearDown();
+ }
+ }
+
+ /**
+ * The main method.
+ *
+ * @param args the arguments
+ * @throws Exception the exception
+ */
+ public static void main(final String[] args) {
+ LOGGER.info("Starting event generator with arguments: " + Arrays.toString(args));
+
+ EventGeneratorParameterHandler parameterHandler = new EventGeneratorParameterHandler();
+
+ EventGeneratorParameters parameters = null;
+
+ try {
+ parameters = parameterHandler.parse(args);
+ }
+ catch (ParseException pe) {
+ LOGGER.trace("Event generator start exception", pe);
+ LOGGER.info("Start of event generator failed: {}", pe.getMessage());
+ return;
+ }
+
+ // Null parameters means we print help
+ if (parameters == null) {
+ LOGGER.info(parameterHandler.getHelp(EventGenerator.class.getName()));
+ return;
+ }
+
+ // Start the event generator
+ EventGenerator eventGenerator = new EventGenerator(parameters);
+ LOGGER.info("Event generator started");
+
+ // Wait for event generation to finish
+ while (!eventGenerator.isFinished()) {
+ ThreadUtilities.sleep(200);
+ }
+
+
+ // Shut down the server
+ eventGenerator.tearDown();
+
+ LOGGER.info("Event generator statistics\n" + eventGenerator.getEventGenerationStats());
+
+ LOGGER.info("Event generator finished");
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java
new file mode 100644
index 000000000..ed624fb83
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpoint.java
@@ -0,0 +1,177 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import com.google.gson.Gson;
+
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.inject.Inject;
+import javax.inject.Provider;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Response;
+
+import org.glassfish.grizzly.http.server.Request;
+import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events.OutputEvent;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+/**
+ * This class is the REST end point for event simulator REST calls.
+ */
+@Path("/")
+public class EventGeneratorEndpoint {
+ // Get a reference to the logger
+ private static final XLogger LOGGER = XLoggerFactory.getXLogger(EventGeneratorEndpoint.class);
+
+ // Parameters for event generation
+ private static EventGeneratorParameters parameters = new EventGeneratorParameters();
+
+ // The map of event batches sent in the test
+ private static ConcurrentHashMap<Integer, EventBatch> batchMap = new ConcurrentHashMap<>();
+
+ // Flag indicating that event processing has finished
+ private static boolean finished = false;
+
+ // The current HTTP request
+ private final Provider<Request> httpRequest;
+
+ /**
+ * Inject the HTTP request with a constructor.
+ * @param httpRequest the current request
+ */
+ @Inject
+ public EventGeneratorEndpoint(final Provider<Request> httpRequest) {
+ this.httpRequest = httpRequest;
+ }
+
+ /**
+ * Set the parameters for the end point.
+ *
+ * @param incomingParameters the new parameters
+ */
+ public static void setParameters(EventGeneratorParameters incomingParameters) {
+ synchronized (parameters) {
+ parameters = incomingParameters;
+ }
+ }
+
+ /**
+ * Get event generator statistics.
+ *
+ * @return the response
+ */
+ @Path("/Stats")
+ @GET
+ public Response serviceGetStats() {
+ return Response.status(200).entity(new EventGeneratorStats(batchMap).getStatsAsJsonString()).build();
+ }
+
+ /**
+ * Generate a single event.
+ *
+ * @return the event
+ */
+ @Path("/GetEvents")
+ @GET
+ public Response getEvents() {
+ ThreadUtilities.sleep(parameters.getDelayBetweenBatches());
+
+ // Check if event generation is finished
+ if (isFinished()) {
+ return Response.status(204).build();
+ }
+
+ // A batch count of 0 means to continue to handle events for ever
+ if (parameters.getBatchCount() > 0 && batchMap.size() >= parameters.getBatchCount()) {
+ setFinished(true);
+ return Response.status(204).build();
+ }
+
+ EventBatch batch = new EventBatch(parameters.getBatchSize(), getApexClient());
+ batchMap.put(batch.getBatchNumber(), batch);
+
+ return Response.status(200).entity(batch.getBatchAsJsonString()).build();
+ }
+
+ /**
+ * Get a single response to an event.
+ *
+ * @param jsonString the json string
+ * @return the response
+ */
+ @Path("/PostEvent")
+ @POST
+ public Response postEventResponse(final String jsonString) {
+ final OutputEvent outputEvent = new Gson().fromJson(jsonString, OutputEvent.class);
+
+ EventBatch batch = batchMap.get(outputEvent.findBatchNumber());
+
+ if (batch == null) {
+ String errorMessage = "no input event found for received output event " + outputEvent;
+ LOGGER.warn(errorMessage);
+ return Response.status(409).build();
+ }
+
+ batch.handleResponse(outputEvent);
+ return Response.status(200).build();
+ }
+
+ /**
+ * Get the name, address, and port of the Apex client getting the events.
+ *
+ * @return the Apex client
+ */
+ private String getApexClient() {
+ return httpRequest.get().getRemoteHost() + '(' + httpRequest.get().getRemoteAddr() + "):"
+ + httpRequest.get().getRemotePort();
+ }
+
+ /**
+ * Get event generation statistics.
+ * @return the statistics on event generation
+ */
+ protected static String getEventGenerationStats() {
+ return new EventGeneratorStats(batchMap).getStatsAsJsonString();
+ }
+
+ /**
+ * Clear event generation statistics.
+ */
+ protected static void clearEventGenerationStats() {
+ batchMap.clear();
+ }
+
+ /**
+ * Check if event generation has finished.
+ * @return true if event generation has finished
+ */
+ protected static boolean isFinished() {
+ return finished;
+ }
+
+ protected static void setFinished(boolean finished) {
+ EventGeneratorEndpoint.finished = finished;
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParameterHandler.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParameterHandler.java
new file mode 100644
index 000000000..4cc94712f
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParameterHandler.java
@@ -0,0 +1,214 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import com.google.gson.Gson;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Arrays;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.DefaultParser;
+import org.apache.commons.cli.HelpFormatter;
+import org.apache.commons.cli.Option;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.ParseException;
+import org.onap.policy.apex.model.utilities.TextFileUtils;
+import org.slf4j.ext.XLogger;
+import org.slf4j.ext.XLoggerFactory;
+
+/**
+ * This class reads and handles command line parameters to the event generator.
+ */
+public class EventGeneratorParameterHandler {
+ // Get a reference to the logger
+ private static final XLogger LOGGER = XLoggerFactory.getXLogger(EventGeneratorParameterHandler.class);
+
+ private static final String CONFIGURATION_FILE = "configuration-file";
+ private static final String PORT = "port";
+ private static final String HOST = "host";
+ private static final String HELP = "help";
+ private static final String BATCH_SIZE = "batch-size";
+ private static final String BATCH_COUNT = "batch-count";
+ private static final String BATCH_DELAY = "delay-between-batches";
+ private static final String OUTPUT_FILE = "output-file";
+
+ private static final int MAX_HELP_LINE_LENGTH = 120;
+
+ // Apache Commons CLI options
+ private final Options options;
+
+ /**
+ * Construct the options for the CLI editor.
+ */
+ public EventGeneratorParameterHandler() {
+ options = new Options();
+ options.addOption(Option.builder("h").longOpt(HELP).desc("outputs the usage of this command").required(false)
+ .type(Boolean.class).build());
+ options.addOption(Option.builder("H").longOpt(HOST)
+ .desc("the host name on which to start the event generation server, defaults to \"localhost\"")
+ .hasArg().argName(HOST).required(false).type(String.class).build());
+ options.addOption(Option.builder("p").longOpt(PORT)
+ .desc("the port on which to start the event generation server, defaults to 42339").hasArg()
+ .argName(PORT).required(false).type(Number.class).build());
+ options.addOption(Option.builder("c").longOpt(CONFIGURATION_FILE)
+ .desc("name of a file containing the parameters for the event generations server, "
+ + "this option must appear on its own")
+ .hasArg().argName(CONFIGURATION_FILE).required(false).type(String.class).build());
+ options.addOption(Option.builder("o").longOpt(OUTPUT_FILE)
+ .desc("path and name of a file to which output will be written,"
+ + " if not specified no output is written")
+ .hasArg().argName(OUTPUT_FILE).required(false).type(String.class).build());
+ options.addOption(Option.builder("bc").longOpt(BATCH_COUNT)
+ .desc("the number of batches of events to send, must be 0 or more, "
+ + "0 means send event batches forever, defaults to 1")
+ .hasArg().argName(BATCH_COUNT).required(false).type(Number.class).build());
+ options.addOption(Option.builder("bs").longOpt(BATCH_SIZE)
+ .desc("the number of events to send in an event batch, must be 1 or more, defaults to 1")
+ .hasArg().argName(BATCH_SIZE).required(false).type(Number.class).build());
+ options.addOption(Option.builder("bd").longOpt(BATCH_DELAY)
+ .desc("the delay in milliseconds between event batches, must be zero or more, "
+ + "defaults to 10,000 (10 seconds)")
+ .hasArg().argName(BATCH_DELAY).required(false).type(Number.class).build());
+ }
+
+ /**
+ * Parse the command line options.
+ *
+ * @param args The arguments
+ * @return the CLI parameters
+ * @throws ParseException on parse errors
+ */
+ public EventGeneratorParameters parse(final String[] args) throws ParseException {
+ CommandLine commandLine = new DefaultParser().parse(options, args);
+ final String[] remainingArgs = commandLine.getArgs();
+
+ if (remainingArgs.length > 0) {
+ throw new ParseException("too many command line arguments specified : " + Arrays.toString(remainingArgs));
+ }
+
+ if (commandLine.hasOption('h')) {
+ return null;
+ }
+
+ EventGeneratorParameters parameters = new EventGeneratorParameters();
+
+ if (commandLine.hasOption('c')) {
+ parameters = getParametersFromJsonFile(commandLine.getOptionValue(CONFIGURATION_FILE));
+ }
+
+ parseFlags(commandLine, parameters);
+
+ if (commandLine.hasOption('o')) {
+ parameters.setOutFile(commandLine.getOptionValue(OUTPUT_FILE));
+ }
+
+ if (!parameters.isValid()) {
+ throw new ParseException("specified parameters are not valid: " + parameters.validate().getResult());
+ }
+
+ return parameters;
+ }
+
+ /**
+ * Parse the command flags.
+ *
+ * @param commandLine the command line to parse
+ * @param parameters the parameters we are parsing into
+ * @throws ParseException on parse errors
+ */
+ private void parseFlags(CommandLine commandLine, EventGeneratorParameters parameters) throws ParseException {
+ if (commandLine.hasOption('H')) {
+ parameters.setHost(commandLine.getOptionValue(HOST));
+ }
+
+ if (commandLine.hasOption('p')) {
+ parameters.setPort(((Number) commandLine.getParsedOptionValue(PORT)).intValue());
+ }
+
+ if (commandLine.hasOption("bc")) {
+ parameters.setBatchCount(((Number) commandLine.getParsedOptionValue(BATCH_COUNT)).intValue());
+ }
+
+ if (commandLine.hasOption("bs")) {
+ parameters.setBatchSize(((Number) commandLine.getParsedOptionValue(BATCH_SIZE)).intValue());
+ }
+
+ if (commandLine.hasOption("bd")) {
+ parameters.setDelayBetweenBatches(((Number) commandLine.getParsedOptionValue(BATCH_DELAY)).longValue());
+ }
+ }
+
+ /**
+ * Get the parameters from a JSON file.
+ *
+ * @param configurationFile the location of the configuration file
+ * @return the parameters read from the JSON file
+ * @throws ParseException on errors reading the parameters
+ */
+ private EventGeneratorParameters getParametersFromJsonFile(String configurationFile) throws ParseException {
+ String parameterJsonString = null;
+
+ try {
+ parameterJsonString = TextFileUtils.getTextFileAsString(configurationFile);
+ } catch (IOException ioe) {
+ String errorMessage = "Could not read parameters from configuration file \"" + configurationFile + "\": "
+ + ioe.getMessage();
+ LOGGER.warn(errorMessage, ioe);
+ throw new ParseException(errorMessage);
+ }
+
+ if (parameterJsonString == null || parameterJsonString.trim().length() == 0) {
+ String errorMessage = "No parameters found in configuration file \"" + configurationFile + "\"";
+ LOGGER.warn(errorMessage);
+ throw new ParseException(errorMessage);
+ }
+
+ try {
+ return new Gson().fromJson(parameterJsonString, EventGeneratorParameters.class);
+ } catch (Exception ge) {
+ String errorMessage = "Error parsing JSON parameters from configuration file \"" + configurationFile
+ + "\": " + ge.getMessage();
+ LOGGER.warn(errorMessage, ge);
+ throw new ParseException(errorMessage);
+ }
+ }
+
+ /**
+ * Get help information.
+ *
+ * @param mainClassName the main class name for the help output
+ * @return help string
+ */
+ public String getHelp(final String mainClassName) {
+ final StringWriter stringWriter = new StringWriter();
+ final PrintWriter stringPrintWriter = new PrintWriter(stringWriter);
+
+ final HelpFormatter helpFormatter = new HelpFormatter();
+ helpFormatter.printHelp(stringPrintWriter, MAX_HELP_LINE_LENGTH, mainClassName + " [options...] ", "", options,
+ 0, 0, "");
+
+ return stringWriter.toString();
+ }
+
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParameters.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParameters.java
new file mode 100644
index 000000000..8eb41b4e3
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParameters.java
@@ -0,0 +1,156 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import org.onap.policy.common.parameters.GroupValidationResult;
+import org.onap.policy.common.parameters.ParameterGroup;
+import org.onap.policy.common.parameters.ValidationStatus;
+
+/**
+ * This class defines the parameters for event generation.
+ */
+public class EventGeneratorParameters implements ParameterGroup {
+ // @formatter:off
+ private static final String DEFAULT_NAME = EventGeneratorParameters.class.getSimpleName();
+ private static final String DEFAULT_HOST = "localhost";
+ private static final int DEFAULT_PORT = 32801;
+ private static final int DEFAULT_BATCH_COUNT = 1;
+ private static final int DEFAULT_BATCH_SIZE = 1;
+ private static final long DEFAULT_DELAY_BETWEEN_BATCHES = 2000;
+
+ private String name = DEFAULT_NAME;
+ private String host = DEFAULT_HOST;
+ private int port = DEFAULT_PORT;
+ private int batchCount = DEFAULT_BATCH_COUNT;
+ private int batchSize = DEFAULT_BATCH_SIZE;
+ private long delayBetweenBatches = DEFAULT_DELAY_BETWEEN_BATCHES;
+ private String outFile = null;
+ // @formatter:on
+
+ /**
+ * Create default parameters.
+ */
+ public EventGeneratorParameters() {
+ // Default parameters are generated
+ }
+
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ @Override
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public int getPort() {
+ return port;
+ }
+
+ public void setPort(int port) {
+ this.port = port;
+ }
+
+ public int getBatchCount() {
+ return batchCount;
+ }
+
+ public void setBatchCount(int batchCount) {
+ this.batchCount = batchCount;
+ }
+
+ public int getBatchSize() {
+ return batchSize;
+ }
+
+ public void setBatchSize(int batchSize) {
+ this.batchSize = batchSize;
+ }
+
+ public long getDelayBetweenBatches() {
+ return delayBetweenBatches;
+ }
+
+ public void setDelayBetweenBatches(long delayBetweenBatches) {
+ this.delayBetweenBatches = delayBetweenBatches;
+ }
+
+ public String getOutFile() {
+ return outFile;
+ }
+
+ public void setOutFile(String outFile) {
+ this.outFile = outFile;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public GroupValidationResult validate() {
+ GroupValidationResult validationResult = new GroupValidationResult(this);
+
+ if (isNullOrBlank(name)) {
+ validationResult.setResult("name", ValidationStatus.INVALID, "name must be a non-blank string");
+ }
+
+ if (isNullOrBlank(host)) {
+ validationResult.setResult("host", ValidationStatus.INVALID, "host must be a non-blank string");
+ }
+
+ if (port < 1024 || port > 65535) {
+ validationResult.setResult("port", ValidationStatus.INVALID,
+ "port must be an integer between 1024 and 65535 inclusive");
+ }
+
+ if (batchCount < 0) {
+ validationResult.setResult("batchCount", ValidationStatus.INVALID,
+ "batchCount must be an integer with a value of zero or more, "
+ + "zero means generate batches forever");
+ }
+
+ if (batchSize < 1) {
+ validationResult.setResult("batchSize", ValidationStatus.INVALID,
+ "batchSize must be an integer greater than zero");
+ }
+
+ if (delayBetweenBatches < 0) {
+ validationResult.setResult("batchSize", ValidationStatus.INVALID,
+ "batchSize must be an integer with a value of zero or more");
+ }
+
+ return validationResult;
+ }
+
+ private boolean isNullOrBlank(final String stringValue) {
+ return stringValue == null || stringValue.trim().length() == 0;
+ }
+
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorStats.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorStats.java
new file mode 100644
index 000000000..f3a5372bf
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorStats.java
@@ -0,0 +1,59 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import com.google.gson.GsonBuilder;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This class creates statistics for the event generator's current status.
+ */
+public class EventGeneratorStats {
+ private final EventBatchStats totalStats;
+ private final List<EventBatchStats> batchStatsList = new ArrayList<>();
+
+ /**
+ * Create the statistics using the current batch map.
+ * @param batchMap the batch map to use
+ */
+ public EventGeneratorStats(final Map<Integer, EventBatch> batchMap) {
+ for (EventBatch eventBatch: batchMap.values()) {
+ batchStatsList.add(new EventBatchStats(eventBatch));
+ }
+
+ totalStats = new EventBatchStats(batchStatsList);
+ }
+
+ /**
+ * Get the batch statistics as a JSON string.
+ * @return the statistics as a JSON string
+ */
+ public String getStatsAsJsonString() {
+ return new GsonBuilder().setPrettyPrinting().create().toJson(this);
+ }
+
+ public EventBatchStats getTotalStats() {
+ return totalStats;
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/InputEvent.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/InputEvent.java
new file mode 100644
index 000000000..cf70ea2f1
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/InputEvent.java
@@ -0,0 +1,142 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator.events;
+
+import com.google.gson.GsonBuilder;
+import com.google.gson.annotations.SerializedName;
+
+import java.util.Random;
+
+/**
+ * This class is a POJO representing an input event for load testing.
+ */
+public class InputEvent {
+ private String nameSpace = "org.onap.policy.apex.sample.events";
+ private String name;
+ private String version = "0.0.1";
+ private String source = "EventGenerator";
+ private String target = "Apex";
+
+ @SerializedName(value = "TestSlogan")
+ private String testSlogan;
+
+ @SerializedName(value = "TestMatchCase")
+ private int testMatchCase;
+
+ @SerializedName(value = "TestTimestamp")
+ private long testTimestamp = System.nanoTime();
+
+ @SerializedName(value = "TestTemperature")
+ private double testTemperature;
+
+ /**
+ * Constructor, assign default values to fields.
+ */
+ public InputEvent() {
+ final Random rand = new Random();
+ testMatchCase = rand.nextInt(4);
+ name = "Event0" + rand.nextInt(2) + "00";
+ testTemperature = rand.nextDouble() * 1000;
+ }
+
+ public String getNameSpace() {
+ return nameSpace;
+
+ }
+
+ public void setNameSpace(String nameSpace) {
+ this.nameSpace = nameSpace;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getSource() {
+ return source;
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+
+ public String getTarget() {
+ return target;
+ }
+
+
+ public void setTarget(String target) {
+ this.target = target;
+ }
+
+ public String getTestSlogan() {
+ return testSlogan;
+ }
+
+ public void setTestSlogan(String testSlogan) {
+ this.testSlogan = testSlogan;
+ }
+
+ public int getTestMatchCase() {
+ return testMatchCase;
+ }
+
+ public void setTestMatchCase(int testMatchCase) {
+ this.testMatchCase = testMatchCase;
+ }
+
+ public long getTestTimestamp() {
+ return testTimestamp;
+ }
+
+ public void setTestTimestamp(long testTimestamp) {
+ this.testTimestamp = testTimestamp;
+ }
+
+ public double getTestTemperature() {
+ return testTemperature;
+ }
+
+ public void setTestTemperature(double testTemperature) {
+ this.testTemperature = testTemperature;
+ }
+
+ /**
+ * Get a JSON representation of the input event.
+ *
+ * @return the event in JSON format
+ */
+ public String asJson() {
+ return new GsonBuilder().setPrettyPrinting().create().toJson(this);
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/OutputEvent.java b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/OutputEvent.java
new file mode 100644
index 000000000..0350b3f2e
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/OutputEvent.java
@@ -0,0 +1,135 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator.events;
+
+import com.google.gson.annotations.SerializedName;
+
+/**
+ * This class is a POJO representing an output event for load testing.
+ */
+public class OutputEvent extends InputEvent {
+ @SerializedName(value = "TestMatchCaseSelected")
+ private int testMatchCaseSelected;
+
+ @SerializedName(value = "TestMatchStateTime")
+ private long testMatchStateTime;
+
+ @SerializedName(value = "TestEstablishCaseSelected")
+ private int testEstablishCaseSelected;
+
+ @SerializedName(value = "TestEstablishStateTime")
+ private long testEstablishStateTime;
+
+ @SerializedName(value = "TestDecideCaseSelected")
+ private int testDecideCaseSelected;
+
+ @SerializedName(value = "TestDecideStateTime")
+ private long testDecideStateTime;
+
+ @SerializedName(value = "TestActCaseSelected")
+ private int testActCaseSelected;
+
+ @SerializedName(value = "TestActStateTime")
+ private long testActStateTime;
+
+ private long testReceviedTimestamp = System.nanoTime();
+
+ public int getTestMatchCaseSelected() {
+ return testMatchCaseSelected;
+ }
+
+ public void setTestMatchCaseSelected(int testMatchCaseSelected) {
+ this.testMatchCaseSelected = testMatchCaseSelected;
+ }
+
+ public long getTestMatchStateTime() {
+ return testMatchStateTime;
+ }
+
+ public void setTestMatchStateTime(long testMatchStateTime) {
+ this.testMatchStateTime = testMatchStateTime;
+ }
+
+ public int getTestEstablishCaseSelected() {
+ return testEstablishCaseSelected;
+ }
+
+ public void setTestEstablishCaseSelected(int testEstablishCaseSelected) {
+ this.testEstablishCaseSelected = testEstablishCaseSelected;
+ }
+
+ public long getTestEstablishStateTime() {
+ return testEstablishStateTime;
+ }
+
+ public void setTestEstablishStateTime(long testEstablishStateTime) {
+ this.testEstablishStateTime = testEstablishStateTime;
+ }
+
+ public int getTestDecideCaseSelected() {
+ return testDecideCaseSelected;
+ }
+
+ public void setTestDecideCaseSelected(int testDecideCaseSelected) {
+ this.testDecideCaseSelected = testDecideCaseSelected;
+ }
+
+ public long getTestDecideStateTime() {
+ return testDecideStateTime;
+ }
+
+ public void setTestDecideStateTime(long testDecideStateTime) {
+ this.testDecideStateTime = testDecideStateTime;
+ }
+
+ public int getTestActCaseSelected() {
+ return testActCaseSelected;
+ }
+
+ public void setTestActCaseSelected(int testActCaseSelected) {
+ this.testActCaseSelected = testActCaseSelected;
+ }
+
+ public long getTestActStateTime() {
+ return testActStateTime;
+ }
+
+ public void setTestActStateTime(long testActStateTime) {
+ this.testActStateTime = testActStateTime;
+ }
+
+ public long getTestReceviedTimestamp() {
+ return testReceviedTimestamp;
+ }
+
+ public void setTestReceviedTimestamp(long testReceviedTimestamp) {
+ this.testReceviedTimestamp = testReceviedTimestamp;
+ }
+
+ public int findBatchNumber() {
+ return Integer.valueOf(getTestSlogan().substring(0, getTestSlogan().indexOf('-')));
+ }
+
+ public int findEventNumber() {
+ return Integer.valueOf(
+ getTestSlogan().substring(getTestSlogan().indexOf('-') + 1, getTestSlogan().indexOf(':')));
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/EventGeneratorConfig.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/EventGeneratorConfig.json
new file mode 100644
index 000000000..ede72cc60
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/EventGeneratorConfig.json
@@ -0,0 +1,9 @@
+{
+ "name": "EventGenerator",
+ "host": "localhost",
+ "port": 32801,
+ "batchCount": 20,
+ "batchSize": 50,
+ "delayBetweenBatches": 2000,
+ "outFile": null
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby01.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby01.json
new file mode 100644
index 000000000..117d3fbc5
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby01.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 1,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJRUBY.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JRUBY": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jruby.JrubyExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby02.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby02.json
new file mode 100644
index 000000000..0e154ddf7
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby02.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 2,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJRUBY.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JRUBY": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jruby.JrubyExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby04.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby04.json
new file mode 100644
index 000000000..9d1c891b7
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby04.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJRUBY.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JRUBY": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jruby.JrubyExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby08.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby08.json
new file mode 100644
index 000000000..d4fd87af7
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby08.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 8,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJRUBY.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JRUBY": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jruby.JrubyExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby16.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby16.json
new file mode 100644
index 000000000..24c26644c
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby16.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 16,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJRUBY.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JRUBY": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jruby.JrubyExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby32.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby32.json
new file mode 100644
index 000000000..88293b899
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby32.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 32,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJRUBY.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JRUBY": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jruby.JrubyExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby64.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby64.json
new file mode 100644
index 000000000..99a8b3f0f
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/JRuby64.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 64,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJRUBY.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JRUBY": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jruby.JrubyExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java01.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java01.json
new file mode 100644
index 000000000..674e3005e
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java01.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 1,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVA.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVA": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.java.JavaExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java02.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java02.json
new file mode 100644
index 000000000..8c1702026
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java02.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 2,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVA.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVA": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.java.JavaExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java04.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java04.json
new file mode 100644
index 000000000..2602390ae
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java04.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVA.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVA": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.java.JavaExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java08.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java08.json
new file mode 100644
index 000000000..a9d990292
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java08.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 8,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVA.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVA": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.java.JavaExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java16.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java16.json
new file mode 100644
index 000000000..dc1d9f699
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java16.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 16,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVA.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVA": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.java.JavaExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java32.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java32.json
new file mode 100644
index 000000000..0bc52e336
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java32.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 32,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVA.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVA": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.java.JavaExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java64.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java64.json
new file mode 100644
index 000000000..52d074089
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Java64.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 64,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVA.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVA": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.java.JavaExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript01.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript01.json
new file mode 100644
index 000000000..afea5fe45
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript01.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 1,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVASCRIPT.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript02.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript02.json
new file mode 100644
index 000000000..f28dc18b1
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript02.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 2,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVASCRIPT.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript04.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript04.json
new file mode 100644
index 000000000..110996e6a
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript04.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVASCRIPT.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript08.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript08.json
new file mode 100644
index 000000000..67bca6b8a
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript08.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 8,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVASCRIPT.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript16.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript16.json
new file mode 100644
index 000000000..ceff6370c
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript16.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 16,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVASCRIPT.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript32.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript32.json
new file mode 100644
index 000000000..eeb371e29
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript32.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 32,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVASCRIPT.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript64.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript64.json
new file mode 100644
index 000000000..a724f668c
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Javascript64.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 64,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJAVASCRIPT.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JAVASCRIPT": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython01.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython01.json
new file mode 100644
index 000000000..25c4e426c
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython01.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 1,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJYTHON.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JYTHON": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jython.JythonExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython02.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython02.json
new file mode 100644
index 000000000..9f010775a
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython02.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 2,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJYTHON.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JYTHON": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jython.JythonExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython04.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython04.json
new file mode 100644
index 000000000..0bd8c35dd
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython04.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJYTHON.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JYTHON": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jython.JythonExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython08.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython08.json
new file mode 100644
index 000000000..8e7fd3f23
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython08.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 8,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJYTHON.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JYTHON": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jython.JythonExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython16.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython16.json
new file mode 100644
index 000000000..899a6b8ef
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython16.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 16,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJYTHON.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JYTHON": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jython.JythonExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython32.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython32.json
new file mode 100644
index 000000000..9919970d7
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython32.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 32,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJYTHON.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JYTHON": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jython.JythonExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython64.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython64.json
new file mode 100644
index 000000000..8952f45c7
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Jython64.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 64,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelJYTHON.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "JYTHON": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.jython.JythonExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel01.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel01.json
new file mode 100644
index 000000000..3bf7749bd
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel01.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 1,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelMVEL.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel02.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel02.json
new file mode 100644
index 000000000..eb203c872
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel02.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 2,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelMVEL.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel04.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel04.json
new file mode 100644
index 000000000..b62b93e06
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel04.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 4,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelMVEL.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel08.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel08.json
new file mode 100644
index 000000000..d81cf67fe
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel08.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 8,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelMVEL.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel16.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel16.json
new file mode 100644
index 000000000..a211ac7f1
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel16.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 16,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelMVEL.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel32.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel32.json
new file mode 100644
index 000000000..2ca767555
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel32.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 32,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelMVEL.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel64.json b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel64.json
new file mode 100644
index 000000000..488f845b3
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/main/resources/examples/benchmark/Mvel64.json
@@ -0,0 +1,45 @@
+{
+ "engineServiceParameters": {
+ "name": "MyApexEngine",
+ "version": "0.0.1",
+ "id": 45,
+ "instanceCount": 64,
+ "deploymentPort": 12561,
+ "policyModelFileName": "examples/models/SampleDomain/SamplePolicyModelMVEL.xml",
+ "engineParameters": {
+ "executorParameters": {
+ "MVEL": {
+ "parameterClassName": "org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters"
+ }
+ }
+ }
+ },
+ "eventInputParameters": {
+ "FirstConsumer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/GetEvents"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ },
+ "eventOutputParameters": {
+ "FirstProducer": {
+ "carrierTechnologyParameters": {
+ "carrierTechnology": "RESTCLIENT",
+ "parameterClassName": "org.onap.policy.apex.plugins.event.carrier.restclient.RestClientCarrierTechnologyParameters",
+ "parameters": {
+ "url": "http://localhost:32801/EventGenerator/PostEvent"
+ }
+ },
+ "eventProtocolParameters": {
+ "eventProtocol": "JSON"
+ }
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexBaseBenchMarkTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexBaseBenchMarkTest.java
deleted file mode 100644
index fdefd5583..000000000
--- a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexBaseBenchMarkTest.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 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.testsuites.performance.benchmark.engine.benchmark;
-
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.TimeUnit;
-
-import org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters;
-import org.onap.policy.apex.context.parameters.ContextParameters;
-import org.onap.policy.apex.context.parameters.SchemaParameters;
-import org.onap.policy.apex.core.engine.EngineParameters;
-import org.onap.policy.apex.core.engine.ExecutorParameters;
-import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
-import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
-import org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters;
-import org.onap.policy.apex.plugins.executor.java.JavaExecutorParameters;
-import org.onap.policy.apex.plugins.executor.javascript.JavascriptExecutorParameters;
-import org.onap.policy.apex.plugins.executor.jruby.JrubyExecutorParameters;
-import org.onap.policy.apex.plugins.executor.jython.JythonExecutorParameters;
-import org.onap.policy.apex.plugins.executor.mvel.MvelExecutorParameters;
-import org.onap.policy.apex.service.engine.event.ApexEvent;
-import org.onap.policy.apex.service.engine.runtime.ApexEventListener;
-import org.onap.policy.apex.service.engine.runtime.EngineService;
-import org.onap.policy.apex.service.engine.runtime.EngineServiceEventInterface;
-import org.onap.policy.apex.service.engine.runtime.impl.EngineServiceImpl;
-import org.onap.policy.apex.service.parameters.engineservice.EngineServiceParameters;
-import org.onap.policy.apex.testsuites.performance.benchmark.engine.runtime.ApexServiceModelUpdateTest;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
-/**
- * The Class ApexBaseBenchMarkTest.
- */
-public class ApexBaseBenchMarkTest {
- private static final long STOP_TIME_OUT = TimeUnit.SECONDS.toMillis(30);
- private static final XLogger LOGGER = XLoggerFactory.getXLogger(ApexServiceModelUpdateTest.class);
- private static final long MAX_START_WAIT = TimeUnit.SECONDS.toMillis(10);
- private final AxArtifactKey engineServiceKey = new AxArtifactKey("Machine-1_process-1_engine-1", "0.0.0");
- private final String model;
- private final int threads;
- private final ApexEventListener listener;
- private EngineService service;
- private EngineServiceEventInterface engineServiceEventInterface;
-
-
- /**
- * Instantiates a new apex base bench mark test.
- *
- * @param model the model
- * @param threads the threads
- * @param listener the listener
- */
- public ApexBaseBenchMarkTest(final String model, final int threads, final ApexEventListener listener) {
- this.model = model;
- this.threads = threads;
- this.listener = listener;
- }
-
- /**
- * Sets the up.
- *
- * @throws Exception the exception
- */
- public void setUp() throws Exception {
- final EngineServiceParameters parameters = new EngineServiceParameters();
- parameters.setInstanceCount(threads);
- parameters.setName(engineServiceKey.getName());
- parameters.setVersion(engineServiceKey.getVersion());
- parameters.setId(100);
-
- final EngineParameters engineParameters = parameters.getEngineParameters();
- final Map<String, ExecutorParameters> executorParameterMap = engineParameters.getExecutorParameterMap();
- executorParameterMap.put("MVEL", new MvelExecutorParameters());
- executorParameterMap.put("JAVASCRIPT", new JavascriptExecutorParameters());
- executorParameterMap.put("JYTHON", new JythonExecutorParameters());
- executorParameterMap.put("JAVA", new JavaExecutorParameters());
- executorParameterMap.put("JRUBY", new JrubyExecutorParameters());
-
- final ContextParameters contextParameters = engineParameters.getContextParameters();
- final SchemaParameters schemaParameters = contextParameters.getSchemaParameters();
- schemaParameters.getSchemaHelperParameterMap().put("Avro", new AvroSchemaHelperParameters());
- schemaParameters.getSchemaHelperParameterMap().put("Java", new JavaSchemaHelperParameters());
- service = EngineServiceImpl.create(parameters);
-
- service = EngineServiceImpl.create(parameters);
- service.registerActionListener("listener", listener);
- service.updateModel(parameters.getEngineKey(), model, true);
-
- LOGGER.info("Starting EngineService ... ");
- service.startAll();
-
- final long starttime = System.currentTimeMillis();
- while (!service.isStarted() && System.currentTimeMillis() - starttime < MAX_START_WAIT) {
- ThreadUtilities.sleep(50);
- }
- if (!service.isStarted()) {
- LOGGER.error("Apex Service {} failed to start after {} ms", service.getKey(), MAX_START_WAIT);
- new ApexException("Unable to start engine service ");
- }
-
- engineServiceEventInterface = service.getEngineServiceEventInterface();
- }
-
- /**
- * Send events.
- *
- * @param events the events
- */
- public void sendEvents(final List<ApexEvent> events) {
- for (final ApexEvent event : events) {
- engineServiceEventInterface.sendEvent(event);
- }
- }
-
- /**
- * Send event.
- *
- * @param event the event
- */
- public void sendEvent(final ApexEvent event) {
- engineServiceEventInterface.sendEvent(event);
- }
-
-
- /**
- * Gets the service.
- *
- * @return the service
- */
- public EngineService getService() {
- return service;
- }
-
- /**
- * Destroy.
- *
- * @throws Exception the exception
- */
- public void destroy() throws Exception {
- if (service != null) {
- LOGGER.info("Stopping EngineService ... ");
- service.stop();
- final long currentTimeInMillSec = System.currentTimeMillis();
- while (!service.isStopped()) {
- if (System.currentTimeMillis() - currentTimeInMillSec > STOP_TIME_OUT) {
- LOGGER.warn("Timed Out EngineService status: ", service.isStopped());
- break;
- }
- ThreadUtilities.sleep(500);
- }
- service = null;
- }
- }
-
-}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexEngineBenchmarkTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexEngineBenchmarkTest.java
deleted file mode 100644
index 99035f7bf..000000000
--- a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexEngineBenchmarkTest.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*-
- * ============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.testsuites.performance.benchmark.engine.benchmark;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.concurrent.TimeUnit;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
-import org.onap.policy.apex.service.engine.event.ApexEvent;
-import org.onap.policy.apex.testsuites.integration.common.model.EvalDomainModelFactory;
-import org.onap.policy.apex.testsuites.performance.benchmark.engine.utils.Utils;
-import org.python.icu.impl.Assert;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
-/**
- * The Class ApexEngineBenchmark.
- */
-public class ApexEngineBenchmarkTest {
- // Logger for this class
- private static final XLogger LOGGER = XLoggerFactory.getXLogger(ApexEngineBenchmarkTest.class);
-
- private static final String TARGET = "apex";
- private static final String SOURCE = "test";
- private static final String NAME = "Event0000";
- private static final String VERSION = "0.0.1";
- private static final String PACKAGE = "org.onap.policy.apex.domains.sample.events";
-
- private static final long TIME_OUT_IN_MILLISEC = TimeUnit.MINUTES.toMillis(1);
-
- private String apexEcaModelString;
- private String apexOodaModelString;
-
- /**
- * Sets the up.
- *
- * @throws Exception the exception
- */
- @Before
- public void setUp() throws Exception {
- apexEcaModelString = Utils.getModelString(new EvalDomainModelFactory().getEcaPolicyModel());
- apexOodaModelString = Utils.getModelString(new EvalDomainModelFactory().getOodaPolicyModel());
- }
-
- /**
- * Test benchmark singleton worker.
- *
- * @throws Exception the exception
- */
- @Test
- public void testBenchmark_SingletonWorker() throws Exception {
- executeTest(apexEcaModelString, 100, 1, 20);
- executeTest(apexOodaModelString, 100, 1, 20);
- }
-
- /**
- * Test benchmark 3 thread worker.
- *
- * @throws Exception the exception
- */
- @Test
- public void testBenchmark_3ThreadWorker() throws Exception {
- executeTest(apexEcaModelString, 1000, 3, 10);
- executeTest(apexOodaModelString, 100, 3, 10);
- }
-
- /**
- * Test benchmark 10 thread worker.
- *
- * @throws Exception the exception
- */
- @Test
- public void testBenchmark_10ThreadWorker() throws Exception {
- executeTest(apexEcaModelString, 2000, 10, 10);
- executeTest(apexOodaModelString, 2000, 10, 10);
- }
-
- /**
- * Test benchmark 50 thread worker.
- *
- * @throws Exception the exception
- */
- @Test
- public void testBenchmark_50ThreadWorker() throws Exception {
- executeTest(apexEcaModelString, 3000, 50, 10);
- executeTest(apexOodaModelString, 3000, 50, 10);
- }
-
- /**
- * Test available processors thread worker.
- *
- * @throws Exception the exception
- */
- @Test
- public void testAvailableProcessorsThreadWorker() throws Exception {
- final int cores = Runtime.getRuntime().availableProcessors();
- executeTest(apexEcaModelString, 3000, cores, 10);
- executeTest(apexOodaModelString, 3000, cores, 10);
- }
-
- /**
- * Execute test.
- *
- * @param policyModel the policy model
- * @param eventsCount the events count
- * @param threads the threads
- * @param loop the loop
- * @throws Exception the exception
- */
- private void executeTest(final String policyModel, final int eventsCount, final int threads, final int loop)
- throws Exception {
-
- LOGGER.info("Running Test with Event count: {}, Instance count: {} and loop: {}", eventsCount, threads, loop);
- final ApexEventListenerTest apexEventListener = new ApexEventListenerTest();
-
- final ApexBaseBenchMarkTest apexBaseBenchMarkTest =
- new ApexBaseBenchMarkTest(policyModel, threads, apexEventListener);
-
- try {
- apexBaseBenchMarkTest.setUp();
- for (int i = 0; i < loop; i++) {
- sendEvents(apexBaseBenchMarkTest, eventsCount);
- final long currentTimeInMillSec = System.currentTimeMillis();
- while (apexEventListener.getEventReceived() < eventsCount) {
- if (System.currentTimeMillis() - currentTimeInMillSec > TIME_OUT_IN_MILLISEC) {
- LOGGER.warn("Wait timed out ... ");
- break;
- }
- ThreadUtilities.sleep(500);
- }
- assertEquals(eventsCount, apexEventListener.getEventReceived());
- apexEventListener.printResult();
- apexEventListener.reset();
- }
- } catch (final Exception exception) {
- Assert.fail(exception);
- } finally {
- apexBaseBenchMarkTest.destroy();
- LOGGER.info("Finished Running Test with Event count: {}, Instance count: {} and loop: {}", eventsCount,
- threads, loop);
- }
- }
-
- /**
- * Send events.
- *
- * @param apexBaseBenchMarkTest the apex base bench mark test
- * @param eventsCount the events count
- * @throws Exception the exception
- */
- public void sendEvents(final ApexBaseBenchMarkTest apexBaseBenchMarkTest, final int eventsCount) throws Exception {
- for (int eventNum = 0; eventNum < eventsCount; eventNum++) {
- final long currentTimeMillis = System.currentTimeMillis();
- final ApexEvent event = new ApexEvent(NAME, VERSION, PACKAGE, SOURCE, TARGET);
- event.put("TestTemperature", eventNum);
- event.put("FirstEventTimestamp", currentTimeMillis);
- event.put("SentTimestamp", currentTimeMillis);
- event.put("EventNumber", eventNum);
- apexBaseBenchMarkTest.sendEvent(event);
- }
- }
-}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexEventListenerTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexEventListenerTest.java
deleted file mode 100644
index a5950df97..000000000
--- a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/engine/benchmark/ApexEventListenerTest.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * Copyright (C) 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.testsuites.performance.benchmark.engine.benchmark;
-
-import static org.junit.Assert.assertNull;
-
-import java.util.Queue;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.onap.policy.apex.service.engine.event.ApexEvent;
-import org.onap.policy.apex.service.engine.runtime.ApexEventListener;
-import org.slf4j.ext.XLogger;
-import org.slf4j.ext.XLoggerFactory;
-
-/**
- * The listener interface for receiving testApexEvent events.
- * The class that is interested in processing a testApexEvent
- * event implements this interface, and the object created
- * with that class is registered with a component using the
- * component's <code>addTestApexEventListener</code> method. When
- * the testApexEvent event occurs, that object's appropriate
- * method is invoked.
- *
- * @see TestApexEventEvent
- */
-public class ApexEventListenerTest implements ApexEventListener {
-
- private static final String SENT_TIMESTAMP = "SentTimestamp";
- private static final XLogger LOGGER = XLoggerFactory.getXLogger(ApexEventListenerTest.class);
- private static final String RECVD_TIMESTAMP = "RecvdTimestamp";
- private Queue<ApexEvent> queue;
-
- private final AtomicLong eventReceived = new AtomicLong();
-
- /**
- * Instantiates a new test apex event listener.
- */
- public ApexEventListenerTest() {
- this.queue = new ConcurrentLinkedQueue<ApexEvent>();
- }
-
- /* (non-Javadoc)
- * @see org.onap.policy.apex.service.engine.runtime.ApexEventListener#onApexEventApexEvent)
- */
- @Override
- public void onApexEvent(final ApexEvent apexEvent) {
- apexEvent.put(RECVD_TIMESTAMP, System.currentTimeMillis());
- eventReceived.incrementAndGet();
- queue.add(apexEvent);
- }
-
- /**
- * Prints the result.
- */
- public void printResult() {
- if (!queue.isEmpty()) {
- long maxTimeInMilliSeconds = 0;
- long minTimeInMilliSeconds = Long.MAX_VALUE;
- final long numEvents = queue.size();
- long totalTimeInMilliSeconds = 0;
- for (final ApexEvent apexEvent : queue) {
- assertNull(apexEvent.getExceptionMessage());
- final Long endTimeInMilliSeconds = (Long) apexEvent.get(RECVD_TIMESTAMP);
- final Long startTimeInMilliSeconds = (Long) apexEvent.get(SENT_TIMESTAMP);
- final long timeTaken = endTimeInMilliSeconds - startTimeInMilliSeconds;
- totalTimeInMilliSeconds += timeTaken;
- if (timeTaken > maxTimeInMilliSeconds) {
- maxTimeInMilliSeconds = timeTaken;
- }
- if (timeTaken < minTimeInMilliSeconds) {
- minTimeInMilliSeconds = timeTaken;
- }
- }
- LOGGER.info("Average Time Taken to process {} events: {} ms", numEvents,
- (totalTimeInMilliSeconds / numEvents));
- LOGGER.info("Max Time Taken: {} ms", maxTimeInMilliSeconds);
- LOGGER.info("Min Time Taken: {} ms", minTimeInMilliSeconds);
- }
- }
-
- /**
- * Reset.
- */
- public void reset() {
- this.queue = new ConcurrentLinkedQueue<ApexEvent>();
- eventReceived.set(0);;
- }
-
- /**
- * Gets the queue.
- *
- * @return the queue
- */
- public Queue<ApexEvent> getQueue() {
- return queue;
- }
-
- /**
- * Gets the event received.
- *
- * @return the event received
- */
- public long getEventReceived() {
- return eventReceived.get();
- }
-
-}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchStatsTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchStatsTest.java
new file mode 100644
index 000000000..b53eb7ace
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchStatsTest.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Test;
+
+/**
+ * Test the EventBatchStats class.
+ *
+ */
+public class EventBatchStatsTest {
+
+ @Test
+ public void test() {
+ EventBatchStats stats = new EventBatchStats(new EventBatch(1, "Label"));
+ assertNotNull(stats);
+
+ assertTrue(stats.getBatchNumber() >= 0);
+ assertEquals(1, stats.getBatchSize());
+ assertEquals("Label", stats.getApexClient());
+
+ List<EventBatchStats> statsList = new ArrayList<>();
+ statsList.add(stats);
+
+ EventBatchStats totalStats = new EventBatchStats(statsList);
+ assertEquals(stats.getBatchSize(), totalStats.getBatchSize());
+
+ List<EventBatchStats> emptyStatsList = new ArrayList<>();
+ EventBatchStats emptyStats = new EventBatchStats(emptyStatsList);
+ assertEquals(0, emptyStats.getBatchSize());
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchTest.java
new file mode 100644
index 000000000..f315f6402
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventBatchTest.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events.InputEvent;
+
+/**
+ * Test the EventBatch class.
+ *
+ */
+public class EventBatchTest {
+
+ @Test
+ public void testEventBatch() {
+ EventBatch batch = new EventBatch(1, "TheApexClient");
+ assertNotNull(batch);
+
+ assertEquals("\"nameSpace\": \"org.onap.policy.apex.sample.events\"", batch.getBatchAsJsonString().substring(4, 53));
+
+ EventBatchStats stats = batch.getStats();
+ assertEquals(1, stats.getBatchSize());
+
+ InputEvent ie = batch.getInputEvent(0);
+ assertEquals("org.onap.policy.apex.sample.events",ie.getNameSpace());
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java
new file mode 100644
index 000000000..2add69857
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorEndpointTest.java
@@ -0,0 +1,115 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import javax.inject.Provider;
+import javax.ws.rs.core.Response;
+
+import org.glassfish.grizzly.http.server.Request;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.events.OutputEvent;
+
+/**
+ * Test the EventGeneratorEndpoint class.
+ *
+ */
+public class EventGeneratorEndpointTest {
+ @Mock
+ private Provider<Request> httpRequestProviderMock;
+
+ @Mock
+ private Request httpRequestMock;
+
+ /**
+ * Set up mocking of the engine service facade.
+ *
+ * @throws ApexException on engine service facade setup errors
+ */
+ @Before
+ public void initializeMocking() throws ApexException {
+ MockitoAnnotations.initMocks(this);
+
+ Mockito.doReturn(httpRequestMock).when(httpRequestProviderMock).get();
+
+ Mockito.doReturn("zooby").when(httpRequestMock).getRemoteHost();
+ Mockito.doReturn(12345).when(httpRequestMock).getRemotePort();
+
+ }
+
+ @Test
+ public void testEventGeneratorEndpointGetStats() {
+ EventGeneratorEndpoint.clearEventGenerationStats();
+ EventGeneratorEndpoint.setFinished(false);
+
+ EventGeneratorEndpoint egep = new EventGeneratorEndpoint(null);
+ assertNotNull(egep);
+
+ Response stats = egep.serviceGetStats();
+ assertEquals(200, stats.getStatus());
+ }
+
+ @Test
+ public void testEventGeneratorEndpointGetEventsZeroBatchCount() {
+ EventGeneratorParameters incomingParameters = new EventGeneratorParameters();
+ incomingParameters.setBatchCount(1);
+
+ EventGeneratorEndpoint.setParameters(incomingParameters);
+ EventGeneratorEndpoint.clearEventGenerationStats();
+ EventGeneratorEndpoint.setFinished(false);
+
+ EventGeneratorEndpoint egep = new EventGeneratorEndpoint(httpRequestProviderMock);
+ assertNotNull(egep);
+
+ Response events = egep.getEvents();
+ assertEquals(200, events.getStatus());
+
+ incomingParameters.setBatchCount(1);
+ events = egep.getEvents();
+ assertEquals(204, events.getStatus());
+ }
+
+ @Test
+ public void testEventGeneratorEndpointPostBadEvent() {
+ EventGeneratorParameters incomingParameters = new EventGeneratorParameters();
+ incomingParameters.setBatchCount(1);
+
+ EventGeneratorEndpoint.setParameters(incomingParameters);
+ EventGeneratorEndpoint.clearEventGenerationStats();
+ EventGeneratorEndpoint.setFinished(false);
+
+ EventGeneratorEndpoint egep = new EventGeneratorEndpoint(httpRequestProviderMock);
+ assertNotNull(egep);
+
+ OutputEvent oe = new OutputEvent();
+ oe.setTestSlogan("99-99: Whatever");
+
+ Response events = egep.postEventResponse(oe.asJson());
+ assertEquals(409, events.getStatus());
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java
new file mode 100644
index 000000000..dd8766dc3
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java
@@ -0,0 +1,325 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import org.apache.commons.cli.ParseException;
+import org.junit.Test;
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.EventGenerator;
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.EventGeneratorParameterHandler;
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.EventGeneratorParameters;
+
+/**
+ * Test event generator parameters.
+ */
+public class EventGeneratorParametersHandlerTest {
+
+ @Test
+ public void testEventGeneratorParameterhandler() {
+ EventGeneratorParameterHandler handler = new EventGeneratorParameterHandler();
+ assertNotNull(handler);
+
+ try {
+ String[] args =
+ { "-h" };
+ EventGeneratorParameters parameters = handler.parse(args);
+ assertNull(parameters);
+ assertEquals("usage: EventGenerator [options...]",
+ handler.getHelp(EventGenerator.class.getSimpleName()).substring(0, 34));
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ {};
+ EventGeneratorParameters parameters = handler.parse(args);
+ assertEquals("localhost", parameters.getHost());
+ assertEquals(32801, parameters.getPort());
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ { "-H", "MyHost" };
+ EventGeneratorParameters parameters = handler.parse(args);
+ assertEquals("MyHost", parameters.getHost());
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ { "-p", "12345" };
+ EventGeneratorParameters parameters = handler.parse(args);
+ assertEquals(12345, parameters.getPort());
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ { "-H", "MyHost", "-p", "12345" };
+ EventGeneratorParameters parameters = handler.parse(args);
+ assertEquals("MyHost", parameters.getHost());
+ assertEquals(12345, parameters.getPort());
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/Valid.json" };
+ EventGeneratorParameters parameters = handler.parse(args);
+ assertEquals("ValidPars", parameters.getName());
+ assertEquals("FileHost", parameters.getHost());
+ assertEquals(54321, parameters.getPort());
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/Default.json" };
+ EventGeneratorParameters parameters = handler.parse(args);
+ assertEquals("localhost", parameters.getHost());
+ assertEquals(32801, parameters.getPort());
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/Default.json", "-bc", "100" };
+ EventGeneratorParameters parameters = handler.parse(args);
+ assertEquals(100, parameters.getBatchCount());
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/Default.json", "-bc", "-1" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("specified parameters are not valid: parameter group \"EventGeneratorParameters\" "
+ + "type \"org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator."
+ + "EventGeneratorParameters\" INVALID, parameter group has status INVALID\n"
+ + " field \"batchCount\" type \"int\" value \"-1\" INVALID, "
+ + "batchCount must be an integer with a value of zero or more, "
+ + "zero means generate batches forever\n", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/Default.json", "-bs", "12345" };
+ EventGeneratorParameters parameters = handler.parse(args);
+ assertEquals(12345, parameters.getBatchSize());
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/Default.json", "-bs", "0" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("specified parameters are not valid: parameter group \"EventGeneratorParameters\" "
+ + "type \"org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator."
+ + "EventGeneratorParameters\" INVALID, parameter group has status INVALID\n"
+ + " field \"batchSize\" type \"int\" value \"0\" INVALID, "
+ + "batchSize must be an integer greater than zero\n", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/Default.json", "-bd", "1000" };
+ EventGeneratorParameters parameters = handler.parse(args);
+ assertEquals(1000, parameters.getDelayBetweenBatches());
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/Default.json", "-bd", "-1" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("specified parameters are not valid: parameter group \"EventGeneratorParameters\" "
+ + "type \"org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator."
+ + "EventGeneratorParameters\" INVALID, parameter group has status INVALID\n"
+ + " field \"batchSize\" type \"int\" value \"1\" INVALID, "
+ + "batchSize must be an integer with a value of zero or more\n", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/Default.json", "-o", "Zooby" };
+ EventGeneratorParameters parameters = handler.parse(args);
+ assertEquals("Zooby", parameters.getOutFile());
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ { "-z" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("Unrecognized option: -z", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-H" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("Missing argument for option: H", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-p" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("Missing argument for option: p", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-p", "12345", "-z" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("Unrecognized option: -z", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-p", "12345", "somethingElse" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("too many command line arguments specified : [somethingElse]", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-c" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("Missing argument for option: c", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-H", "MyHost", "-c", "src/test/resources/parameters/unit/Valid.json" };
+ EventGeneratorParameters pars = handler.parse(args);
+ assertEquals("MyHost", pars.getHost());
+
+ } catch (ParseException pe) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/NonExistant.json" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("Could not read parameters from configuration file "
+ + "\"src/test/resources/parameters/unit/NonExistant.json\": "
+ + "src/test/resources/parameters/unit/NonExistant.json", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/BadHost.json" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("Error parsing JSON parameters from configuration file "
+ + "\"src/test/resources/parameters/unit/BadHost.json\": "
+ + "com.google.gson.stream.MalformedJsonException: "
+ + "Unexpected value at line 3 column 14 path $.host", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/BadPort.json" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("Error parsing JSON parameters from configuration file "
+ + "\"src/test/resources/parameters/unit/BadPort.json\": "
+ + "java.lang.IllegalStateException: Expected an int "
+ + "but was BOOLEAN at line 4 column 18 path $.port", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/Empty.json" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("No parameters found in configuration file "
+ + "\"src/test/resources/parameters/unit/Empty.json\"", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-c", "src/test/resources/parameters/unit/NullHost.json" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("specified parameters are not valid: parameter group \"ValidPars\" "
+ + "type \"org.onap.policy.apex.testsuites.performance."
+ + "benchmark.eventgenerator.EventGeneratorParameters\" INVALID, "
+ + "parameter group has status INVALID\n" + " field \"host\" type \"java.lang.String\" "
+ + "value \"null\" INVALID, host must be a non-blank string\n", pe.getMessage());
+ }
+
+ try {
+ String[] args =
+ { "-p", "1023" };
+ handler.parse(args);
+ fail("test should throw an exception");
+ } catch (ParseException pe) {
+ assertEquals("specified parameters are not valid: parameter group \""
+ + "EventGeneratorParameters\" type \"org.onap.policy.apex.testsuites.performance.benchmark."
+ + "eventgenerator.EventGeneratorParameters\" INVALID, parameter group has status INVALID\n"
+ + " field \"port\" type \"int\" value \"1023\" INVALID, "
+ + "port must be an integer between 1024 and 65535 inclusive\n" + "", pe.getMessage());
+ }
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersTest.java
new file mode 100644
index 000000000..1071c2f8e
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersTest.java
@@ -0,0 +1,71 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.EventGeneratorParameters;
+
+/**
+ * Test event generator parameters.
+ */
+public class EventGeneratorParametersTest {
+
+ @Test
+ public void testEventGeneratorParameters() {
+ EventGeneratorParameters parameters = new EventGeneratorParameters();
+
+ parameters.setName("TheName");
+ assertEquals("TheName", parameters.getName());
+
+ parameters.setHost("TheHost");
+ assertEquals("TheHost", parameters.getHost());
+
+ parameters.setPort(12345);
+ assertEquals(12345, parameters.getPort());
+
+ assertTrue(parameters.isValid());
+
+ parameters.setName(null);
+ assertFalse(parameters.isValid());
+ parameters.setName(" ");
+ assertFalse(parameters.isValid());
+ parameters.setName("TheName");
+ assertTrue(parameters.isValid());
+
+ parameters.setHost(null);
+ assertFalse(parameters.isValid());
+ parameters.setHost(" ");
+ assertFalse(parameters.isValid());
+ parameters.setHost("TheHost");
+ assertTrue(parameters.isValid());
+
+ parameters.setPort(1023);
+ assertFalse(parameters.isValid());
+ parameters.setPort(65536);
+ assertFalse(parameters.isValid());
+ parameters.setPort(12345);
+ assertTrue(parameters.isValid());
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorStatsTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorStatsTest.java
new file mode 100644
index 000000000..a40bcb5f1
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorStatsTest.java
@@ -0,0 +1,44 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import org.junit.Test;
+
+/**
+ * Test the EventGeneratorStats class.
+ *
+ */
+public class EventGeneratorStatsTest {
+ @Test
+ public void testEventGeneratorStats() {
+ Map<Integer, EventBatch> batchMap = new LinkedHashMap<>();
+ EventGeneratorStats egs = new EventGeneratorStats(batchMap );
+ assertNotNull(egs);
+
+ assertEquals(-1, egs.getTotalStats().getBatchNumber());
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorTest.java
new file mode 100644
index 000000000..e37ea963c
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorTest.java
@@ -0,0 +1,160 @@
+/*-
+ * ============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.testsuites.performance.benchmark.eventgenerator;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.PrintStream;
+
+import org.junit.Test;
+import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.service.engine.main.ApexMain;
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.EventGenerator;
+import org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator.EventGeneratorParameters;
+
+/**
+ * This class tests the event generator.
+ */
+public class EventGeneratorTest {
+ private final ByteArrayOutputStream outContent = new ByteArrayOutputStream();
+
+ private final PrintStream stdout = System.out;
+
+ /**
+ * Test event generation.
+ *
+ * @throws ApexException on Apex exceptions
+ */
+ @Test
+ public void testEventGeneration() throws ApexException {
+ EventGeneratorParameters pars = new EventGeneratorParameters();
+ pars.setBatchCount(1);
+ pars.setBatchSize(10);
+
+ EventGenerator eventGenerator = new EventGenerator(pars);
+
+ final String[] args =
+ { "-rfr", "target", "-c", "target/examples/config/SampleDomain/REST2RESTJsonEventJavascript.json" };
+
+ final ApexMain apexMain = new ApexMain(args);
+
+ while (!eventGenerator.isFinished()) {
+ ThreadUtilities.sleep(200);
+ }
+
+ apexMain.shutdown();
+
+ ThreadUtilities.sleep(5000);
+ eventGenerator.tearDown();
+
+ assertTrue(eventGenerator.getEventGenerationStats().contains("\"apexClient\": \"TOTAL\""));
+ }
+
+ @Test
+ public void testEventGeneratorBadParams() {
+ System.setOut(new PrintStream(outContent));
+
+ final String[] args =
+ { "-zzz" };
+
+ EventGenerator.main(args);
+
+ final String outString = outContent.toString();
+
+ System.setOut(stdout);
+
+ assertTrue(outString.contains("Start of event generator failed: Unrecognized option: -zzz"));
+ }
+
+ @Test
+ public void testEventGeneratorHelp() {
+ System.setOut(new PrintStream(outContent));
+
+ final String[] args = {
+ "-h"
+ };
+
+ EventGenerator.main(args);
+
+ final String outString = outContent.toString();
+
+ System.setOut(stdout);
+
+ assertTrue(outString.contains("outputs the usage of this command"));
+ }
+
+ @Test
+ public void testEventGeneratorStart() {
+
+ System.setOut(new PrintStream(outContent));
+
+ (new Thread() {
+ public void run() {
+ EventGenerator.main(null);
+ }
+ }).start();
+
+ ThreadUtilities.sleep(1000);
+ final String outString = outContent.toString();
+
+ System.setOut(stdout);
+
+ assertTrue(outString.contains("Event generator started"));
+ assertTrue(outString.contains("Event generator shut down"));
+ }
+
+ @Test
+ public void testEventGeneratorOutfileGood() {
+ EventGeneratorParameters pars =new EventGeneratorParameters();
+ pars.setOutFile("target/statsOutFile.json");
+
+ EventGenerator generator = new EventGenerator(pars);
+ assertNotNull(generator);
+
+ generator.tearDown();
+
+ File outFile = new File("target/statsOutFile.json");
+ assertTrue(outFile.exists());
+ outFile.delete();
+ }
+
+ @Test
+ public void testEventGeneratorOutfileBad() {
+ EventGeneratorParameters pars = new EventGeneratorParameters();
+ pars.setOutFile("/I/Dont/Exist");
+
+ EventGenerator generator = new EventGenerator(pars);
+ assertNotNull(generator);
+
+ System.setOut(new PrintStream(outContent));
+
+ generator.tearDown();
+
+ final String outString = outContent.toString();
+ System.setOut(stdout);
+
+ assertTrue(outString.contains("could not output statistics to file \"/I/Dont/Exist\""));
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/InputEventTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/InputEventTest.java
new file mode 100644
index 000000000..82b4cca88
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/InputEventTest.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator.events;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+/**
+ * Test the InputEvent class.
+ *
+ */
+public class InputEventTest {
+
+ @Test
+ public void testInputEvent() {
+ InputEvent ie = new InputEvent();
+ assertNotNull(ie);
+
+ ie.setName("EventName");
+ assertEquals("EventName", ie.getName());
+
+ ie.setNameSpace("a.b.c.d");
+ assertEquals("a.b.c.d", ie.getNameSpace());
+
+ ie.setSource("Source");
+ assertEquals("Source", ie.getSource());
+
+ ie.setTarget("Target");
+ assertEquals("Target", ie.getTarget());
+
+ ie.setTestMatchCase(123);
+ assertEquals(123, ie.getTestMatchCase());
+
+ ie.setTestSlogan("A Slogan");
+ assertEquals("A Slogan", ie.getTestSlogan());
+
+ ie.setTestTemperature(123.45);
+ assertEquals((Double)123.45, (Double)ie.getTestTemperature());
+
+ ie.setTestTimestamp(1234567879);
+ assertEquals(1234567879, ie.getTestTimestamp());
+
+ ie.setVersion("1.2.3");
+ assertEquals("1.2.3", ie.getVersion());
+
+ assertEquals("\"nameSpace\": \"a.b.c.d\",", ie.asJson().substring(4, 27));
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/OutputEventTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/OutputEventTest.java
new file mode 100644
index 000000000..8af87ddbd
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/events/OutputEventTest.java
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 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.testsuites.performance.benchmark.eventgenerator.events;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+import org.junit.Test;
+
+/**
+ * Test the OutputEvent class.
+ *
+ */
+public class OutputEventTest {
+
+ @Test
+ public void test() {
+ OutputEvent oe = new OutputEvent();
+ assertNotNull(oe);
+
+ oe.setTestMatchCaseSelected(32112);
+ assertEquals(32112, oe.getTestMatchCaseSelected());
+
+ oe.setTestMatchStateTime(34455778822L);
+ assertEquals(34455778822L, oe.getTestMatchStateTime());
+
+ oe.setTestEstablishCaseSelected(1321);
+ assertEquals(1321, oe.getTestEstablishCaseSelected());
+
+ oe.setTestEstablishStateTime(13445566778822L);
+ assertEquals(13445566778822L, oe.getTestEstablishStateTime());
+
+ oe.setTestDecideCaseSelected(321);
+ assertEquals(321, oe.getTestDecideCaseSelected());
+
+ oe.setTestDecideStateTime(3445566778822L);
+ assertEquals(3445566778822L, oe.getTestDecideStateTime());
+
+ oe.setTestActCaseSelected(332);
+ assertEquals(332, oe.getTestActCaseSelected());
+
+ oe.setTestActStateTime(34455667788L);
+ assertEquals(34455667788L, oe.getTestActStateTime());
+
+ oe.setTestReceviedTimestamp(134455667788222L);
+ assertEquals(134455667788222L, oe.getTestReceviedTimestamp());
+
+ oe.setTestSlogan("0-0: Whatever");
+ assertEquals(0, oe.findBatchNumber());
+ assertEquals(0, oe.findEventNumber());
+ }
+}
diff --git a/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/BadHost.json b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/BadHost.json
new file mode 100644
index 000000000..473bbd28e
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/BadHost.json
@@ -0,0 +1,5 @@
+{
+ "name": "ValidPars",
+ "host": ,
+ "port": 54321
+} \ No newline at end of file
diff --git a/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/BadPort.json b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/BadPort.json
new file mode 100644
index 000000000..a2a6607ec
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/BadPort.json
@@ -0,0 +1,5 @@
+{
+ "name": "ValidPars",
+ "host": "FileHost",
+ "port": false
+} \ No newline at end of file
diff --git a/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Default.json b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Default.json
new file mode 100644
index 000000000..9e26dfeeb
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Default.json
@@ -0,0 +1 @@
+{} \ No newline at end of file
diff --git a/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Empty.json b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Empty.json
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Empty.json
diff --git a/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/NullHost.json b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/NullHost.json
new file mode 100644
index 000000000..34ac4ca0a
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/NullHost.json
@@ -0,0 +1,5 @@
+{
+ "name": "ValidPars",
+ "host": null,
+ "port": 54321
+} \ No newline at end of file
diff --git a/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Valid.json b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Valid.json
new file mode 100644
index 000000000..c52d859f8
--- /dev/null
+++ b/testsuites/performance/performance-benchmark-test/src/test/resources/parameters/unit/Valid.json
@@ -0,0 +1,5 @@
+{
+ "name": "ValidPars",
+ "host": "FileHost",
+ "port": 54321
+} \ No newline at end of file
diff --git a/testsuites/performance/performance-benchmark-test/src/test/resources/policymodels/SamplePolicyModelMVEL.json b/testsuites/performance/performance-benchmark-test/src/test/resources/policymodels/SamplePolicyModelMVEL.json
deleted file mode 100644
index 95ea511b1..000000000
--- a/testsuites/performance/performance-benchmark-test/src/test/resources/policymodels/SamplePolicyModelMVEL.json
+++ /dev/null
@@ -1,7372 +0,0 @@
-{
- "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"
- }
- }
- ]
- }
- }
- }
-}