aboutsummaryrefslogtreecommitdiffstats
path: root/tools/model-generator
diff options
context:
space:
mode:
Diffstat (limited to 'tools/model-generator')
-rw-r--r--tools/model-generator/pom.xml6
-rw-r--r--tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetter.java6
-rw-r--r--tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliMain.java (renamed from tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Application.java)82
-rw-r--r--tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventMain.java (renamed from tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2event/Application.java)89
-rw-r--r--tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetterTest.java72
-rw-r--r--tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java192
-rw-r--r--tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java176
-rw-r--r--tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventTest.java182
-rw-r--r--tools/model-generator/src/test/resources/models/AADMPolicyModel.json7798
-rw-r--r--tools/model-generator/src/test/resources/models/AnomalyDetectionPolicyModel.json1349
-rw-r--r--tools/model-generator/src/test/resources/models/AutoLearnPolicyModel.json1719
-rw-r--r--tools/model-generator/src/test/resources/models/AvroModel.json3009
-rw-r--r--tools/model-generator/src/test/resources/models/JMSSamplePolicyModel.json456
-rw-r--r--tools/model-generator/src/test/resources/models/MyFirstPolicyModel.json1213
-rw-r--r--tools/model-generator/src/test/resources/models/SamplePolicyModelJAVASCRIPT.json6684
15 files changed, 22968 insertions, 65 deletions
diff --git a/tools/model-generator/pom.xml b/tools/model-generator/pom.xml
index 99e31e624..ca33a4e80 100644
--- a/tools/model-generator/pom.xml
+++ b/tools/model-generator/pom.xml
@@ -56,6 +56,12 @@
<artifactId>cli-codegen</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.onap.policy.apex-pdp.testsuites.integration</groupId>
+ <artifactId>integration-common</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<profiles>
diff --git a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetter.java b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetter.java
index 73bb1269d..2376769e8 100644
--- a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetter.java
+++ b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetter.java
@@ -130,6 +130,9 @@ public class KeyInfoGetter {
* @return UUID of the key, null if key was null
*/
public String getUuid(final AxArtifactKey key) {
+ if (key == null) {
+ return null;
+ }
final AxKeyInfo ki = model.getKeyInformation().get(key);
if (ki == null || ki.getUuid() == null) {
return null;
@@ -144,6 +147,9 @@ public class KeyInfoGetter {
* @return description of the key, null if key was null
*/
public String getDesc(final AxArtifactKey key) {
+ if (key == null) {
+ return null;
+ }
final AxKeyInfo ki = model.getKeyInformation().get(key);
if (ki == null || ki.getDescription() == null) {
return null;
diff --git a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Application.java b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliMain.java
index 34ab414d7..5c40b029b 100644
--- a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Application.java
+++ b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliMain.java
@@ -21,6 +21,8 @@
package org.onap.policy.apex.tools.model.generator.model2cli;
import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.HelpFormatter;
@@ -33,29 +35,21 @@ import org.onap.policy.apex.tools.common.OutputFile;
*
* @author Sven van der Meer &lt;sven.van.der.meer@ericsson.com&gt;
*/
-public final class Application {
+public final class Model2CliMain {
/** The name of the application. */
public static final String APP_NAME = "gen-model2cli";
/** The description 1-liner of the application. */
public static final String APP_DESCRIPTION = "generates CLI Editor Commands from a policy model";
- // Input and output streams
- private static final PrintStream OUT_STREAM = System.out;
- private static final PrintStream ERR_STREAM = System.err;
-
- /**
- * Private constructor to prevent instantiation.
- */
- private Application() {
- }
-
/**
- * Main method to start the application.
- *
+ * Run the tool.
+ *
* @param args the command line arguments
+ * @param outStream for command output
+ * @param errStream for command errors
*/
- public static void main(final String[] args) {
+ Model2CliMain(final String[] args, final PrintStream outStream, final PrintStream errStream) {
final CliParser cli = new CliParser();
cli.addOption(CliOptions.HELP);
cli.addOption(CliOptions.VERSION);
@@ -64,39 +58,35 @@ public final class Application {
cli.addOption(CliOptions.FILEOUT);
cli.addOption(CliOptions.OVERWRITE);
- final CommandLine cmd = cli.parseCli(args);
+ CommandLine cmd = cli.parseCli(args);
// help is an exit option, print usage and exit
- if (cmd.hasOption(CliOptions.HELP.getOpt())) {
- final HelpFormatter formatter = new HelpFormatter();
- OUT_STREAM.println(APP_NAME + " v" + cli.getAppVersion() + " - " + APP_DESCRIPTION);
- formatter.printHelp(APP_NAME, cli.getOptions());
- OUT_STREAM.println();
+ if (cmd == null || cmd.hasOption(CliOptions.HELP.getOpt())) {
+ outStream.println(getHelpString(cli));
+ outStream.println();
return;
}
// version is an exit option, print version and exit
if (cmd.hasOption(CliOptions.VERSION.getOpt())) {
- OUT_STREAM.println(APP_NAME + " " + cli.getAppVersion());
- OUT_STREAM.println();
+ outStream.println(APP_NAME + " " + cli.getAppVersion());
return;
}
String modelFile = cmd.getOptionValue(CliOptions.MODELFILE.getOpt());
- if (modelFile != null) {
- modelFile = cmd.getOptionValue("model");
- }
if (modelFile == null) {
- ERR_STREAM.println(APP_NAME + ": no '-" + CliOptions.MODELFILE.getOpt()
+ errStream.println(APP_NAME + ": no '-" + CliOptions.MODELFILE.getOpt()
+ "' model file given, cannot proceed (try -h for help)");
return;
+ } else {
+ modelFile = cmd.getOptionValue("model");
}
OutputFile outfile = null;
final String of = cmd.getOptionValue(CliOptions.FILEOUT.getOpt());
final boolean overwrite = cmd.hasOption(CliOptions.OVERWRITE.getOpt());
if (overwrite && of == null) {
- ERR_STREAM.println(APP_NAME + ": error with '-" + CliOptions.OVERWRITE.getOpt()
+ errStream.println(APP_NAME + ": error with '-" + CliOptions.OVERWRITE.getOpt()
+ "' option. This option is only valid if a '-" + CliOptions.FILEOUT.getOpt()
+ "' option is also used. Cannot proceed (try -h for help)");
return;
@@ -105,21 +95,47 @@ public final class Application {
outfile = new OutputFile(of, overwrite);
final String isoutfileok = outfile.validate();
if (isoutfileok != null) {
- ERR_STREAM.println(APP_NAME + ": error with '-" + CliOptions.FILEOUT.getOpt() + "' option: \""
+ errStream.println(APP_NAME + ": error with '-" + CliOptions.FILEOUT.getOpt() + "' option: \""
+ isoutfileok + "\". Cannot proceed (try -h for help)");
return;
}
}
if (outfile == null) {
- OUT_STREAM.println();
- OUT_STREAM.println(APP_NAME + ": starting CLI generator");
- OUT_STREAM.println(" --> model file: " + modelFile);
- OUT_STREAM.println();
- OUT_STREAM.println();
+ outStream.println();
+ outStream.println(APP_NAME + ": starting CLI generator");
+ outStream.println(" --> model file: " + modelFile);
+ outStream.println();
+ outStream.println();
}
final Model2Cli app = new Model2Cli(modelFile, outfile, !cmd.hasOption("sv"), APP_NAME);
app.runApp();
}
+
+ /**
+ * Get the help string for the application.
+ *
+ * @param cli the command line options
+ * @return the help string
+ */
+ private String getHelpString(final CliParser cli) {
+ HelpFormatter formatter = new HelpFormatter();
+
+ final StringWriter helpStringWriter = new StringWriter();
+ final PrintWriter helpPrintWriter = new PrintWriter(helpStringWriter);
+
+ formatter.printHelp(helpPrintWriter, 120, APP_NAME, APP_DESCRIPTION, cli.getOptions(), 2, 4, "");
+
+ return helpStringWriter.toString();
+ }
+
+ /**
+ * Main method to start the application.
+ *
+ * @param args the command line arguments
+ */
+ public static void main(final String[] args) {
+ new Model2CliMain(args, System.out, System.err);
+ }
}
diff --git a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2event/Application.java b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventMain.java
index c7fc5e115..ca49b5394 100644
--- a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2event/Application.java
+++ b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventMain.java
@@ -21,12 +21,16 @@
package org.onap.policy.apex.tools.model.generator.model2event;
import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.HelpFormatter;
+import org.onap.policy.apex.context.parameters.SchemaParameters;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
import org.onap.policy.apex.tools.common.CliOptions;
import org.onap.policy.apex.tools.common.CliParser;
+import org.onap.policy.common.parameters.ParameterService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -35,9 +39,9 @@ import org.slf4j.LoggerFactory;
*
* @author Sven van der Meer (sven.van.der.meer@ericsson.com)
*/
-public final class Application {
+public final class Model2EventMain {
// Get a reference to the logger
- private static final Logger LOGGER = LoggerFactory.getLogger(Application.class);
+ private static final Logger LOGGER = LoggerFactory.getLogger(Model2EventMain.class);
/** The name of the application. */
public static final String APP_NAME = "gen-model2event";
@@ -45,20 +49,16 @@ public final class Application {
/** The description 1-liner of the application. */
public static final String APP_DESCRIPTION = "generates JSON templates for events generated from a policy model";
- // Input and output streams
- private static final PrintStream OUT_STREAM = System.out;
- private static final PrintStream ERR_STREAM = System.err;
-
- /** Private constructor to prevent instantiation. */
- private Application() {
- }
-
/**
- * Main method to start the application.
- *
+ * Constructor, run the command.
+ *
* @param args the command line arguments
+ * @param outStream the stream for command output
*/
- public static void main(final String[] args) {
+ Model2EventMain(final String[] args, final PrintStream outStream) {
+ SchemaParameters schemaParameters = new SchemaParameters();
+ ParameterService.register(schemaParameters, true);
+
final CliParser cli = new CliParser();
cli.addOption(CliOptions.HELP);
cli.addOption(CliOptions.VERSION);
@@ -68,36 +68,35 @@ public final class Application {
final CommandLine cmd = cli.parseCli(args);
// help is an exit option, print usage and exit
- if (cmd.hasOption('h') || cmd.hasOption("help")) {
- final HelpFormatter formatter = new HelpFormatter();
- OUT_STREAM.println(APP_NAME + " v" + cli.getAppVersion() + " - " + APP_DESCRIPTION);
- formatter.printHelp(APP_NAME, cli.getOptions());
- OUT_STREAM.println();
+ if (cmd == null || cmd.hasOption('h') || cmd.hasOption("help")) {
+ outStream.println(getHelpString(cli));
+ outStream.println();
return;
}
// version is an exit option, print version and exit
if (cmd.hasOption('v') || cmd.hasOption("version")) {
- OUT_STREAM.println(APP_NAME + " " + cli.getAppVersion());
- OUT_STREAM.println();
+ outStream.println(APP_NAME + " " + cli.getAppVersion());
+ outStream.println();
return;
}
- generateJsonEventScheam(cmd);
+ generateJsonEventSchema(cmd, outStream);
}
/**
* Generate the JSON event schema.
*
* @param cmd the command to run
+ * @param outStream the output stream for output
*/
- private static void generateJsonEventScheam(final CommandLine cmd) {
+ private static void generateJsonEventSchema(final CommandLine cmd, final PrintStream outStream) {
String modelFile = cmd.getOptionValue('m');
if (modelFile == null) {
modelFile = cmd.getOptionValue("model");
}
if (modelFile == null) {
- ERR_STREAM.println(APP_NAME + ": no model file given, cannot proceed (try -h for help)");
+ outStream.println(APP_NAME + ": no model file given, cannot proceed (try -h for help)");
return;
}
@@ -106,28 +105,54 @@ public final class Application {
type = cmd.getOptionValue("type");
}
if (type == null) {
- ERR_STREAM.println(APP_NAME + ": no event type given, cannot proceed (try -h for help)");
+ outStream.println(APP_NAME + ": no event type given, cannot proceed (try -h for help)");
return;
}
if (!"stimuli".equals(type) && !"response".equals(type) && !"internal".equals(type)) {
- ERR_STREAM.println(APP_NAME + ": unknown type <" + type + ">, cannot proceed (try -h for help)");
+ outStream.println(APP_NAME + ": unknown type <" + type + ">, cannot proceed (try -h for help)");
return;
}
- OUT_STREAM.println();
- OUT_STREAM.println(APP_NAME + ": starting Event generator");
- OUT_STREAM.println(" --> model file: " + modelFile);
- OUT_STREAM.println(" --> type: " + type);
- OUT_STREAM.println();
- OUT_STREAM.println();
+ outStream.println();
+ outStream.println(APP_NAME + ": starting Event generator");
+ outStream.println(" --> model file: " + modelFile);
+ outStream.println(" --> type: " + type);
+ outStream.println();
+ outStream.println();
try {
final Model2JsonEventSchema app = new Model2JsonEventSchema(modelFile, type, APP_NAME);
app.runApp();
} catch (final ApexException aex) {
String message = APP_NAME + ": caught APEX exception with message: " + aex.getMessage();
- ERR_STREAM.println(message);
+ outStream.println(message);
LOGGER.warn(message, aex);
}
}
+
+ /**
+ * Get the help string for the application.
+ *
+ * @param cli the command line options
+ * @return the help string
+ */
+ private String getHelpString(final CliParser cli) {
+ HelpFormatter formatter = new HelpFormatter();
+
+ final StringWriter helpStringWriter = new StringWriter();
+ final PrintWriter helpPrintWriter = new PrintWriter(helpStringWriter);
+
+ formatter.printHelp(helpPrintWriter, 120, APP_NAME, APP_DESCRIPTION, cli.getOptions(), 2, 4, "");
+
+ return helpStringWriter.toString();
+ }
+
+ /**
+ * Main method to start the application.
+ *
+ * @param args the command line arguments
+ */
+ public static void main(final String[] args) {
+ new Model2EventMain(args, System.out);
+ }
}
diff --git a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetterTest.java b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetterTest.java
new file mode 100644
index 000000000..e6ecefd12
--- /dev/null
+++ b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/KeyInfoGetterTest.java
@@ -0,0 +1,72 @@
+/*-
+ * ============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.tools.model.generator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
+import org.onap.policy.apex.model.policymodel.concepts.AxState;
+import org.onap.policy.apex.testsuites.integration.common.model.SampleDomainModelFactory;
+
+/**
+ * Test the Key Info Getter.
+ */
+public class KeyInfoGetterTest {
+
+ @Test
+ public void testKeyInfoGetter() {
+ AxPolicyModel sampleModel = new SampleDomainModelFactory().getSamplePolicyModel("JAVASCRIPT");
+
+ KeyInfoGetter kiGetter = new KeyInfoGetter(sampleModel);
+
+ assertNull(kiGetter.getName(null));
+ assertEquals("SamplePolicyModelJAVASCRIPT", kiGetter.getName(sampleModel.getKey()));
+
+ assertNull(kiGetter.getUuid(null));
+ assertNull(kiGetter.getUuid(new AxArtifactKey()));
+ assertEquals(36, kiGetter.getUuid(sampleModel.getKey()).length());
+
+ assertNull(kiGetter.getDesc(null));
+ assertNull(kiGetter.getDesc(new AxArtifactKey()));
+ assertEquals("Generated description for concept referred to by key " + "\"SamplePolicyModelJAVASCRIPT:0.0.1\"",
+ kiGetter.getDesc(sampleModel.getKey()));
+
+ assertNull(kiGetter.getVersion(null));
+ assertEquals("0.0.1", kiGetter.getVersion(sampleModel.getKey()));
+
+ AxState matchState = sampleModel.getPolicies().get("Policy0").getStateMap().get("Match");
+
+ assertNull(kiGetter.getLName(null));
+ assertEquals("Match", kiGetter.getLName(matchState.getKey()));
+
+ assertNull(kiGetter.getPName(null));
+ assertEquals("Policy0", kiGetter.getPName(matchState.getKey()));
+
+ assertNull(kiGetter.getPVersion(null));
+ assertEquals("0.0.1", kiGetter.getPVersion(matchState.getKey()));
+
+ assertNull(kiGetter.getPlName(null));
+ assertEquals("NULL", kiGetter.getPlName(matchState.getKey()));
+ }
+}
diff --git a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java
new file mode 100644
index 000000000..164f187cc
--- /dev/null
+++ b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/SchemaUtilsTest.java
@@ -0,0 +1,192 @@
+/*-
+ * ============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.tools.model.generator;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.avro.Schema;
+import org.apache.avro.Schema.Field;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.onap.policy.apex.context.impl.schema.SchemaHelperFactory;
+import org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelperParameters;
+import org.onap.policy.apex.context.parameters.ContextParameterConstants;
+import org.onap.policy.apex.context.parameters.SchemaParameters;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.basicmodel.concepts.AxModel;
+import org.onap.policy.apex.model.basicmodel.concepts.AxReferenceKey;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader;
+import org.onap.policy.apex.model.basicmodel.service.ModelService;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchema;
+import org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas;
+import org.onap.policy.apex.model.eventmodel.concepts.AxEvent;
+import org.onap.policy.apex.model.eventmodel.concepts.AxInputField;
+import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
+import org.onap.policy.apex.model.utilities.TextFileUtils;
+import org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelper;
+import org.onap.policy.apex.plugins.context.schema.avro.AvroSchemaHelperParameters;
+import org.onap.policy.apex.service.engine.event.ApexEventException;
+import org.onap.policy.common.parameters.ParameterService;
+
+/**
+ * Test the Key Info Getter.
+ */
+public class SchemaUtilsTest {
+ private static AxPolicyModel avroModel;
+
+ /**
+ * Read the models into strings.
+ *
+ * @throws IOException on model reading errors
+ * @throws ApexModelException on model reading exceptions
+ */
+ @BeforeClass
+ public static void readSimpleModel() throws IOException, ApexModelException {
+ String avroModelString = TextFileUtils.getTextFileAsString("src/test/resources/models/AvroModel.json");
+
+ final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class);
+ avroModel = modelReader.read(new ByteArrayInputStream(avroModelString.getBytes()));
+ }
+
+ @Test
+ public void testSchemaUtilsErrors() throws ApexEventException {
+ AxEvent event = avroModel.getEvents().get("CustomerContextEventIn");
+ AxContextSchema avroCtxtSchema = avroModel.getSchemas().get("ctxtTopologyNodesDecl");
+
+ AxArtifactKey topoNodesKey = new AxArtifactKey("albumTopoNodes", "0.0.1");
+ try {
+ SchemaUtils.getEventSchema(event);
+ fail("test should throw an exception");
+ } catch (Exception apEx) {
+ assertEquals("Model for org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas"
+ + " not found in model service", apEx.getMessage());
+ }
+
+ try {
+ Map<String, Schema> preexistingParamSchemas = new LinkedHashMap<>();
+ SchemaUtils.getEventParameterSchema(event.getParameterMap().get("links"), preexistingParamSchemas);
+ fail("test should throw an exception");
+ } catch (Exception apEx) {
+ assertEquals("Model for org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas"
+ + " not found in model service", apEx.getMessage());
+ }
+
+ List<Field> skeletonFields = SchemaUtils.getSkeletonEventSchemaFields();
+ assertEquals(5, skeletonFields.size());
+
+ try {
+ AvroSchemaHelper schemaHelper = (AvroSchemaHelper) new SchemaHelperFactory()
+ .createSchemaHelper(topoNodesKey, avroCtxtSchema.getKey());
+
+ Map<String, Schema> schemaMap = new LinkedHashMap<>();
+ SchemaUtils.processSubSchemas(schemaHelper.getAvroSchema(), schemaMap);
+ fail("test should throw an exception");
+ } catch (Exception apEx) {
+ assertEquals("Model for org.onap.policy.apex.model.contextmodel.concepts.AxContextSchemas"
+ + " not found in model service", apEx.getMessage());
+ }
+ }
+
+ @Test
+ public void testSchemaUtils() throws ApexEventException {
+ ParameterService.clear();
+ final SchemaParameters schemaParameters = new SchemaParameters();
+ schemaParameters.setName(ContextParameterConstants.SCHEMA_GROUP_NAME);
+ ParameterService.register(schemaParameters);
+
+ ModelService.registerModel(AxModel.class, avroModel);
+ ModelService.registerModel(AxContextSchemas.class, avroModel.getSchemas());
+
+ AxEvent event = avroModel.getEvents().get("CustomerContextEventIn");
+ AxContextSchema avroCtxtSchema = avroModel.getSchemas().get("ctxtTopologyNodesDecl");
+ AxArtifactKey topoNodesKey = new AxArtifactKey("albumTopoNodes", "0.0.1");
+
+ Schema eventSchema = SchemaUtils.getEventSchema(event);
+ assertEquals("{\"type\":\"record\",\"name\":\"CustomerContextEventIn\"",
+ eventSchema.toString().substring(0, 48));
+
+ Map<String, Schema> preexistingParamSchemas = new LinkedHashMap<>();
+ Schema epSchema = SchemaUtils.getEventParameterSchema(event.getParameterMap().get("links"),
+ preexistingParamSchemas);
+ assertEquals("\"string\"", epSchema.toString());
+
+ List<Field> skeletonFields = SchemaUtils.getSkeletonEventSchemaFields();
+ assertEquals(5, skeletonFields.size());
+
+ try {
+ AvroSchemaHelper schemaHelper = (AvroSchemaHelper) new SchemaHelperFactory()
+ .createSchemaHelper(topoNodesKey, avroCtxtSchema.getKey());
+
+ Map<String, Schema> schemaMap = new LinkedHashMap<>();
+ SchemaUtils.processSubSchemas(schemaHelper.getAvroSchema(), schemaMap);
+ fail("test should throw an exception");
+ } catch (Exception apEx) {
+ assertEquals("context schema helper parameters not found for context schema \"Avro\"", apEx.getMessage());
+ }
+
+ schemaParameters.getSchemaHelperParameterMap().put("Avro", new AvroSchemaHelperParameters());
+
+ AvroSchemaHelper schemaHelper = (AvroSchemaHelper) new SchemaHelperFactory().createSchemaHelper(topoNodesKey,
+ avroCtxtSchema.getKey());
+
+ Map<String, Schema> schemaMap = new LinkedHashMap<>();
+ try {
+ SchemaUtils.processSubSchemas(schemaHelper.getAvroSchema(), schemaMap);
+ } catch (Exception exc) {
+ fail("test should not throw an exception");
+ }
+
+ eventSchema = SchemaUtils.getEventSchema(event);
+ assertEquals("{\"type\":\"record\",\"name\":\"CustomerContextEventIn\"",
+ eventSchema.toString().substring(0, 48));
+
+ epSchema = SchemaUtils.getEventParameterSchema(event.getParameterMap().get("links"), preexistingParamSchemas);
+ assertEquals("\"string\"", epSchema.toString());
+
+ AxInputField inField = new AxInputField(new AxReferenceKey("FieldParent", "0.0.1", "Field"),
+ avroCtxtSchema.getKey(), false);
+
+ Schema ep2Schema = SchemaUtils.getEventParameterSchema(inField, preexistingParamSchemas);
+ assertEquals("{\"type\":\"record\",\"name\":\"TopologyNodes\"", ep2Schema.toString().substring(0, 39));
+
+ skeletonFields = SchemaUtils.getSkeletonEventSchemaFields();
+ assertEquals(5, skeletonFields.size());
+
+ schemaParameters.getSchemaHelperParameterMap().put("Avro", new JavaSchemaHelperParameters());
+ try {
+ ep2Schema = SchemaUtils.getEventParameterSchema(inField, preexistingParamSchemas);
+ fail("test should throw an exception");
+ } catch (Exception apEx) {
+ assertEquals("FieldParent:0.0.1:NULL:Field: class/type", apEx.getMessage().substring(0, 40));
+ }
+
+ ParameterService.deregister(ContextParameterConstants.SCHEMA_GROUP_NAME);
+ ModelService.clear();
+ }
+}
diff --git a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java
new file mode 100644
index 000000000..170004e7c
--- /dev/null
+++ b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java
@@ -0,0 +1,176 @@
+/*-
+ * ============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.tools.model.generator.model2cli;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.junit.Test;
+
+/**
+ * Test the Model2Cli utility.
+ */
+public class Model2CliTest {
+ @Test
+ public void testModel2Cli() {
+ try {
+ final String[] cliArgs =
+ { "-h" };
+
+ Model2CliMain.main(cliArgs);
+ } catch (Exception exc) {
+ fail("test should not throw an exception");
+ }
+ }
+
+ @Test
+ public void testModel2CliNoOptions() {
+ final String[] cliArgs = new String[]
+ {};
+
+ final String outputString = runModel2Cli(cliArgs);
+
+ assertTrue(outputString
+ .contains("gen-model2cli: no '-m' model file given, cannot proceed (try -h for help)\n"));
+ }
+
+ @Test
+ public void testModel2CliBadOptions() {
+ final String[] cliArgs =
+ { "-zabbu" };
+
+ final String outputString = runModel2Cli(cliArgs);
+
+ assertTrue(outputString.contains("usage: gen-model2cli"));
+ }
+
+ @Test
+ public void testModel2CliHelp() {
+ final String[] cliArgs =
+ { "-h" };
+
+ final String outputString = runModel2Cli(cliArgs);
+
+ assertTrue(outputString.contains("usage: gen-model2cli"));
+ }
+
+ @Test
+ public void testModel2CliVersion() {
+ final String[] cliArgs =
+ { "-v" };
+
+ final String outputString = runModel2Cli(cliArgs);
+
+ assertTrue(outputString.contains("gen-model2cli"));
+ }
+
+ @Test
+ public void testModel2CliOverwrite() throws IOException {
+ File tempFile = File.createTempFile("AvroModel", ".apex");
+ tempFile.deleteOnExit();
+
+ final String[] cliArgs =
+ { "-m", "src/test/resources/models/AvroModel.json", "-o", tempFile.getCanonicalPath() };
+
+ final String outputString = runModel2Cli(cliArgs);
+
+ assertTrue(outputString.contains("gen-model2cli: error with '-o' option: \"file already exists\""));
+ }
+
+ @Test
+ public void testModel2CliAvro() throws IOException {
+ testModel2CliModel("AvroModel");
+ }
+
+ @Test
+ public void testModel2CliAadm() throws IOException {
+ testModel2CliModel("AADMPolicyModel");
+ }
+
+ @Test
+ public void testModel2CliAnomaly() {
+ testModel2CliModel("AnomalyDetectionPolicyModel");
+ }
+
+ @Test
+ public void testModel2CliAutoLearn() {
+ testModel2CliModel("AutoLearnPolicyModel");
+ }
+
+ @Test
+ public void testModel2CliJms() {
+ testModel2CliModel("JMSSamplePolicyModel");
+ }
+
+ @Test
+ public void testModel2CliMfp() {
+ testModel2CliModel("MyFirstPolicyModel");
+ }
+
+ @Test
+ public void testModel2CliSample() {
+ testModel2CliModel("SamplePolicyModelJAVASCRIPT");
+ }
+
+ /**
+ * Run the application.
+ *
+ * @param cliArgs the command arguments
+ * @return a string containing the command output
+ */
+ private String runModel2Cli(final String[] cliArgs) {
+ final ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+ final ByteArrayOutputStream baosErr = new ByteArrayOutputStream();
+
+ new Model2CliMain(cliArgs, new PrintStream(baosOut, true), new PrintStream(baosErr, true));
+
+ String outString = baosOut.toString();
+ String errString = baosErr.toString();
+
+ return "*** StdOut ***\n" + outString + "\n*** StdErr ***\n" + errString;
+ }
+
+ /**
+ * Test CLI generation.
+ *
+ * @param modelName the name of the model file
+ */
+ private void testModel2CliModel(String modelName) {
+ try {
+ File tempFile = File.createTempFile(modelName, ".apex");
+ tempFile.deleteOnExit();
+
+ final String[] cliArgs =
+ { "-m", "src/test/resources/models/" + modelName + ".json", "-o", tempFile.getCanonicalPath(), "-ow" };
+ runModel2Cli(cliArgs);
+
+ assertTrue(tempFile.isFile());
+ assertTrue(tempFile.length() > 0);
+ } catch (Exception e) {
+ fail("test should not throw an exception");
+ }
+ }
+}
diff --git a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventTest.java b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventTest.java
new file mode 100644
index 000000000..1804aca30
--- /dev/null
+++ b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2event/Model2EventTest.java
@@ -0,0 +1,182 @@
+/*-
+ * ============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.tools.model.generator.model2event;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+
+import org.junit.Test;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexRuntimeException;
+
+/**
+ * Test the Model2Event utility.
+ */
+public class Model2EventTest {
+ @Test
+ public void testModel2Event() {
+ try {
+ final String[] EventArgs =
+ { "-h" };
+
+ Model2EventMain.main(EventArgs);
+ } catch (Exception exc) {
+ fail("test should not throw an exception");
+ }
+ }
+
+ @Test
+ public void testModel2EventNoOptions() {
+ final String[] EventArgs = new String[]
+ {};
+
+ final String outputString = runModel2Event(EventArgs);
+
+ assertTrue(outputString.contains("gen-model2event: no model file given, cannot proceed (try -h for help)"));
+ }
+
+ @Test
+ public void testModel2EventBadOptions() {
+ final String[] EventArgs =
+ { "-zabbu" };
+
+ final String outputString = runModel2Event(EventArgs);
+
+ assertTrue(outputString.contains("usage: gen-model2event"));
+ }
+
+ @Test
+ public void testModel2EventHelp() {
+ final String[] EventArgs =
+ { "-h" };
+
+ final String outputString = runModel2Event(EventArgs);
+
+ assertTrue(outputString.contains("usage: gen-model2event"));
+ }
+
+ @Test
+ public void testModel2EventVersion() {
+ final String[] EventArgs =
+ { "-v" };
+
+ final String outputString = runModel2Event(EventArgs);
+
+ assertTrue(outputString.contains("gen-model2event"));
+ }
+
+ @Test
+ public void testModel2EventNoType() {
+ final String[] EventArgs =
+ { "-m", "src/test/resources/models/AvroModel.json" };
+
+ final String outputString = runModel2Event(EventArgs);
+
+ assertTrue(outputString.contains("gen-model2event: no event type given, cannot proceed (try -h for help)"));
+ }
+
+ @Test
+ public void testModel2EventBadType() {
+ final String[] EventArgs =
+ { "-m", "src/test/resources/models/AvroModel.json", "-t", "Zooby" };
+
+ final String outputString = runModel2Event(EventArgs);
+
+ assertTrue(outputString.contains("gen-model2event: unknown type <Zooby>, cannot proceed (try -h for help)"));
+ }
+
+ @Test
+ public void testModel2EventAadm() throws IOException {
+ testModel2EventModel("AADMPolicyModel");
+ }
+
+ @Test
+ public void testModel2EventAnomaly() {
+ testModel2EventModel("AnomalyDetectionPolicyModel");
+ }
+
+ @Test
+ public void testModel2EventAutoLearn() {
+ testModel2EventModel("AutoLearnPolicyModel");
+ }
+
+ @Test
+ public void testModel2EventMfp() {
+ testModel2EventModel("MyFirstPolicyModel");
+ }
+
+ @Test
+ public void testModel2EventSample() {
+ testModel2EventModel("SamplePolicyModelJAVASCRIPT");
+ }
+
+ /**
+ * Run the application.
+ *
+ * @param eventArgs the command arguments
+ * @return a string containing the command output
+ */
+ private String runModel2Event(final String[] eventArgs) {
+ final ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+ final ByteArrayOutputStream baosErr = new ByteArrayOutputStream();
+
+ new Model2EventMain(eventArgs, new PrintStream(baosOut, true));
+
+ String outString = baosOut.toString();
+ String errString = baosErr.toString();
+
+ return "*** StdOut ***\n" + outString + "\n*** StdErr ***\n" + errString;
+ }
+
+ /**
+ * Test Event generation.
+ *
+ * @param modelName the name of the model file
+ */
+ private void testModel2EventModel(String modelName) {
+ try {
+ File tempFile = File.createTempFile(modelName, ".apex");
+ tempFile.deleteOnExit();
+
+ final String[] eventArgs0 =
+ { "-m", "src/test/resources/models/" + modelName + ".json", "-t", "stimuli" };
+ final String outputString0 = runModel2Event(eventArgs0);
+
+ assertTrue(outputString0.contains("type: stimuli"));
+
+ final String[] eventArgs1 = {"-m", "src/test/resources/models/" + modelName + ".json", "-t", "response" };
+ final String outputString1 = runModel2Event(eventArgs1);
+
+ assertTrue(outputString1.contains("type: response"));
+
+ final String[] eventArgs2 = {"-m", "src/test/resources/models/" + modelName + ".json", "-t", "internal" };
+ final String outputString2 = runModel2Event(eventArgs2);
+
+ assertTrue(outputString2.contains("type: internal"));
+ } catch (Exception e) {
+ throw new ApexRuntimeException("test should not throw an exception", e);
+ }
+ }
+}
diff --git a/tools/model-generator/src/test/resources/models/AADMPolicyModel.json b/tools/model-generator/src/test/resources/models/AADMPolicyModel.json
new file mode 100644
index 000000000..b252b7c9f
--- /dev/null
+++ b/tools/model-generator/src/test/resources/models/AADMPolicyModel.json
@@ -0,0 +1,7798 @@
+{
+ "apexPolicyModel" : {
+ "key" : {
+ "name" : "AADMPolicyModel",
+ "version" : "0.0.1"
+ },
+ "keyInformation" : {
+ "key" : {
+ "name" : "AADMKeyInformation",
+ "version" : "0.0.1"
+ },
+ "keyInfoMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AADMContext",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMContext",
+ "version" : "0.0.1"
+ },
+ "UUID" : "a8985020-eeb1-34f4-8720-460a4ca6394b",
+ "description" : "Generated description for concept referred to by key \"AADMContext:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMDatatypes",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMDatatypes",
+ "version" : "0.0.1"
+ },
+ "UUID" : "3e36da83-11b0-356a-b863-33e9bb46190c",
+ "description" : "Generated description for concept referred to by key \"AADMDatatypes:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMDecideTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "3a609f60-b8b8-3b8c-8e95-1bafedeedd19",
+ "description" : "Generated description for concept referred to by key \"AADMDecideTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMDoSProvenActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMDoSProvenActTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "73d6a38b-6a73-345c-b1e7-6628aaad2822",
+ "description" : "Generated description for concept referred to by key \"AADMDoSProvenActTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMDoSSuggestionActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMDoSSuggestionActTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0f904146-449b-3187-844e-b12a687e20f3",
+ "description" : "Generated description for concept referred to by key \"AADMDoSSuggestionActTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMEstablishTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "5ae9425d-8061-37dd-939b-2e74868b0fac",
+ "description" : "Generated description for concept referred to by key \"AADMEstablishTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "503c3944-c368-3e05-b8d0-72354fa3668a",
+ "description" : "Generated description for concept referred to by key \"AADMEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMEvents",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMEvents",
+ "version" : "0.0.1"
+ },
+ "UUID" : "743cc2b1-15fe-30e0-bbf5-7afc291b0852",
+ "description" : "Generated description for concept referred to by key \"AADMEvents:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMKeyInformation",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMKeyInformation",
+ "version" : "0.0.1"
+ },
+ "UUID" : "623350b2-e709-3022-8005-01bfe29376fd",
+ "description" : "Generated description for concept referred to by key \"AADMKeyInformation:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMMatchTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "a94dc4bd-40d6-337f-beb7-c59ffab96f87",
+ "description" : "Generated description for concept referred to by key \"AADMMatchTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMNoActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMNoActTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "c517847f-844d-331c-93a4-66e5e4b6ac57",
+ "description" : "Generated description for concept referred to by key \"AADMNoActTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMPolicies",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMPolicies",
+ "version" : "0.0.1"
+ },
+ "UUID" : "03496ff0-07f3-3826-a92b-2505893aa001",
+ "description" : "Generated description for concept referred to by key \"AADMPolicies:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMPolicy",
+ "version" : "0.0.1"
+ },
+ "UUID" : "9f2a1c37-bb53-37cc-b57e-6ad408d6fa20",
+ "description" : "Generated description for concept referred to by key \"AADMPolicy:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMPolicyModel",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMPolicyModel",
+ "version" : "0.0.1"
+ },
+ "UUID" : "596419ba-33de-3ff4-bd88-101639a2ed0f",
+ "description" : "Generated description for concept referred to by key \"AADMPolicyModel:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AADMTasks",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMTasks",
+ "version" : "0.0.1"
+ },
+ "UUID" : "6da118c3-27aa-3b90-b2a0-40c8a2c32500",
+ "description" : "Generated description for concept referred to by key \"AADMTasks:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0037c945-48d2-3738-9568-ddcf6d79f884",
+ "description" : "Generated description for concept referred to by key \"ActionTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "UUID" : "6cb1c3e3-a8d8-3e17-90d8-c052d00b19d3",
+ "description" : "Generated description for concept referred to by key \"ApplicationName:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "UUID" : "e470b7dc-3f59-388c-9913-76362e5e10f9",
+ "description" : "Generated description for concept referred to by key \"AttachCount:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0475109a-c7e6-3055-bad9-5e0c2a48d205",
+ "description" : "Generated description for concept referred to by key \"AverageAttach:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "UUID" : "4ce2f826-f494-39bb-9775-46e23838a77e",
+ "description" : "Generated description for concept referred to by key \"AverageServiceRequest:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "UUID" : "cbcdc9f1-58ae-3609-a011-1a2e871ebb44",
+ "description" : "Generated description for concept referred to by key \"AverageThroughput:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "UUID" : "db18ea94-6d6a-334f-a3bc-6df1ce80f781",
+ "description" : "Generated description for concept referred to by key \"BlacklistOnFlag:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "UUID" : "65c3c97a-e77f-390e-8225-defaff11ea1c",
+ "description" : "Generated description for concept referred to by key \"DOSFlag:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "UUID" : "4ccee428-ecd9-341b-84a3-9627a316a667",
+ "description" : "Generated description for concept referred to by key \"ENodeBID:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "ENodeBStatus",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ENodeBStatus",
+ "version" : "0.0.1"
+ },
+ "UUID" : "daeba341-83c5-36bd-a9f3-1748b3e12d30",
+ "description" : "Generated description for concept referred to by key \"ENodeBStatus:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "ENodeBStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ENodeBStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "UUID" : "3476bd5a-fa19-3caf-a3ec-e39ca2e18a78",
+ "description" : "Generated description for concept referred to by key \"ENodeBStatusAlbum:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0af781e1-fb66-39fa-88dd-b2d29167c022",
+ "description" : "Generated description for concept referred to by key \"HttpHostClass:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "UUID" : "3c4b38c8-de3f-305c-b1cc-39b0c4eeb198",
+ "description" : "Generated description for concept referred to by key \"IMSI:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "IMSIStatus",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "IMSIStatus",
+ "version" : "0.0.1"
+ },
+ "UUID" : "8483be99-ddc7-3fe4-a094-526c79d373c4",
+ "description" : "Generated description for concept referred to by key \"IMSIStatus:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "IMSIStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "IMSIStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "UUID" : "9057bb9e-348a-3a3e-ab53-e5276693009e",
+ "description" : "Generated description for concept referred to by key \"IMSIStatusAlbum:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "IPAddressStatus",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "IPAddressStatus",
+ "version" : "0.0.1"
+ },
+ "UUID" : "5b25f611-2aa2-3a87-8a02-ca68c98b806f",
+ "description" : "Generated description for concept referred to by key \"IPAddressStatus:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "IPAddressStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "IPAddressStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "UUID" : "622a1300-5db4-366c-b834-317ac180b186",
+ "description" : "Generated description for concept referred to by key \"IPAddressStatusAlbum:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "UUID" : "7133ba71-fc49-342c-a7cc-1984158e637a",
+ "description" : "Generated description for concept referred to by key \"NWIPAddress:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicActTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "9b968879-319f-3d69-9d19-94179f80ddb4",
+ "description" : "Generated description for concept referred to by key \"PeriodicActTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicDecideTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "75ad1b28-cb2d-30e2-8f8f-e7937e55832f",
+ "description" : "Generated description for concept referred to by key \"PeriodicDecideTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "UUID" : "1d6d63e4-5344-3abc-8678-ff14691a9464",
+ "description" : "Generated description for concept referred to by key \"PeriodicDelay:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicEstablishTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "6c2f6ca7-0163-3135-beda-9eb0ff846567",
+ "description" : "Generated description for concept referred to by key \"PeriodicEstablishTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "6d29eeaa-482d-3bbf-8c88-5d5c7ccc7217",
+ "description" : "Generated description for concept referred to by key \"PeriodicEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "UUID" : "45d754b7-85a8-30cd-9bae-6be89d08255c",
+ "description" : "Generated description for concept referred to by key \"PeriodicEventCount:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicMatchTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "1e568638-cc5c-3331-a5a9-415f1644df00",
+ "description" : "Generated description for concept referred to by key \"PeriodicMatchTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicPolicy",
+ "version" : "0.0.1"
+ },
+ "UUID" : "5d6a65be-7067-3826-9eb7-8d2d25983815",
+ "description" : "Generated description for concept referred to by key \"PeriodicPolicy:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "UUID" : "825b39f8-2027-3221-8b17-a124bba273a3",
+ "description" : "Generated description for concept referred to by key \"PeriodicTime:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "UUID" : "b557b275-759d-3e5f-906f-9d184e8522fc",
+ "description" : "Generated description for concept referred to by key \"ProbeOnFlag:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "UUID" : "a31d86c2-7f27-3b67-9528-7f41c465f789",
+ "description" : "Generated description for concept referred to by key \"Profile:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "UUID" : "2883fc70-5b0c-32eb-9008-98dfc61f196f",
+ "description" : "Generated description for concept referred to by key \"ProtocolGroup:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "UUID" : "1f7af8ef-be8a-319c-bec2-dba514ec742a",
+ "description" : "Generated description for concept referred to by key \"RoundTripTime:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCActTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "53fc4ca0-1e50-397f-9b8b-d662e8ae3748",
+ "description" : "Generated description for concept referred to by key \"SAPCActTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCBlacklistSubscriberEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCBlacklistSubscriberEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "cefa708e-266d-3b80-a7fd-a598437a8478",
+ "description" : "Generated description for concept referred to by key \"SAPCBlacklistSubscriberEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCDecideTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "1e946a42-4d82-3161-a471-fd4444709ce1",
+ "description" : "Generated description for concept referred to by key \"SAPCDecideTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCEstablishTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "b66fd760-1c08-396f-b56a-9718bdc07c44",
+ "description" : "Generated description for concept referred to by key \"SAPCEstablishTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "57747831-aaf3-3bb9-93dc-e6099b5e2a6c",
+ "description" : "Generated description for concept referred to by key \"SAPCEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCMatchTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "bf4934e8-75c9-3485-b67d-4ba4f03a5379",
+ "description" : "Generated description for concept referred to by key \"SAPCMatchTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCPolicy",
+ "version" : "0.0.1"
+ },
+ "UUID" : "36c4410e-0914-34ce-94cb-d5d162a803b4",
+ "description" : "Generated description for concept referred to by key \"SAPCPolicy:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "UUID" : "b0a7d4fc-7d79-34e8-b9c3-fee3a723631a",
+ "description" : "Generated description for concept referred to by key \"ServiceRequestCount:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "UUID" : "a50da826-a538-3c51-a11c-4b93b924763b",
+ "description" : "Generated description for concept referred to by key \"SubscriberCount:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "UUID" : "2c160e99-6d5a-3d16-9b6c-3cf1c037498c",
+ "description" : "Generated description for concept referred to by key \"TCPOnFlag:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "UUID" : "ddb15c04-8a50-3225-9239-bd4ffa835dfa",
+ "description" : "Generated description for concept referred to by key \"Threshold:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "TriggerSpec",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "TriggerSpec",
+ "version" : "0.0.1"
+ },
+ "UUID" : "4a9e98fa-606a-3002-8b14-50f79f777131",
+ "description" : "Generated description for concept referred to by key \"TriggerSpec:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "UUID" : "1dcdc75f-d400-3400-96b2-dc25085c2132",
+ "description" : "Generated description for concept referred to by key \"UEIPAddress:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMEActTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "28a2e4f1-58db-38ec-a719-65f85576b43e",
+ "description" : "Generated description for concept referred to by key \"VMMEActTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMEDecideTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "fffd4241-b63c-326c-b39d-25cab76f30eb",
+ "description" : "Generated description for concept referred to by key \"VMMEDecideTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMEEstablishTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "34e0da20-a77a-3e46-8425-dd815d9a5371",
+ "description" : "Generated description for concept referred to by key \"VMMEEstablishTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "ece477f8-2e38-31ba-b504-df029dbeb825",
+ "description" : "Generated description for concept referred to by key \"VMMEEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMEMatchTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "8ad7d08d-6b2e-3c0f-9e1c-d75973ef8b81",
+ "description" : "Generated description for concept referred to by key \"VMMEMatchTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "VMMENoActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMENoActTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "3a58ff26-0d13-3347-a312-d9bef32c4a2a",
+ "description" : "Generated description for concept referred to by key \"VMMENoActTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMEPolicy",
+ "version" : "0.0.1"
+ },
+ "UUID" : "e428b8ae-4886-386e-8587-7ccb8e746dc5",
+ "description" : "Generated description for concept referred to by key \"VMMEPolicy:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "UUID" : "9a9070ef-7197-3ae8-b934-d00d51ffcabd",
+ "description" : "Generated description for concept referred to by key \"Version:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "XSTREAM_AADM_ACT_EVENT",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "XSTREAM_AADM_ACT_EVENT",
+ "version" : "0.0.1"
+ },
+ "UUID" : "d9f42aec-97e3-3ad7-b1fa-4a95c4e74833",
+ "description" : "Generated description for concept referred to by key \"XSTREAM_AADM_ACT_EVENT:0.0.1\""
+ }
+ } ]
+ }
+ },
+ "policies" : {
+ "key" : {
+ "name" : "AADMPolicies",
+ "version" : "0.0.1"
+ },
+ "policyMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AADMPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "AADMPolicy",
+ "version" : "0.0.1"
+ },
+ "template" : "MEDA",
+ "state" : {
+ "entry" : [ {
+ "key" : "Act",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ },
+ "trigger" : {
+ "name" : "AADMEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Act_NULL",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ },
+ "outgoingEvent" : {
+ "name" : "XSTREAM_AADM_ACT_EVENT",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "ENodeBStatusAlbum",
+ "version" : "0.0.1"
+ }, {
+ "name" : "IMSIStatusAlbum",
+ "version" : "0.0.1"
+ }, {
+ "name" : "IPAddressStatusAlbum",
+ "version" : "0.0.1"
+ } ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nimport org.onap.policy.apex.examples.aadm.concepts.ImsiStatus;\nimport org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus;\n\nlogger.debug(subject.id + \":\" + subject.stateName + \" execution logic\");\nlogger.debug(inFields);\n\nlogger.debug(\"inFields[SERVICE_REQUEST_COUNT]=\" + inFields[\"SERVICE_REQUEST_COUNT\"]);\n\nImsiStatus imsiStatus = getContextAlbum(\"IMSIStatusAlbum\").get((String)inFields[\"IMSI\"]);\n\nif (imsiStatus.getBlockingCount() > 1) {\n subject.getTaskKey(\"AADMNoActTask\").copyTo(selectedTask);\n logger.debug(\"user blacklisted permanently\");\n return false;\n}\n\nlogger.debug(\"imsi: \" + imsiStatus.getImsi() + \" anamalous \" + imsiStatus.getAnomalous());\n\n// check if this is second iteration\nif (inFields[\"TCP_UE_SIDE_AVG_THROUGHPUT\"] != null && inFields[\"TCP_UE_SIDE_AVG_THROUGHPUT\"] > 100 && imsiStatus.getAnomalous()) {\n subject.getTaskKey(\"AADMDoSProvenActTask\").copyTo(selectedTask);\n logger.debug(\"inside TCP_UE_SIDE_AVG_THROUGHPUT\");\n return true;\n}\n\n// Get the status of the ENodeB\nENodeBStatus eNodeBStatus = getContextAlbum(\"ENodeBStatusAlbum\").get((String)inFields[\"ENODEB_ID\"]);\n\n// check if this is first iteration and DoS\nif (inFields[\"SERVICE_REQUEST_COUNT\"] != null &&\n inFields[\"AVG_SUBSCRIBER_SERVICE_REQUEST\"] != null &&\n inFields[\"SERVICE_REQUEST_COUNT\"] > inFields[\"AVG_SUBSCRIBER_SERVICE_REQUEST\"] &&\n eNodeBStatus != null && eNodeBStatus.getDosCount() > 100 &&\n inFields[\"NUM_SUBSCRIBERS\"] != null && inFields[\"NUM_SUBSCRIBERS\"] > 100) {\n logger.debug(\"inside NUM_SUBSCRIBERS\");\n subject.getTaskKey(\"AADMDoSProvenActTask\").copyTo(selectedTask);\n return true;\n}\n\n// check if this is first iteration and request probe\nif (inFields[\"UE_IP_ADDRESS\"] != null) {\n logger.debug(\"inside UE_IP_ADDRESS\");\n subject.getTaskKey(\"AADMDoSSuggestionActTask\").copyTo(selectedTask);\n return true;\n}\n\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AADMNoActTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AADMDoSProvenActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "AADMDoSProvenActTask_DIRECT_Act_NULL"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AADMDoSSuggestionActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "AADMDoSSuggestionActTask_DIRECT_Act_NULL"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AADMNoActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "AADMNoActTask_DIRECT_Act_NULL"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Decide",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ },
+ "trigger" : {
+ "name" : "AADMEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Decide_Act",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ },
+ "outgoingEvent" : {
+ "name" : "AADMEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask)\nlogger.debug(subject.id + \":\" + subject.stateName) + \", using default task\";\nreturn true;"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AADMDecideTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AADMDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "AADMDecideTask_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Establish",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ },
+ "trigger" : {
+ "name" : "AADMEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Establish_Decide",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ },
+ "outgoingEvent" : {
+ "name" : "AADMEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask)\nlogger.debug(subject.id + \":\" + subject.stateName) + \", using default task\";\nreturn true;"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AADMEstablishTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AADMEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "AADMEstablishTask_DIRECT_Establish_Decide"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Match",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Match"
+ },
+ "trigger" : {
+ "name" : "AADMEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Match_Establish",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ },
+ "outgoingEvent" : {
+ "name" : "AADMEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask)\nlogger.debug(subject.id + \":\" + subject.stateName) + \", using default task\";\nreturn true;"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AADMMatchTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AADMMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "AADMMatchTask_DIRECT_Match_Establish"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AADMPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "Match"
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "PeriodicPolicy",
+ "version" : "0.0.1"
+ },
+ "template" : "MEDA",
+ "state" : {
+ "entry" : [ {
+ "key" : "Act",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ },
+ "trigger" : {
+ "name" : "PeriodicEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Act_NULL",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ },
+ "outgoingEvent" : {
+ "name" : "SAPCBlacklistSubscriberEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "PeriodicActTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "PeriodicActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "PeriodicActTask_DIRECT_Act_NULL"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Decide",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ },
+ "trigger" : {
+ "name" : "PeriodicEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Decide_Act",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ },
+ "outgoingEvent" : {
+ "name" : "PeriodicEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "PeriodicDecideTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "PeriodicDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "PeriodicDecideTask_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Establish",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ },
+ "trigger" : {
+ "name" : "PeriodicEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Establish_Decide",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ },
+ "outgoingEvent" : {
+ "name" : "PeriodicEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "PeriodicEstablishTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "PeriodicEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "PeriodicEstablishTask_DIRECT_Establish_Decide"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Match",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Match"
+ },
+ "trigger" : {
+ "name" : "PeriodicEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Match_Establish",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ },
+ "outgoingEvent" : {
+ "name" : "PeriodicEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "PeriodicMatchTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "PeriodicMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "PeriodicMatchTask_DIRECT_Match_Establish"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "PeriodicPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "Match"
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "SAPCPolicy",
+ "version" : "0.0.1"
+ },
+ "template" : "MEDA",
+ "state" : {
+ "entry" : [ {
+ "key" : "Act",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ },
+ "trigger" : {
+ "name" : "SAPCEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Act_NULL",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ },
+ "outgoingEvent" : {
+ "name" : "SAPCBlacklistSubscriberEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "SAPCActTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "SAPCActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "SAPCActTask_DIRECT_Act_NULL"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Decide",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ },
+ "trigger" : {
+ "name" : "SAPCEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Decide_Act",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ },
+ "outgoingEvent" : {
+ "name" : "SAPCEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "SAPCDecideTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "SAPCDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "SAPCDecideTask_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Establish",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ },
+ "trigger" : {
+ "name" : "SAPCEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Establish_Decide",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ },
+ "outgoingEvent" : {
+ "name" : "SAPCEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "SAPCEstablishTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "SAPCEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "SAPCEstablishTask_DIRECT_Establish_Decide"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Match",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Match"
+ },
+ "trigger" : {
+ "name" : "XSTREAM_AADM_ACT_EVENT",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Match_Establish",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ },
+ "outgoingEvent" : {
+ "name" : "SAPCEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "SAPCMatchTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "SAPCMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "SAPCMatchTask_DIRECT_Match_Establish"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "SAPCPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "Match"
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "VMMEPolicy",
+ "version" : "0.0.1"
+ },
+ "template" : "MEDA",
+ "state" : {
+ "entry" : [ {
+ "key" : "Act",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ },
+ "trigger" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Act_NULL",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ },
+ "outgoingEvent" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "VMMEActTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "VMMEActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "VMMEActTask_DIRECT_Act_NULL"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VMMENoActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "VMMENoActTask_DIRECT_Act_NULL"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Decide",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ },
+ "trigger" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Decide_Act",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ },
+ "outgoingEvent" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "VMMEDecideTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "VMMEDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "VMMEDecideTask_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Establish",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ },
+ "trigger" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Establish_Decide",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ },
+ "outgoingEvent" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "VMMEEstablishTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "VMMEEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "VMMEEstablishTask_DIRECT_Establish_Decide"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Match",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Match"
+ },
+ "trigger" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Match_Establish",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ },
+ "outgoingEvent" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "VMMEMatchTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "VMMEMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "VMMEMatchTask_DIRECT_Match_Establish"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VMMEPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "Match"
+ }
+ } ]
+ }
+ },
+ "tasks" : {
+ "key" : {
+ "name" : "AADMTasks",
+ "version" : "0.0.1"
+ },
+ "taskMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AADMDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMDecideTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "APPLICATION",
+ "value" : {
+ "key" : "APPLICATION",
+ "fieldSchemaKey" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ATTACH_COUNT",
+ "value" : {
+ "key" : "ATTACH_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "fieldSchemaKey" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "fieldSchemaKey" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "DoS",
+ "value" : {
+ "key" : "DoS",
+ "fieldSchemaKey" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NUM_SUBSCRIBERS",
+ "value" : {
+ "key" : "NUM_SUBSCRIBERS",
+ "fieldSchemaKey" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "value" : {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SGW_IP_ADDRESS",
+ "value" : {
+ "key" : "SGW_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "value" : {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "fieldSchemaKey" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "value" : {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "fieldSchemaKey" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "UE_IP_ADDRESS",
+ "value" : {
+ "key" : "UE_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "http_host_class",
+ "value" : {
+ "key" : "http_host_class",
+ "fieldSchemaKey" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "protocol_group",
+ "value" : {
+ "key" : "protocol_group",
+ "fieldSchemaKey" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "APPLICATION",
+ "value" : {
+ "key" : "APPLICATION",
+ "fieldSchemaKey" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ATTACH_COUNT",
+ "value" : {
+ "key" : "ATTACH_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "fieldSchemaKey" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "fieldSchemaKey" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "DoS",
+ "value" : {
+ "key" : "DoS",
+ "fieldSchemaKey" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NUM_SUBSCRIBERS",
+ "value" : {
+ "key" : "NUM_SUBSCRIBERS",
+ "fieldSchemaKey" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "value" : {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SGW_IP_ADDRESS",
+ "value" : {
+ "key" : "SGW_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "value" : {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "fieldSchemaKey" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "value" : {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "fieldSchemaKey" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "UE_IP_ADDRESS",
+ "value" : {
+ "key" : "UE_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "http_host_class",
+ "value" : {
+ "key" : "http_host_class",
+ "fieldSchemaKey" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "protocol_group",
+ "value" : {
+ "key" : "protocol_group",
+ "fieldSchemaKey" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AADMDoSProvenActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMDoSProvenActTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "APPLICATION",
+ "value" : {
+ "key" : "APPLICATION",
+ "fieldSchemaKey" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ATTACH_COUNT",
+ "value" : {
+ "key" : "ATTACH_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "fieldSchemaKey" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "fieldSchemaKey" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "DoS",
+ "value" : {
+ "key" : "DoS",
+ "fieldSchemaKey" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NUM_SUBSCRIBERS",
+ "value" : {
+ "key" : "NUM_SUBSCRIBERS",
+ "fieldSchemaKey" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "value" : {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SGW_IP_ADDRESS",
+ "value" : {
+ "key" : "SGW_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "value" : {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "fieldSchemaKey" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "value" : {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "fieldSchemaKey" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "UE_IP_ADDRESS",
+ "value" : {
+ "key" : "UE_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "http_host_class",
+ "value" : {
+ "key" : "http_host_class",
+ "fieldSchemaKey" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "protocol_group",
+ "value" : {
+ "key" : "protocol_group",
+ "fieldSchemaKey" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MAJ_MIN_MAINT_VERSION",
+ "value" : {
+ "key" : "MAJ_MIN_MAINT_VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TRIGGER_SPEC",
+ "value" : {
+ "key" : "TRIGGER_SPEC",
+ "fieldSchemaKey" : {
+ "name" : "TriggerSpec",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "VERSION",
+ "value" : {
+ "key" : "VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "ENodeBStatusAlbum",
+ "version" : "0.0.1"
+ }, {
+ "name" : "IMSIStatusAlbum",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nimport org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus;\nimport org.onap.policy.apex.examples.aadm.concepts.ImsiStatus;\n\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\n\noutFields[\"ACTTASK\"] = \"act\";\noutFields[\"TRIGGER_SPEC\"] = \"XSTREAM_AADM_ACT_EVENT\";\noutFields[\"MAJ_MIN_MAINT_VERSION\"] = \"0.0.1\";\noutFields[\"PROBE_ON\"] = true;\noutFields[\"TCP_ON\"] = false;\noutFields[\"IMSI\"] = inFields[\"IMSI\"];\n\nif (inFields[\"IMSI_IP\"] != null) {\n outFields[\"IMSI_IP\"] = inFields[\"IMSI_IP\"];\n}\nelse{\n outFields[\"IMSI_IP\"] = inFields[\"UE_IP_ADDRESS\"];\n}\n\nif (inFields[\"NW_IP\"] != null) {\n outFields[\"NW_IP\"] = inFields[\"NW_IP\"];\n}\nelse{\n outFields[\"NW_IP\"] = inFields[\"SGW_IP_ADDRESS\"];\n}\n\nImsiStatus imsiStatus = getContextAlbum(\"IMSIStatusAlbum\").get((String)inFields[\"IMSI\"]);\nlogger.debug(imsiStatus);\n\nENodeBStatus eNodeBStatus = getContextAlbum(\"ENodeBStatusAlbum\").get(imsiStatus.getENodeBId());\neNodeBStatus.setBeingProbed(false);\n\nleaveProbingOn = false;\nfor (ENodeBStatus enbStatus : getContextAlbum(\"ENodeBStatusAlbum\").values) {\n if (enbStatus.getBeingProbed()) {\n leaveProbingOn = true;\n }\n}\n\nif (!leaveProbingOn) {\n outFields[\"PROBE_ON\"] = false;\n outFields[\"TCP_ON\"] = false;\n}\n\neNodeBStatus.decrementDosCount();\nlogger.debug(eNodeBStatus.getENodeB() + \": dosCount is \" + eNodeBStatus.getDosCount());\n\nimsiStatus.setAnomalous(false);\n\nlogger.debug(\"imsi: \" + imsiStatus.getImsi() + \" anamalous \" + imsiStatus.getAnomalous());\n\ngetContextAlbum(\"IMSIStatusAlbum\") .put(imsiStatus.getImsi(), imsiStatus);\ngetContextAlbum(\"ENodeBStatusAlbum\").put(eNodeBStatus.getENodeB(), eNodeBStatus);\n\noutFields[\"THRESHOLD\"] = 0;\noutFields[\"PROFILE\"] = \"\";\noutFields[\"VERSION\"] = \"0.0.1\";\noutFields[\"BLACKLIST_ON\"] = false;\n\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AADMDoSSuggestionActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMDoSSuggestionActTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "APPLICATION",
+ "value" : {
+ "key" : "APPLICATION",
+ "fieldSchemaKey" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ATTACH_COUNT",
+ "value" : {
+ "key" : "ATTACH_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "fieldSchemaKey" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "fieldSchemaKey" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "DoS",
+ "value" : {
+ "key" : "DoS",
+ "fieldSchemaKey" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NUM_SUBSCRIBERS",
+ "value" : {
+ "key" : "NUM_SUBSCRIBERS",
+ "fieldSchemaKey" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "value" : {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SGW_IP_ADDRESS",
+ "value" : {
+ "key" : "SGW_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "value" : {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "fieldSchemaKey" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "value" : {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "fieldSchemaKey" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "UE_IP_ADDRESS",
+ "value" : {
+ "key" : "UE_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "http_host_class",
+ "value" : {
+ "key" : "http_host_class",
+ "fieldSchemaKey" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "protocol_group",
+ "value" : {
+ "key" : "protocol_group",
+ "fieldSchemaKey" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MAJ_MIN_MAINT_VERSION",
+ "value" : {
+ "key" : "MAJ_MIN_MAINT_VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TRIGGER_SPEC",
+ "value" : {
+ "key" : "TRIGGER_SPEC",
+ "fieldSchemaKey" : {
+ "name" : "TriggerSpec",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "VERSION",
+ "value" : {
+ "key" : "VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "ENodeBStatusAlbum",
+ "version" : "0.0.1"
+ }, {
+ "name" : "IMSIStatusAlbum",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nimport org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus;\nimport org.onap.policy.apex.examples.aadm.concepts.ImsiStatus;\n\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\n\noutFields[\"ACTTASK\"] = \"probe\";\noutFields[\"TRIGGER_SPEC\"] = \"XSTREAM_AADM_ACT_EVENT\";\noutFields[\"MAJ_MIN_MAINT_VERSION\"] = \"0.0.1\";\noutFields[\"IMSI\"] = inFields[\"IMSI\"];\n\nif (inFields[\"IMSI_IP\"] != null) {\n outFields[\"IMSI_IP\"] = inFields[\"IMSI_IP\"];\n}\nelse {\n outFields[\"IMSI_IP\"] = inFields[\"UE_IP_ADDRESS\"];\n}\n\nif (inFields[\"NW_IP\"] != null) {\n outFields[\"NW_IP\"] = inFields[\"NW_IP\"];\n}\nelse {\n outFields[\"NW_IP\"] = inFields[\"SGW_IP_ADDRESS\"];\n}\n\nImsiStatus imsiStatus = getContextAlbum(\"IMSIStatusAlbum\").get((String)inFields[\"IMSI\"]);\nlogger.debug(imsiStatus);\n\nENodeBStatus eNodeBStatus = getContextAlbum(\"ENodeBStatusAlbum\").get(imsiStatus.getENodeBId());\nlogger.debug(eNodeBStatus);\n\nif (imsiStatus.getENodeBId() != null && !imsiStatus.getENodeBId().equals(inFields[\"ENODEB_ID\"]) || inFields[\"AVG_SUBSCRIBER_SERVICE_REQUEST\"] == null) {\n // if user moved enodeB remove him from previous one\n if (imsiStatus.getENodeBId() != null) {\n eNodeBStatus.decrementDosCount();\n }\n\n // if user became non anomalous return action\n if (inFields[\"AVG_SUBSCRIBER_SERVICE_REQUEST\"] == null) {\n imsiStatus.setAnomalous(false);\n outFields[\"ACTTASK\"] = \"remove_from_probe\";\n\n for (ENodeBStatus enbStatus : getContextAlbum(\"ENodeBStatusAlbum\").values) {\n if (enbStatus.getBeingProbed()) {\n outFields[\"PROBE_ON\"] = true;\n outFields[\"TCP_ON\"] = true;\n return true;\n }\n }\n\n outFields[\"PROBE_ON\"] = false;\n outFields[\"TCP_ON\"] = false;\n\n getContextAlbum(\"IMSIStatusAlbum\").put(imsiStatus.getIMSI(), imsiStatus);\n getContextAlbum(\"ENodeBStatusAlbum\").put(eNodeBStatus.getENodeB(), eNodeBStatus);\n\n return true;\n }\n}\n\nimsiStatus.setAnomalous(true);\nimsiStatus.setAnomolousTime(System.currentTimeMillis());\nimsiStatus.setENodeBId(inFields[\"ENODEB_ID\"]);\ngetContextAlbum(\"IMSIStatusAlbum\").put(imsiStatus.getImsi(), imsiStatus);\nlogger.debug(imsiStatus.getENodeBId() + \": enodeb added to imsi ip added \" + outFields[\"IMSI_IP\"]);\n\nENodeBStatus eNodeBStatus = getContextAlbum(\"ENodeBStatusAlbum\").get(imsiStatus.getENodeBId());\nif (eNodeBStatus == null) {\n eNodeBStatus = new ENodeBStatus(imsiStatus.getENodeBId());\n getContextAlbum(\"ENodeBStatusAlbum\").put(eNodeBStatus.getENodeB(), eNodeBStatus);\n logger.debug(\"new eNodeB added \" + getContextAlbum(\"ENodeBStatusAlbum\").get(imsiStatus.getENodeBId()));\n}\n\neNodeBStatus.incrementDosCount();\ngetContextAlbum(\"ENodeBStatusAlbum\").put(eNodeBStatus.getENodeB(), eNodeBStatus);\nlogger.debug(eNodeBStatus.getENodeB() + \": dosCount incremented to \" + eNodeBStatus.getDosCount());\n\noutFields[\"PROBE_ON\"] = true;\noutFields[\"TCP_ON\"] = true;\noutFields[\"THRESHOLD\"] = 0;\noutFields[\"PROFILE\"] = \"\";\noutFields[\"VERSION\"] = \"0.0.1\";\noutFields[\"BLACKLIST_ON\"] = false;\n\nlogger.debug(\"out here5\");\n\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AADMEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMEstablishTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "APPLICATION",
+ "value" : {
+ "key" : "APPLICATION",
+ "fieldSchemaKey" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ATTACH_COUNT",
+ "value" : {
+ "key" : "ATTACH_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "fieldSchemaKey" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "fieldSchemaKey" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "DoS",
+ "value" : {
+ "key" : "DoS",
+ "fieldSchemaKey" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NUM_SUBSCRIBERS",
+ "value" : {
+ "key" : "NUM_SUBSCRIBERS",
+ "fieldSchemaKey" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "value" : {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SGW_IP_ADDRESS",
+ "value" : {
+ "key" : "SGW_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "value" : {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "fieldSchemaKey" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "value" : {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "fieldSchemaKey" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "UE_IP_ADDRESS",
+ "value" : {
+ "key" : "UE_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "http_host_class",
+ "value" : {
+ "key" : "http_host_class",
+ "fieldSchemaKey" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "protocol_group",
+ "value" : {
+ "key" : "protocol_group",
+ "fieldSchemaKey" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "APPLICATION",
+ "value" : {
+ "key" : "APPLICATION",
+ "fieldSchemaKey" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ATTACH_COUNT",
+ "value" : {
+ "key" : "ATTACH_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "fieldSchemaKey" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "fieldSchemaKey" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "DoS",
+ "value" : {
+ "key" : "DoS",
+ "fieldSchemaKey" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NUM_SUBSCRIBERS",
+ "value" : {
+ "key" : "NUM_SUBSCRIBERS",
+ "fieldSchemaKey" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "value" : {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SGW_IP_ADDRESS",
+ "value" : {
+ "key" : "SGW_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "value" : {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "fieldSchemaKey" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "value" : {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "fieldSchemaKey" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "UE_IP_ADDRESS",
+ "value" : {
+ "key" : "UE_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "http_host_class",
+ "value" : {
+ "key" : "http_host_class",
+ "fieldSchemaKey" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "protocol_group",
+ "value" : {
+ "key" : "protocol_group",
+ "fieldSchemaKey" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AADMMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMMatchTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "APPLICATION",
+ "value" : {
+ "key" : "APPLICATION",
+ "fieldSchemaKey" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ATTACH_COUNT",
+ "value" : {
+ "key" : "ATTACH_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "fieldSchemaKey" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "fieldSchemaKey" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "DoS",
+ "value" : {
+ "key" : "DoS",
+ "fieldSchemaKey" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NUM_SUBSCRIBERS",
+ "value" : {
+ "key" : "NUM_SUBSCRIBERS",
+ "fieldSchemaKey" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "value" : {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SGW_IP_ADDRESS",
+ "value" : {
+ "key" : "SGW_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "value" : {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "fieldSchemaKey" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "value" : {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "fieldSchemaKey" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "UE_IP_ADDRESS",
+ "value" : {
+ "key" : "UE_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "http_host_class",
+ "value" : {
+ "key" : "http_host_class",
+ "fieldSchemaKey" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "protocol_group",
+ "value" : {
+ "key" : "protocol_group",
+ "fieldSchemaKey" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "APPLICATION",
+ "value" : {
+ "key" : "APPLICATION",
+ "fieldSchemaKey" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ATTACH_COUNT",
+ "value" : {
+ "key" : "ATTACH_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "fieldSchemaKey" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "fieldSchemaKey" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "DoS",
+ "value" : {
+ "key" : "DoS",
+ "fieldSchemaKey" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NUM_SUBSCRIBERS",
+ "value" : {
+ "key" : "NUM_SUBSCRIBERS",
+ "fieldSchemaKey" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "value" : {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SGW_IP_ADDRESS",
+ "value" : {
+ "key" : "SGW_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "value" : {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "fieldSchemaKey" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "value" : {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "fieldSchemaKey" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "UE_IP_ADDRESS",
+ "value" : {
+ "key" : "UE_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "http_host_class",
+ "value" : {
+ "key" : "http_host_class",
+ "fieldSchemaKey" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "protocol_group",
+ "value" : {
+ "key" : "protocol_group",
+ "fieldSchemaKey" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "ENodeBStatusAlbum",
+ "version" : "0.0.1"
+ }, {
+ "name" : "IMSIStatusAlbum",
+ "version" : "0.0.1"
+ }, {
+ "name" : "IPAddressStatusAlbum",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nimport org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus;\nimport org.onap.policy.apex.examples.aadm.concepts.IpAddressStatus;\nimport org.onap.policy.apex.examples.aadm.concepts.ImsiStatus;\n\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\n\nipAddress = inFields[\"UE_IP_ADDRESS\"];\nif (ipAddress == null ) {\n ipAddress = inFields[\"IMSI_IP\"];\n\n if (ipAddress == null ) {\n logger.debug(\"Incoming event must specify parameter UE_IP_ADDRESS or parameter IMSI_IP\");\n return false;\n }\n}\n\nimsi = inFields[\"IMSI\"];\nif (imsi == null ) {\n logger.debug(\"Incoming event must specify parameter IMSI\");\n return false;\n}\n\neNodeBID = inFields[\"ENODEB_ID\"];\nif (eNodeBID == null ) {\n logger.debug(\"Incoming event must specify parameter ENODEB_ID\");\n return false;\n}\n\nIpAddressStatus ipAddressStatus = getContextAlbum(\"IPAddressStatusAlbum\").get(ipAddress);\nif (ipAddressStatus == null) {\n ipAddressStatus = new IpAddressStatus(ipAddress); \n ipAddressStatus.setImsi(imsi);\n getContextAlbum(\"IPAddressStatusAlbum\").put(ipAddressStatus.getIpAddress(), ipAddressStatus);\n logger.debug(\"added new IP address \" + getContextAlbum(\"IPAddressStatusAlbum\").get(ipAddress));\n}\nelse {\n logger.debug(\"found IP address \" + ipAddressStatus);\n}\n\nImsiStatus imsiStatus = getContextAlbum(\"IMSIStatusAlbum\").get((String)imsi);\nif (imsiStatus == null) {\n imsiStatus = new ImsiStatus(imsi);\n imsiStatus.setENodeBId(eNodeBID);\n getContextAlbum(\"IMSIStatusAlbum\").put(imsiStatus.getImsi(), imsiStatus);\n logger.debug(\"added new IMSI \" + imsi + \" to IMSI status map\")\n}\n\nENodeBStatus eNodeBStatus = getContextAlbum(\"ENodeBStatusAlbum\").get((String)eNodeBID);\nif (eNodeBStatus == null) {\n eNodeBStatus = new ENodeBStatus(eNodeBID);\n getContextAlbum(\"ENodeBStatusAlbum\").put(eNodeBStatus.getENodeB(), eNodeBStatus);\n logger.debug(\"added new ENodeB \" + eNodeBID + \" to ENodeB status map\")\n}\n\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AADMNoActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMNoActTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "APPLICATION",
+ "value" : {
+ "key" : "APPLICATION",
+ "fieldSchemaKey" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ATTACH_COUNT",
+ "value" : {
+ "key" : "ATTACH_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "fieldSchemaKey" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "fieldSchemaKey" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "DoS",
+ "value" : {
+ "key" : "DoS",
+ "fieldSchemaKey" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NUM_SUBSCRIBERS",
+ "value" : {
+ "key" : "NUM_SUBSCRIBERS",
+ "fieldSchemaKey" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "value" : {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SGW_IP_ADDRESS",
+ "value" : {
+ "key" : "SGW_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "value" : {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "fieldSchemaKey" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "value" : {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "fieldSchemaKey" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "UE_IP_ADDRESS",
+ "value" : {
+ "key" : "UE_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "http_host_class",
+ "value" : {
+ "key" : "http_host_class",
+ "fieldSchemaKey" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "protocol_group",
+ "value" : {
+ "key" : "protocol_group",
+ "fieldSchemaKey" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MAJ_MIN_MAINT_VERSION",
+ "value" : {
+ "key" : "MAJ_MIN_MAINT_VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TRIGGER_SPEC",
+ "value" : {
+ "key" : "TRIGGER_SPEC",
+ "fieldSchemaKey" : {
+ "name" : "TriggerSpec",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "VERSION",
+ "value" : {
+ "key" : "VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\n\noutFields[\"ACTTASK\"] = \"no\";\noutFields[\"TRIGGER_SPEC\"] = \"XSTREAM_AADM_ACT_EVENT\";\noutFields[\"MAJ_MIN_MAINT_VERSION\"] = \"0.0.1\";\n\nif (inFields[\"PROBE_ON\"] != null) {\n outFields[\"PROBE_ON\"] = inFields[\"PROBE_ON\"];\n}\nelse{\n outFields[\"PROBE_ON\"] = false;\n}\n\nif (inFields[\"TCP_ON\"] != null) {\n outFields[\"TCP_ON\"] = inFields[\"TCP_ON\"];\n}\nelse {\n outFields[\"TCP_ON\"] = false;\n}\n\noutFields[\"IMSI\"] = inFields[\"IMSI\"];\nif (inFields[\"IMSI_IP\"] != null) {\n outFields[\"IMSI_IP\"] = inFields[\"IMSI_IP\"];\n}\nelse {\n outFields[\"IMSI_IP\"] = inFields[\"UE_IP_ADDRESS\"];\n}\n\nif (inFields[\"NW_IP\"] != null) {\n outFields[\"NW_IP\"] = inFields[\"NW_IP\"];\n}\nelse{\n outFields[\"NW_IP\"] = inFields[\"SGW_IP_ADDRESS\"];\n}\n\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicActTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "value" : {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_DELAY",
+ "value" : {
+ "key" : "PERIODIC_DELAY",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "value" : {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_FIRST_TIME",
+ "value" : {
+ "key" : "PERIODIC_FIRST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_LAST_TIME",
+ "value" : {
+ "key" : "PERIODIC_LAST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "IMSIStatusAlbum",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nimport org.onap.policy.apex.examples.aadm.concepts.ImsiStatus;\n\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\n\nfor (ImsiStatus imsiStatus : getContextAlbum(\"IMSIStatusAlbum\").values()) {\n if ((System.currentTimeMillis() - imsiStatus.getBlacklistedTime()) > 180000) {\n imsiStatus.setBlacklistedTime(0);\n getContextAlbum(\"IMSIStatusAlbum\").put(imsiStatus.getImsi(), imsiStatus);\n }\n}\n\noutFields[\"IMSI\"] = 0;\noutFields[\"PROFILE\"] = \"ServiceA\";\noutFields[\"BLACKLIST_ON\"] = false;\noutFields[\"PROBE_ON\"] = false;\noutFields[\"TCP_ON\"] = false;\noutFields[\"NW_IP\"] = \"0.0.0.0\";\noutFields[\"IMSI_IP\"] = \"0.0.0.0\";\n\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicDecideTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "value" : {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_DELAY",
+ "value" : {
+ "key" : "PERIODIC_DELAY",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "value" : {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_FIRST_TIME",
+ "value" : {
+ "key" : "PERIODIC_FIRST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_LAST_TIME",
+ "value" : {
+ "key" : "PERIODIC_LAST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "value" : {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_DELAY",
+ "value" : {
+ "key" : "PERIODIC_DELAY",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "value" : {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_FIRST_TIME",
+ "value" : {
+ "key" : "PERIODIC_FIRST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_LAST_TIME",
+ "value" : {
+ "key" : "PERIODIC_LAST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicEstablishTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "value" : {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_DELAY",
+ "value" : {
+ "key" : "PERIODIC_DELAY",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "value" : {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_FIRST_TIME",
+ "value" : {
+ "key" : "PERIODIC_FIRST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_LAST_TIME",
+ "value" : {
+ "key" : "PERIODIC_LAST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "value" : {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_DELAY",
+ "value" : {
+ "key" : "PERIODIC_DELAY",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "value" : {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_FIRST_TIME",
+ "value" : {
+ "key" : "PERIODIC_FIRST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_LAST_TIME",
+ "value" : {
+ "key" : "PERIODIC_LAST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicMatchTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "value" : {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_DELAY",
+ "value" : {
+ "key" : "PERIODIC_DELAY",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "value" : {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_FIRST_TIME",
+ "value" : {
+ "key" : "PERIODIC_FIRST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_LAST_TIME",
+ "value" : {
+ "key" : "PERIODIC_LAST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "value" : {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_DELAY",
+ "value" : {
+ "key" : "PERIODIC_DELAY",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "value" : {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_FIRST_TIME",
+ "value" : {
+ "key" : "PERIODIC_FIRST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_LAST_TIME",
+ "value" : {
+ "key" : "PERIODIC_LAST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCActTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "VERSION",
+ "value" : {
+ "key" : "VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "IMSIStatusAlbum",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nimport org.onap.policy.apex.examples.aadm.concepts.ImsiStatus;\n\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\n\nif (inFields[\"IMSI\"] == null) {\n outFields[\"IMSI\"] = 0;\n}\nelse {\n outFields[\"IMSI\"] = inFields[\"IMSI\"];\n}\n\nif (outFields[\"IMSI\"] == 0 && inFields[\"IMSI_IP\"] != null && inFields[\"IMSI_IP\"].equals(\"0\")) {\n // no action arrived\n outFields[\"IMSI\"] = 0;\n outFields[\"PROFILE\"] = \"none\";\n outFields[\"BLACKLIST_ON\"] = false;\n outFields[\"PROBE_ON\"] = false;\n return true;\n}\n\nImsiStatus imsiStatus = getContextAlbum(\"IMSIStatusAlbum\").get((String)inFields[\"IMSI\"]);\nlogger.debug(imsiStatus);\n\nif (imsiStatus.getBlockingCount() > 1) {\n outFields[\"IMSI\"] = 0;\n outFields[\"PROFILE\"] = \"none\";\n outFields[\"BLACKLIST_ON\"] = false;\n outFields[\"PROBE_ON\"] = false;\n\n return true;\n}\n\nif (imsiStatus.getBlockingCount() > 0 && imsiStatus.getBlacklistedTime() != 0) {\n outFields[\"IMSI\"] = 0;\n outFields[\"PROFILE\"] = \"none\";\n outFields[\"BLACKLIST_ON\"] = false;\n outFields[\"PROBE_ON\"] = false;\n\n return true;\n}\n\nimsiStatus.incrementBlockingCount();\nimsiStatus.setBlacklistedTime(System.currentTimeMillis());\n\nlogger.debug(\"Bocking count for IMSI: \" + imsiStatus.getImsi() + \" is: \" + imsiStatus.getBlockingCount());\ngetContextAlbum(\"IMSIStatusAlbum\").put(imsiStatus.getImsi(), imsiStatus);\n\noutFields[\"PROFILE\"] = \"ServiceA\";\noutFields[\"BLACKLIST_ON\"] = true;\noutFields[\"PROBE_ON\"] = false;\n\nif (imsiStatus.getBlockingCount() > 1) {\n logger.debug(\"POLICY SAPCPolicy - blacklisting imsi: \" + outFields[\"IMSI\"] + \" permanently\");\n}\nelse {\n logger.debug(\"POLICY SAPCPolicy - blacklisting imsi: \" + outFields[\"IMSI\"] + \" temporary for 120000 ms\");\n}\n\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCDecideTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "VERSION",
+ "value" : {
+ "key" : "VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCEstablishTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "VERSION",
+ "value" : {
+ "key" : "VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCMatchTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "VERSION",
+ "value" : {
+ "key" : "VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\n\nif (inFields[\"ACTTASK\"] != null && inFields[\"ACTTASK\"].equals(\"no\")) {\n outFields[\"IMSI\"] = 0;\n outFields[\"IMSI_IP\"] = \"0\";\n return true;\n}\n\nif (inFields[\"PROBE_ON\"] != null) {\n outFields[\"PROBE_ON\"] = inFields[\"PROBE_ON\"];\n}\nelse{\n outFields[\"PROBE_ON\"] = false;\n}\n\nif (inFields[\"TCP_ON\"] != null) {\n outFields[\"TCP_ON\"] = inFields[\"TCP_ON\"];\n}\nelse{\n outFields[\"TCP_ON\"] = false;\n}\n\noutFields[\"IMSI\"] = inFields[\"IMSI\"];\nif (inFields[\"IMSI_IP\"] != null) {\n outFields[\"IMSI_IP\"] = inFields[\"IMSI_IP\"];\n}\n\nif (inFields[\"NW_IP\"] != null) {\n outFields[\"NW_IP\"] = inFields[\"NW_IP\"];\n}\n\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMEActTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\n\noutFields[\"TRIGGER_SPEC\"] = \"vMMEThresholdEvent\";\noutFields[\"MAJ_MIN_MAINT_VERSION\"] = \"0.0.1\";\n\nif (outFields[\"IMSI\"] == null) {\n outFields[\"IMSI\"] = 0;\n}\n\nif (outFields[\"ENODEB_ID\"] == null) {\n outFields[\"ENODEB_ID\"] = 0;\n}\n\nif (outFields[\"IMSI_IP\"] == null) {\n outFields[\"IMSI_IP\"] = \"\";\n}\n\nif (outFields[\"NW_IP\"] == null) {\n outFields[\"NW_IP\"] = \"\";\n}\n\noutFields[\"PROFILE\"] = \"ServiceA\";\noutFields[\"THRESHOLD\"] = 20;\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEDecideTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMEDecideTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMEEstablishTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMEMatchTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\n\nif (inFields[\"PROBE_ON\"] != null) {\n outFields[\"PROBE_ON\"] = inFields[\"PROBE_ON\"];\n}\nelse{\n outFields[\"PROBE_ON\"] = false;\n}\n\nif (inFields[\"TCP_ON\"] != null) {\n outFields[\"TCP_ON\"] = inFields[\"TCP_ON\"];\n}\nelse{\n outFields[\"TCP_ON\"] = false;\n}\n\noutFields[\"IMSI\"] = inFields[\"IMSI\"];\nif (inFields[\"IMSI_IP\"] != null) {\n outFields[\"IMSI_IP\"] = inFields[\"IMSI_IP\"];\n}\n\nif (inFields[\"NW_IP\"] != null) {\n outFields[\"NW_IP\"] = inFields[\"NW_IP\"];\n}\noutFields[\"VERSION\"] = inFields.getkey().getVersion();\n\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VMMENoActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMENoActTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.taskName + \" execution logic\");\nlogger.debug(inFields);\nlogger.debug(outFields);\nreturn true;"
+ }
+ }
+ } ]
+ }
+ },
+ "events" : {
+ "key" : {
+ "name" : "AADMEvents",
+ "version" : "0.0.1"
+ },
+ "eventMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AADMEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.aadm.events",
+ "source" : "External",
+ "target" : "Apex",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "APPLICATION",
+ "value" : {
+ "key" : "APPLICATION",
+ "fieldSchemaKey" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ATTACH_COUNT",
+ "value" : {
+ "key" : "ATTACH_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_ATTACH",
+ "fieldSchemaKey" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "value" : {
+ "key" : "AVG_SUBSCRIBER_SERVICE_REQUEST",
+ "fieldSchemaKey" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "DoS",
+ "value" : {
+ "key" : "DoS",
+ "fieldSchemaKey" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NUM_SUBSCRIBERS",
+ "value" : {
+ "key" : "NUM_SUBSCRIBERS",
+ "fieldSchemaKey" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "value" : {
+ "key" : "SERVICE_REQUEST_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "SGW_IP_ADDRESS",
+ "value" : {
+ "key" : "SGW_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "value" : {
+ "key" : "TCP_UE_SIDE_AVG_THROUGHPUT",
+ "fieldSchemaKey" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "value" : {
+ "key" : "TCP_UE_SIDE_MEDIAN_RTT_TX_TO_RX",
+ "fieldSchemaKey" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "UE_IP_ADDRESS",
+ "value" : {
+ "key" : "UE_IP_ADDRESS",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "http_host_class",
+ "value" : {
+ "key" : "http_host_class",
+ "fieldSchemaKey" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "protocol_group",
+ "value" : {
+ "key" : "protocol_group",
+ "fieldSchemaKey" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.aadm.events",
+ "source" : "System",
+ "target" : "Apex",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "value" : {
+ "key" : "PERIODIC_CURRENT_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_DELAY",
+ "value" : {
+ "key" : "PERIODIC_DELAY",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "value" : {
+ "key" : "PERIODIC_EVENT_COUNT",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_FIRST_TIME",
+ "value" : {
+ "key" : "PERIODIC_FIRST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PERIODIC_LAST_TIME",
+ "value" : {
+ "key" : "PERIODIC_LAST_TIME",
+ "fieldSchemaKey" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCBlacklistSubscriberEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCBlacklistSubscriberEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.aadm.events",
+ "source" : "Apex",
+ "target" : "External",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "SAPCEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SAPCEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.aadm.events",
+ "source" : "External",
+ "target" : "Apex",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "VERSION",
+ "value" : {
+ "key" : "VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VMMEEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.aadm.events",
+ "source" : "External",
+ "target" : "Apex",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "XSTREAM_AADM_ACT_EVENT",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "XSTREAM_AADM_ACT_EVENT",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.aadm.events",
+ "source" : "Apex",
+ "target" : "External",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "ACTTASK",
+ "value" : {
+ "key" : "ACTTASK",
+ "fieldSchemaKey" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "BLACKLIST_ON",
+ "value" : {
+ "key" : "BLACKLIST_ON",
+ "fieldSchemaKey" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "ENODEB_ID",
+ "value" : {
+ "key" : "ENODEB_ID",
+ "fieldSchemaKey" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI",
+ "value" : {
+ "key" : "IMSI",
+ "fieldSchemaKey" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "IMSI_IP",
+ "value" : {
+ "key" : "IMSI_IP",
+ "fieldSchemaKey" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MAJ_MIN_MAINT_VERSION",
+ "value" : {
+ "key" : "MAJ_MIN_MAINT_VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "NW_IP",
+ "value" : {
+ "key" : "NW_IP",
+ "fieldSchemaKey" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROBE_ON",
+ "value" : {
+ "key" : "PROBE_ON",
+ "fieldSchemaKey" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "PROFILE",
+ "value" : {
+ "key" : "PROFILE",
+ "fieldSchemaKey" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TCP_ON",
+ "value" : {
+ "key" : "TCP_ON",
+ "fieldSchemaKey" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "THRESHOLD",
+ "value" : {
+ "key" : "THRESHOLD",
+ "fieldSchemaKey" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "TRIGGER_SPEC",
+ "value" : {
+ "key" : "TRIGGER_SPEC",
+ "fieldSchemaKey" : {
+ "name" : "TriggerSpec",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "VERSION",
+ "value" : {
+ "key" : "VERSION",
+ "fieldSchemaKey" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ } ]
+ }
+ },
+ "albums" : {
+ "key" : {
+ "name" : "AADMContext",
+ "version" : "0.0.1"
+ },
+ "albums" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "ENodeBStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ENodeBStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "scope" : "APPLICATION",
+ "isWritable" : true,
+ "itemSchema" : {
+ "name" : "ENodeBStatus",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "IMSIStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "IMSIStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "scope" : "APPLICATION",
+ "isWritable" : true,
+ "itemSchema" : {
+ "name" : "IMSIStatus",
+ "version" : "0.0.1"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "IPAddressStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "IPAddressStatusAlbum",
+ "version" : "0.0.1"
+ },
+ "scope" : "APPLICATION",
+ "isWritable" : true,
+ "itemSchema" : {
+ "name" : "IPAddressStatus",
+ "version" : "0.0.1"
+ }
+ }
+ } ]
+ }
+ },
+ "schemas" : {
+ "key" : {
+ "name" : "AADMDatatypes",
+ "version" : "0.0.1"
+ },
+ "schemas" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ActionTask",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ApplicationName",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AttachCount",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Integer"
+ }
+ }, {
+ "key" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AverageAttach",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Double"
+ }
+ }, {
+ "key" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AverageServiceRequest",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Double"
+ }
+ }, {
+ "key" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AverageThroughput",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Double"
+ }
+ }, {
+ "key" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "BlacklistOnFlag",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Boolean"
+ }
+ }, {
+ "key" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "DOSFlag",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Boolean"
+ }
+ }, {
+ "key" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ENodeBID",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "ENodeBStatus",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ENodeBStatus",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "org.onap.policy.apex.examples.aadm.concepts.ENodeBStatus"
+ }
+ }, {
+ "key" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "HttpHostClass",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "IMSI",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "IMSIStatus",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "IMSIStatus",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "org.onap.policy.apex.examples.aadm.concepts.ImsiStatus"
+ }
+ }, {
+ "key" : {
+ "name" : "IPAddressStatus",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "IPAddressStatus",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "org.onap.policy.apex.examples.aadm.concepts.IpAddressStatus"
+ }
+ }, {
+ "key" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "NWIPAddress",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicDelay",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicEventCount",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PeriodicTime",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ProbeOnFlag",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Boolean"
+ }
+ }, {
+ "key" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "Profile",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ProtocolGroup",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "RoundTripTime",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ServiceRequestCount",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Integer"
+ }
+ }, {
+ "key" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SubscriberCount",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Integer"
+ }
+ }, {
+ "key" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "TCPOnFlag",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Boolean"
+ }
+ }, {
+ "key" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "Threshold",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "TriggerSpec",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "TriggerSpec",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "UEIPAddress",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "Version",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ } ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tools/model-generator/src/test/resources/models/AnomalyDetectionPolicyModel.json b/tools/model-generator/src/test/resources/models/AnomalyDetectionPolicyModel.json
new file mode 100644
index 000000000..b9321c70e
--- /dev/null
+++ b/tools/model-generator/src/test/resources/models/AnomalyDetectionPolicyModel.json
@@ -0,0 +1,1349 @@
+{
+ "apexPolicyModel" : {
+ "key" : {
+ "name" : "AnomalyDetectionPolicyModel",
+ "version" : "0.0.1"
+ },
+ "keyInformation" : {
+ "key" : {
+ "name" : "AnomalyDetectionKeyInformation",
+ "version" : "0.0.1"
+ },
+ "keyInfoMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AADMDatatypes",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AADMDatatypes",
+ "version" : "0.0.1"
+ },
+ "UUID" : "3e36da83-11b0-356a-b863-33e9bb46190c",
+ "description" : "Generated description for concept referred to by key \"AADMDatatypes:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetection",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetection",
+ "version" : "0.0.1"
+ },
+ "UUID" : "b5b56ebf-6802-371c-b7dc-47ceeba7c12c",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetection:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionActEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionActEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "6b1c0ec5-9f84-3177-8031-783cde9c140c",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionActEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionActTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "a212b27b-1a2f-3a23-877b-181f45244ffb",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionActTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionAlbum",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionAlbum",
+ "version" : "0.0.1"
+ },
+ "UUID" : "b2af58db-ce2b-3775-9c3a-e58d2763b6c6",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionAlbum:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionAlbums",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionAlbums",
+ "version" : "0.0.1"
+ },
+ "UUID" : "d1f12713-0528-3120-9af4-165d6f5aec13",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionAlbums:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionDecideEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionDecideEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "c20765ef-d4e8-3891-b94d-ff7831e1085a",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionDecideEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask0",
+ "version" : "0.0.1"
+ },
+ "UUID" : "533fe4b4-c590-31cc-bfe1-164b518627bd",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionDecideTask0:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask1",
+ "version" : "0.0.1"
+ },
+ "UUID" : "85ad18df-4d23-38ac-8dd9-19f4d8ed25b8",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionDecideTask1:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask2",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask2",
+ "version" : "0.0.1"
+ },
+ "UUID" : "5cebb6a9-6722-3f37-bdc4-d5525ad02a5a",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionDecideTask2:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "b6bf1dd6-35a2-3e3b-963f-0ce256c0cf32",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionEstablishEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionEstablishTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "9c9768ab-a258-39fe-b44a-33ac1356ff79",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionEstablishTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionEvents",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionEvents",
+ "version" : "0.0.1"
+ },
+ "UUID" : "55a53997-499b-3912-9172-927e59a13fbe",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionEvents:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionKeyInformation",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionKeyInformation",
+ "version" : "0.0.1"
+ },
+ "UUID" : "6e0fda11-d1ce-3e84-ba30-c3443359f2d7",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionKeyInformation:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionMatchEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionMatchEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "17cb2af5-304d-3097-bf46-8afeb486f893",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionMatchEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionMatchTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "c7d9d062-1ecb-33a6-84e4-1b4976f69bf7",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionMatchTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionPolicies",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionPolicies",
+ "version" : "0.0.1"
+ },
+ "UUID" : "1a408c2a-1366-38ee-898a-7d366c8dfab8",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionPolicies:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionPolicy",
+ "version" : "0.0.1"
+ },
+ "UUID" : "5a862233-05c4-3c97-8bf4-7885b56bd6cb",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionPolicy:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionPolicyModel",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionPolicyModel",
+ "version" : "0.0.1"
+ },
+ "UUID" : "2b32c540-fc54-3962-8721-19c7a90e3745",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionPolicyModel:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionTasks",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionTasks",
+ "version" : "0.0.1"
+ },
+ "UUID" : "3dbd50bb-a126-3601-91e5-adcb947b7e37",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionTasks:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionTriggerEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionTriggerEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0053e73c-85af-3dd4-bf27-3e2b84e57e10",
+ "description" : "Generated description for concept referred to by key \"AnomalyDetectionTriggerEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "UUID" : "926a6990-0610-3382-9cbe-3a9470741d54",
+ "description" : "Generated description for concept referred to by key \"Iteration:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "UUID" : "fb6eac3f-53b0-3f87-984d-b27246d9e891",
+ "description" : "Generated description for concept referred to by key \"MonitoredValue:0.0.1\""
+ }
+ } ]
+ }
+ },
+ "policies" : {
+ "key" : {
+ "name" : "AnomalyDetectionPolicies",
+ "version" : "0.0.1"
+ },
+ "policyMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AnomalyDetectionPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "AnomalyDetectionPolicy",
+ "version" : "0.0.1"
+ },
+ "template" : "MEDA",
+ "state" : {
+ "entry" : [ {
+ "key" : "Act",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ },
+ "trigger" : {
+ "name" : "AnomalyDetectionDecideEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Act_NULL",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ },
+ "outgoingEvent" : {
+ "name" : "AnomalyDetectionActEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nlogger.debug(subject.id + \":\" + subject.stateName) + \", using default task\" + subject.defaultTaskKey.getID();\nreturn true;"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AnomalyDetectionActTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AnomalyDetectionActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "AnomalyDetectionActTask_DIRECT_Act_NULL"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Decide",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ },
+ "trigger" : {
+ "name" : "AnomalyDetectionEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Decide_Act",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ },
+ "outgoingEvent" : {
+ "name" : "AnomalyDetectionDecideEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "AnomalyDetectionAlbum",
+ "version" : "0.0.1"
+ } ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "JAVA",
+ "logic" : "org.onap.policy.apex.examples.adaptive.model.java.AnomalyDetectionPolicyDecideTaskSelectionLogic"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AnomalyDetectionDecideTask0",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "AnomalyDetectionDecideTask0_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "AnomalyDetectionDecideTask1_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask2",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "AnomalyDetectionDecideTask2_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Establish",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ },
+ "trigger" : {
+ "name" : "AnomalyDetectionMatchEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Establish_Decide",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ },
+ "outgoingEvent" : {
+ "name" : "AnomalyDetectionEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nlogger.debug(subject.id + \":\" + subject.stateName) + \", using default task\" + subject.defaultTaskKey.getID();\nreturn true;"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AnomalyDetectionEstablishTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AnomalyDetectionEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "AnomalyDetectionEstablishTask_DIRECT_Establish_Decide"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Match",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Match"
+ },
+ "trigger" : {
+ "name" : "AnomalyDetectionTriggerEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Match_Establish",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ },
+ "outgoingEvent" : {
+ "name" : "AnomalyDetectionMatchEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nlogger.debug(subject.id + \":\" + subject.stateName) + \", using default task\" + subject.defaultTaskKey.getID();\nreturn true;"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AnomalyDetectionMatchTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AnomalyDetectionMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "AnomalyDetectionMatchTask_DIRECT_Match_Establish"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AnomalyDetectionPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "Match"
+ }
+ } ]
+ }
+ },
+ "tasks" : {
+ "key" : {
+ "name" : "AnomalyDetectionTasks",
+ "version" : "0.0.1"
+ },
+ "taskMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AnomalyDetectionActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionActTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.getTaskName() + \" execution logic\");\nlogger.debug(\"inFields : \" + inFields);\noutFields[\"MonitoredValue\"] = inFields[\"MonitoredValue\"];\noutFields[\"Iteration\"] = inFields[\"Iteration\"];\nlogger.debug(\"outFields : \"+outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask0",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.getTaskName() + \" execution logic\");\nlogger.debug(\"inFields : \" + inFields);\noutFields[\"MonitoredValue\"] = inFields[\"MonitoredValue\"];\noutFields[\"Iteration\"] = inFields[\"Iteration\"];\nlogger.debug(\"outFields : \"+outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask1",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.getTaskName() + \" execution logic\");\nlogger.debug(\"inFields : \" + inFields);\noutFields[\"MonitoredValue\"] = inFields[\"MonitoredValue\"];\noutFields[\"Iteration\"] = inFields[\"Iteration\"];\nlogger.debug(\"outFields : \"+outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask2",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionDecideTask2",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.getTaskName() + \" execution logic\");\nlogger.debug(\"inFields : \" + inFields);\noutFields[\"MonitoredValue\"] = inFields[\"MonitoredValue\"];\noutFields[\"Iteration\"] = inFields[\"Iteration\"];\nlogger.debug(\"outFields : \"+outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionEstablishTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.getTaskName() + \" execution logic\");\nlogger.debug(\"inFields : \" + inFields);\noutFields[\"MonitoredValue\"] = inFields[\"MonitoredValue\"];\noutFields[\"Iteration\"] = inFields[\"Iteration\"];\nlogger.debug(\"outFields : \"+outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionMatchTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.getTaskName() + \" execution logic\");\nlogger.debug(\"inFields : \" + inFields);\noutFields[\"MonitoredValue\"] = inFields[\"MonitoredValue\"];\noutFields[\"Iteration\"] = inFields[\"Iteration\"];\nlogger.debug(\"outFields : \"+outFields);\nreturn true;"
+ }
+ }
+ } ]
+ }
+ },
+ "events" : {
+ "key" : {
+ "name" : "AnomalyDetectionEvents",
+ "version" : "0.0.1"
+ },
+ "eventMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AnomalyDetectionActEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionActEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.adaptive.events",
+ "source" : "Act",
+ "target" : "External",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionDecideEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionDecideEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.adaptive.events",
+ "source" : "Decide",
+ "target" : "Act",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.adaptive.events",
+ "source" : "Establish",
+ "target" : "Decide",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionMatchEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionMatchEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.adaptive.events",
+ "source" : "Match",
+ "target" : "Establish",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AnomalyDetectionTriggerEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionTriggerEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.adaptive.events",
+ "source" : "External",
+ "target" : "Match",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "Iteration",
+ "value" : {
+ "key" : "Iteration",
+ "fieldSchemaKey" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ } ]
+ }
+ },
+ "albums" : {
+ "key" : {
+ "name" : "AnomalyDetectionAlbums",
+ "version" : "0.0.1"
+ },
+ "albums" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AnomalyDetectionAlbum",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetectionAlbum",
+ "version" : "0.0.1"
+ },
+ "scope" : "APPLICATION",
+ "isWritable" : true,
+ "itemSchema" : {
+ "name" : "AnomalyDetection",
+ "version" : "0.0.1"
+ }
+ }
+ } ]
+ }
+ },
+ "schemas" : {
+ "key" : {
+ "name" : "AADMDatatypes",
+ "version" : "0.0.1"
+ },
+ "schemas" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AnomalyDetection",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AnomalyDetection",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "org.onap.policy.apex.examples.adaptive.concepts.AnomalyDetection"
+ }
+ }, {
+ "key" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "Iteration",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Integer"
+ }
+ }, {
+ "key" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Double"
+ }
+ } ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tools/model-generator/src/test/resources/models/AutoLearnPolicyModel.json b/tools/model-generator/src/test/resources/models/AutoLearnPolicyModel.json
new file mode 100644
index 000000000..166795002
--- /dev/null
+++ b/tools/model-generator/src/test/resources/models/AutoLearnPolicyModel.json
@@ -0,0 +1,1719 @@
+{
+ "apexPolicyModel" : {
+ "key" : {
+ "name" : "AutoLearnPolicyModel",
+ "version" : "0.0.1"
+ },
+ "keyInformation" : {
+ "key" : {
+ "name" : "AutoLearnKeyInformation",
+ "version" : "0.0.1"
+ },
+ "keyInfoMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "ALDatatypes",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ALDatatypes",
+ "version" : "0.0.1"
+ },
+ "UUID" : "148a50d2-e4f0-3783-9c91-e94df6d01512",
+ "description" : "Generated description for concept referred to by key \"ALDatatypes:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearn",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearn",
+ "version" : "0.0.1"
+ },
+ "UUID" : "391e51da-a4a5-36e7-91b9-7f847542b2de",
+ "description" : "Generated description for concept referred to by key \"AutoLearn:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnActEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnActEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "4999200f-19a0-3c67-94fe-217a5ca5a177",
+ "description" : "Generated description for concept referred to by key \"AutoLearnActEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnActTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "f3b2ddd9-7c2a-305e-88e1-37de0980c80c",
+ "description" : "Generated description for concept referred to by key \"AutoLearnActTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnAlbum",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnAlbum",
+ "version" : "0.0.1"
+ },
+ "UUID" : "af6c71e7-df5c-3e39-9d2f-23201f7eeaf3",
+ "description" : "Generated description for concept referred to by key \"AutoLearnAlbum:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnContext",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnContext",
+ "version" : "0.0.1"
+ },
+ "UUID" : "f1ed359e-7152-3cdb-8f85-b99e9eb9af9b",
+ "description" : "Generated description for concept referred to by key \"AutoLearnContext:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "2d19b051-7446-38f3-a12f-b6e94ea2be92",
+ "description" : "Generated description for concept referred to by key \"AutoLearnDecideEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask0",
+ "version" : "0.0.1"
+ },
+ "UUID" : "9f1a710f-e3b6-3c9a-9c66-188750abca16",
+ "description" : "Generated description for concept referred to by key \"AutoLearnDecideTask0:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask1",
+ "version" : "0.0.1"
+ },
+ "UUID" : "2c7ff214-1a87-3b08-af9b-434045c9e2fd",
+ "description" : "Generated description for concept referred to by key \"AutoLearnDecideTask1:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask2",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask2",
+ "version" : "0.0.1"
+ },
+ "UUID" : "124d809b-b080-3e76-b42b-ad7c8e810801",
+ "description" : "Generated description for concept referred to by key \"AutoLearnDecideTask2:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask3",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask3",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0cc1787e-a326-3f36-848d-0a30da63ec83",
+ "description" : "Generated description for concept referred to by key \"AutoLearnDecideTask3:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask4",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask4",
+ "version" : "0.0.1"
+ },
+ "UUID" : "db69570f-65f4-3b33-9e34-1c4b3ee92669",
+ "description" : "Generated description for concept referred to by key \"AutoLearnDecideTask4:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask5",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask5",
+ "version" : "0.0.1"
+ },
+ "UUID" : "bd9f2bcf-a3b8-33c7-a48a-3452ede151ff",
+ "description" : "Generated description for concept referred to by key \"AutoLearnDecideTask5:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask6",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask6",
+ "version" : "0.0.1"
+ },
+ "UUID" : "172e9c74-aeee-37d9-a483-0f772cd36b81",
+ "description" : "Generated description for concept referred to by key \"AutoLearnDecideTask6:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "430b00e0-5c4a-3a78-b636-3873d6277601",
+ "description" : "Generated description for concept referred to by key \"AutoLearnEstablishEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnEstablishTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "6915102a-6564-327c-bcf9-d8c040463794",
+ "description" : "Generated description for concept referred to by key \"AutoLearnEstablishTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnEvents",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnEvents",
+ "version" : "0.0.1"
+ },
+ "UUID" : "1fcbf5a7-2b81-3d62-b870-e3340628d9d5",
+ "description" : "Generated description for concept referred to by key \"AutoLearnEvents:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnKeyInformation",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnKeyInformation",
+ "version" : "0.0.1"
+ },
+ "UUID" : "253488fd-2140-33ad-8374-00d43d3a54ca",
+ "description" : "Generated description for concept referred to by key \"AutoLearnKeyInformation:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnMatchEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnMatchEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "1723626c-8fec-3cfd-a071-b1e3bd92637d",
+ "description" : "Generated description for concept referred to by key \"AutoLearnMatchEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnMatchTask",
+ "version" : "0.0.1"
+ },
+ "UUID" : "eb3d5b15-79d7-3e24-8513-f658a1e77416",
+ "description" : "Generated description for concept referred to by key \"AutoLearnMatchTask:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnPolicies",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnPolicies",
+ "version" : "0.0.1"
+ },
+ "UUID" : "72a6d6cf-d04f-3cd6-b9eb-1313e477219b",
+ "description" : "Generated description for concept referred to by key \"AutoLearnPolicies:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnPolicy",
+ "version" : "0.0.1"
+ },
+ "UUID" : "e96b40b3-2447-3cf3-8848-34c908f21c92",
+ "description" : "Generated description for concept referred to by key \"AutoLearnPolicy:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnPolicyModel",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnPolicyModel",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0c87dd54-fe77-3b05-bb05-93c9cd8c964d",
+ "description" : "Generated description for concept referred to by key \"AutoLearnPolicyModel:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnTasks",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnTasks",
+ "version" : "0.0.1"
+ },
+ "UUID" : "beb03fdd-0a6e-3669-90b8-218ae9df96a4",
+ "description" : "Generated description for concept referred to by key \"AutoLearnTasks:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnTriggerEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnTriggerEvent",
+ "version" : "0.0.1"
+ },
+ "UUID" : "6bd03d79-85f3-373b-a4ab-cbaad89ebd1a",
+ "description" : "Generated description for concept referred to by key \"AutoLearnTriggerEvent:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "UUID" : "fb6eac3f-53b0-3f87-984d-b27246d9e891",
+ "description" : "Generated description for concept referred to by key \"MonitoredValue:0.0.1\""
+ }
+ } ]
+ }
+ },
+ "policies" : {
+ "key" : {
+ "name" : "AutoLearnPolicies",
+ "version" : "0.0.1"
+ },
+ "policyMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AutoLearnPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "AutoLearnPolicy",
+ "version" : "0.0.1"
+ },
+ "template" : "MEDA",
+ "state" : {
+ "entry" : [ {
+ "key" : "Act",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ },
+ "trigger" : {
+ "name" : "AutoLearnDecideEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Act_NULL",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ },
+ "outgoingEvent" : {
+ "name" : "AutoLearnActEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nlogger.debug(subject.id + \":\" + subject.stateName) + \", using default task\" + subject.defaultTaskKey.getID();\nreturn true;"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AutoLearnActTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AutoLearnActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "AutoLearnActTask_DIRECT_Act_NULL"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Act",
+ "localName" : "Act_NULL"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Decide",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ },
+ "trigger" : {
+ "name" : "AutoLearnEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Decide_Act",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ },
+ "outgoingEvent" : {
+ "name" : "AutoLearnDecideEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Act"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "AutoLearnAlbum",
+ "version" : "0.0.1"
+ } ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "JAVA",
+ "logic" : "org.onap.policy.apex.examples.adaptive.model.java.AutoLearnPolicyDecideTaskSelectionLogic"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AutoLearnDecideTask0",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AutoLearnDecideTask0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "AutoLearnDecideTask0_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "AutoLearnDecideTask1_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask2",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "AutoLearnDecideTask2_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask3",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "AutoLearnDecideTask3_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask4",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "AutoLearnDecideTask4_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask5",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "AutoLearnDecideTask5_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask6",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "AutoLearnDecideTask6_DIRECT_Decide_Act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Decide",
+ "localName" : "Decide_Act"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Establish",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ },
+ "trigger" : {
+ "name" : "AutoLearnMatchEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Establish_Decide",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ },
+ "outgoingEvent" : {
+ "name" : "AutoLearnEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Decide"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nlogger.debug(subject.id + \":\" + subject.stateName) + \", using default task\" + subject.defaultTaskKey.getID();\nreturn true;"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AutoLearnEstablishTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AutoLearnEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "AutoLearnEstablishTask_DIRECT_Establish_Decide"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Establish",
+ "localName" : "Establish_Decide"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "Match",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Match"
+ },
+ "trigger" : {
+ "name" : "AutoLearnTriggerEvent",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "Match_Establish",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ },
+ "outgoingEvent" : {
+ "name" : "AutoLearnMatchEvent",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "Establish"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nlogger.debug(subject.id + \":\" + subject.stateName) + \", using default task\" + subject.defaultTaskKey.getID();\nreturn true;"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "AutoLearnMatchTask",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AutoLearnMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "AutoLearnMatchTask_DIRECT_Match_Establish"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "AutoLearnPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "Match",
+ "localName" : "Match_Establish"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "Match"
+ }
+ } ]
+ }
+ },
+ "tasks" : {
+ "key" : {
+ "name" : "AutoLearnTasks",
+ "version" : "0.0.1"
+ },
+ "taskMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AutoLearnActTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnActTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(\"AutoLearnActTask execution logic\");\nlogger.debug(\"inFields : \" + inFields);\noutFields[\"MonitoredValue\"] = inFields[\"MonitoredValue\"];\noutFields[\"LastMonitoredValue\"] = inFields[\"LastMonitoredValue\"];\nlogger.debug(\"outFields : \" + outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask0",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask0",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(\"AutoLearnDecideTask0: inFields:\" + inFields);\njava.util.Random rand = new java.util.Random(System.currentTimeMillis());\ndouble MIN = -100.0;\ndouble MAX = 100.0;\ndouble WANT = 50.0;\n\ndouble inval = (Double)(inFields[\"MonitoredValue\"]);\ndouble ret = inval;\n///////////////\ndouble diff = (1.0/2.0) * (Math.abs(inval - WANT));\n///////////////\nret = inval + diff;\nif (ret > MAX)\n ret = MAX;\nif (ret<MIN)\n ret = MIN;\n\noutFields[\"MonitoredValue\"] = ret;\noutFields[\"LastMonitoredValue\"] = inval;\nlogger.debug(\"AutoLearnDecideTask0: outFields:\" + outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask1",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(\"AutoLearnDecideTask1: inFields:\" + inFields);\njava.util.Random rand = new java.util.Random(System.currentTimeMillis());\ndouble MIN = -100.0;\ndouble MAX = 100.0;\ndouble WANT = 50.0;\n\ndouble inval = (Double)(inFields[\"MonitoredValue\"]);\ndouble ret = inval;\n///////////////\ndouble diff = (1.0/5.0) * (Math.abs(inval - WANT));\n///////////////\nret = inval + diff;\nif (ret > MAX)\n ret = MAX;\nif (ret<MIN)\n ret = MIN;\n\noutFields[\"MonitoredValue\"] = ret;\noutFields[\"LastMonitoredValue\"] = inval;\nlogger.debug(\"AutoLearnDecideTask1: outFields:\" + outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask2",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask2",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(\"AutoLearnDecideTask2: inFields:\" + inFields);\njava.util.Random rand = new java.util.Random(System.currentTimeMillis());\ndouble MIN = -100.0;\ndouble MAX = 100.0;\ndouble WANT = 50.0;\n\ndouble inval = (Double)(inFields[\"MonitoredValue\"]);\ndouble ret = inval;\n///////////////\ndouble diff = (1.0/10.0) * (Math.abs(inval - WANT));\n///////////////\nret = inval + diff;\nif (ret > MAX)\n ret = MAX;\nif (ret<MIN)\n ret = MIN;\n\noutFields[\"MonitoredValue\"] = ret;\noutFields[\"LastMonitoredValue\"] = inval;\nlogger.debug(\"AutoLearnDecideTask2: outFields:\" + outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask3",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask3",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(\"AutoLearnDecideTask3: inFields:\" + inFields);\njava.util.Random rand = new java.util.Random(System.currentTimeMillis());\ndouble MIN = -100.0;\ndouble MAX = 100.0;\ndouble WANT = 50.0;\n\ndouble inval = (Double)(inFields[\"MonitoredValue\"]);\ndouble ret = inval;\n///////////////\ndouble diff = rand.nextGaussian()*((MAX - WANT) / 50.0);\n///////////////\nret = inval + diff;\nif (ret > MAX)\n ret = MAX;\nif (ret<MIN)\n ret = MIN;\n\noutFields[\"MonitoredValue\"] = ret;\noutFields[\"LastMonitoredValue\"] = inval;\nlogger.debug(\"AutoLearnDecideTask3: outFields:\" + outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask4",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask4",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(\"AutoLearnDecideTask4: inFields:\" + inFields);\njava.util.Random rand = new java.util.Random(System.currentTimeMillis());\ndouble MIN = -100.0;\ndouble MAX = 100.0;\ndouble WANT = 50.0;\n\ndouble inval = (Double)(inFields[\"MonitoredValue\"]);\ndouble ret = inval;\n///////////////\ndouble diff = (-1.0/10.0) * (Math.abs(inval - WANT));\n///////////////\nret = inval + diff;\nif (ret > MAX)\n ret = MAX;\nif (ret<MIN)\n ret = MIN;\n\noutFields[\"MonitoredValue\"] = ret;\noutFields[\"LastMonitoredValue\"] = inval;\nlogger.debug(\"AutoLearnDecideTask4: outFields:\" + outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask5",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask5",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(\"AutoLearnDecideTask5: inFields:\" + inFields);\njava.util.Random rand = new java.util.Random(System.currentTimeMillis());\ndouble MIN = -100.0;\ndouble MAX = 100.0;\ndouble WANT = 50.0;\n\ndouble inval = (Double)(inFields[\"MonitoredValue\"]);\ndouble ret = inval;\n///////////////\ndouble diff = (-1.0/5.0) * (Math.abs(inval - WANT));\n///////////////\nret = inval + diff;\nif (ret > MAX)\n ret = MAX;\nif (ret < MIN)\n ret = MIN;\n\noutFields[\"MonitoredValue\"] = ret;\noutFields[\"LastMonitoredValue\"] = inval;\nlogger.debug(\"AutoLearnDecideTask5: outFields:\" + outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideTask6",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideTask6",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(\"AutoLearnDecideTask6: inFields:\" + inFields);\njava.util.Random rand = new java.util.Random(System.currentTimeMillis());\ndouble MIN = -100.0;\ndouble MAX = 100.0;\ndouble WANT = 50.0;\n\ndouble inval = (Double)(inFields[\"MonitoredValue\"]);\ndouble ret = inval;\n///////////////\ndouble diff = (-1.0/2.0) * (Math.abs(inval - WANT));\n///////////////\nret = inval + diff;\nif (ret > MAX)\n ret = MAX;\nif (ret<MIN)\n ret = MIN;\n\noutFields[\"MonitoredValue\"] = ret;\noutFields[\"LastMonitoredValue\"] = inval;\nlogger.debug(\"AutoLearnDecideTask6: outFields:\" + outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnEstablishTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnEstablishTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(\"AutoLearnActTask execution logic\");\nlogger.debug(\"inFields : \" + inFields);\noutFields[\"MonitoredValue\"] = inFields[\"MonitoredValue\"];\noutFields[\"LastMonitoredValue\"] = inFields[\"LastMonitoredValue\"];\nlogger.debug(\"outFields : \" + outFields);\nreturn true;"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnMatchTask",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnMatchTask",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nlogger.debug(\"AutoLearnActTask execution logic\");\nlogger.debug(\"inFields : \" + inFields);\noutFields[\"MonitoredValue\"] = inFields[\"MonitoredValue\"];\noutFields[\"LastMonitoredValue\"] = inFields[\"LastMonitoredValue\"];\nlogger.debug(\"outFields : \" + outFields);\nreturn true;"
+ }
+ }
+ } ]
+ }
+ },
+ "events" : {
+ "key" : {
+ "name" : "AutoLearnEvents",
+ "version" : "0.0.1"
+ },
+ "eventMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AutoLearnActEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnActEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.adaptive.events",
+ "source" : "Act",
+ "target" : "External",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnDecideEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnDecideEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.adaptive.events",
+ "source" : "Decide",
+ "target" : "Act",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnEstablishEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.adaptive.events",
+ "source" : "Establish",
+ "target" : "Decide",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnMatchEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnMatchEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.adaptive.events",
+ "source" : "Match",
+ "target" : "Establish",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "AutoLearnTriggerEvent",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnTriggerEvent",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.adaptive.events",
+ "source" : "External",
+ "target" : "Match",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "LastMonitoredValue",
+ "value" : {
+ "key" : "LastMonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "MonitoredValue",
+ "value" : {
+ "key" : "MonitoredValue",
+ "fieldSchemaKey" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ } ]
+ }
+ },
+ "albums" : {
+ "key" : {
+ "name" : "AutoLearnContext",
+ "version" : "0.0.1"
+ },
+ "albums" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AutoLearnAlbum",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearnAlbum",
+ "version" : "0.0.1"
+ },
+ "scope" : "APPLICATION",
+ "isWritable" : true,
+ "itemSchema" : {
+ "name" : "AutoLearn",
+ "version" : "0.0.1"
+ }
+ }
+ } ]
+ }
+ },
+ "schemas" : {
+ "key" : {
+ "name" : "ALDatatypes",
+ "version" : "0.0.1"
+ },
+ "schemas" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "AutoLearn",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "AutoLearn",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "org.onap.policy.apex.examples.adaptive.concepts.AutoLearn"
+ }
+ }, {
+ "key" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MonitoredValue",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Double"
+ }
+ } ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tools/model-generator/src/test/resources/models/AvroModel.json b/tools/model-generator/src/test/resources/models/AvroModel.json
new file mode 100644
index 000000000..81563c64c
--- /dev/null
+++ b/tools/model-generator/src/test/resources/models/AvroModel.json
@@ -0,0 +1,3009 @@
+{
+ "apexPolicyModel" : {
+ "key" : {
+ "name" : "PCVS-VpnSla",
+ "version" : "1.0.0"
+ },
+ "keyInformation" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_KeyInfo",
+ "version" : "1.0.0"
+ },
+ "keyInfoMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "CustomerContextEventIn",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "CustomerContextEventIn",
+ "version" : "1.0.0"
+ },
+ "UUID" : "1ce15f63-7c90-3a13-96d9-e3964f76aa0e",
+ "description" : "Event to add Customers to engine Context"
+ }
+ }, {
+ "key" : {
+ "name" : "CustomerContextPolicy",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "CustomerContextPolicy",
+ "version" : "1.0.0"
+ },
+ "UUID" : "91854e6d-868b-3d1a-aff1-a9390173f144",
+ "description" : "Policy that adds Customer information to engine context"
+ }
+ }, {
+ "key" : {
+ "name" : "CustomerContextTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "CustomerContextTask",
+ "version" : "1.0.0"
+ },
+ "UUID" : "c43c4cdc-71ef-3e0e-90a2-e36f4f355e3e",
+ "description" : "This task adds event context to customer context"
+ }
+ }, {
+ "key" : {
+ "name" : "EdgeContextEventIn",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "EdgeContextEventIn",
+ "version" : "1.0.0"
+ },
+ "UUID" : "1817ee7e-d91a-33cb-b9e3-fa60e5c2f340",
+ "description" : "Event to add an Edge to engine Context"
+ }
+ }, {
+ "key" : {
+ "name" : "EdgeContextPolicy",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "EdgeContextPolicy",
+ "version" : "1.0.0"
+ },
+ "UUID" : "652dc1e9-1030-3fe1-8e6e-f7758c68959f",
+ "description" : "Policy that adds an edge to context"
+ }
+ }, {
+ "key" : {
+ "name" : "EdgeContextTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "EdgeContextTask",
+ "version" : "1.0.0"
+ },
+ "UUID" : "bb3dd70d-ab5c-3ea4-81ca-92f578e9808b",
+ "description" : "This task adds event context to edge context"
+ }
+ }, {
+ "key" : {
+ "name" : "NodeContextEventIn",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "NodeContextEventIn",
+ "version" : "1.0.0"
+ },
+ "UUID" : "38bb48b4-07fd-3e53-976d-651fd0bbf5e1",
+ "description" : "Event to add Node to engine Context"
+ }
+ }, {
+ "key" : {
+ "name" : "NodeContextPolicy",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "NodeContextPolicy",
+ "version" : "1.0.0"
+ },
+ "UUID" : "6dd58709-d4b7-31d6-8230-ab91e548985a",
+ "description" : "Policy that adds an node to context"
+ }
+ }, {
+ "key" : {
+ "name" : "NodeContextTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "NodeContextTask",
+ "version" : "1.0.0"
+ },
+ "UUID" : "32ffcbca-fee6-3cb4-b311-fa3ba6a3b9b7",
+ "description" : "This task adds event context to node context"
+ }
+ }, {
+ "key" : {
+ "name" : "PCVS-VpnSla",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PCVS-VpnSla",
+ "version" : "1.0.0"
+ },
+ "UUID" : "fc0d1be0-fc4f-3758-b530-6435d279951e",
+ "description" : "Policies-Controlled Video Streaming, VPN SLA Policy Model"
+ }
+ }, {
+ "key" : {
+ "name" : "PCVS-VpnSla_Albums",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_Albums",
+ "version" : "1.0.0"
+ },
+ "UUID" : "2e34f18e-37e6-35d2-ba11-e20f96e113d5",
+ "description" : "Generated description for concept referred to by key \"PCVS-VpnSla_Albums:1.0.0\""
+ }
+ }, {
+ "key" : {
+ "name" : "PCVS-VpnSla_Events",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_Events",
+ "version" : "1.0.0"
+ },
+ "UUID" : "0c04d3b3-86aa-39c2-938e-b44224cb0798",
+ "description" : "Generated description for concept referred to by key \"PCVS-VpnSla_Events:1.0.0\""
+ }
+ }, {
+ "key" : {
+ "name" : "PCVS-VpnSla_KeyInfo",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_KeyInfo",
+ "version" : "1.0.0"
+ },
+ "UUID" : "6f257a91-576d-3e49-92ca-9c9a92994cff",
+ "description" : "Generated description for concept referred to by key \"PCVS-VpnSla_KeyInfo:1.0.0\""
+ }
+ }, {
+ "key" : {
+ "name" : "PCVS-VpnSla_Policies",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_Policies",
+ "version" : "1.0.0"
+ },
+ "UUID" : "af00d5d2-f584-37eb-a539-db10284828d8",
+ "description" : "Generated description for concept referred to by key \"PCVS-VpnSla_Policies:1.0.0\""
+ }
+ }, {
+ "key" : {
+ "name" : "PCVS-VpnSla_Schemas",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_Schemas",
+ "version" : "1.0.0"
+ },
+ "UUID" : "390c3e62-0455-330c-8bdc-c835322cca9c",
+ "description" : "Generated description for concept referred to by key \"PCVS-VpnSla_Schemas:1.0.0\""
+ }
+ }, {
+ "key" : {
+ "name" : "PCVS-VpnSla_Tasks",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_Tasks",
+ "version" : "1.0.0"
+ },
+ "UUID" : "5834101d-d5e7-323e-8bd2-595ed4618f07",
+ "description" : "Generated description for concept referred to by key \"PCVS-VpnSla_Tasks:1.0.0\""
+ }
+ }, {
+ "key" : {
+ "name" : "ReportOut",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ReportOut",
+ "version" : "1.0.0"
+ },
+ "UUID" : "29b332dc-e8b6-390e-8b41-3edbba45da44",
+ "description" : "Report of a policy (issued by a task)"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaActOut",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaActOut",
+ "version" : "1.0.0"
+ },
+ "UUID" : "37d5dfba-d6e0-35a5-958b-21f77cb78a0c",
+ "description" : "Event action"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaDecideOut",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaDecideOut",
+ "version" : "1.0.0"
+ },
+ "UUID" : "8d4ea7ed-ed7a-3f34-8ecc-56f6f192357c",
+ "description" : "Event with a decision for the SLA policy"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaEstablishOut",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaEstablishOut",
+ "version" : "1.0.0"
+ },
+ "UUID" : "e3fde4f3-338a-3759-a2d8-f23c6fd390ac",
+ "description" : "Event with situation for the SLA policy"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaMatchOut",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaMatchOut",
+ "version" : "1.0.0"
+ },
+ "UUID" : "40aa223f-4689-3de1-bfb5-7889a07f6045",
+ "description" : "Event with matched trigger for the VPN SLA policy"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicy",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicy",
+ "version" : "1.0.0"
+ },
+ "UUID" : "cd75105c-4cdb-312d-9372-aa508f4c400c",
+ "description" : "Policy deciding customer treatment based on SLAs as MEDA policy"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyActTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyActTask",
+ "version" : "1.0.0"
+ },
+ "UUID" : "c6ff32e6-261b-35cc-a8e8-ba87ecf555e6",
+ "description" : "Task issueing an action for taken decision"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideNoneTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideNoneTask",
+ "version" : "1.0.0"
+ },
+ "UUID" : "360c7f52-0930-38e5-ab54-59e4f3930c1e",
+ "description" : "Decide task for a 'none' problem"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyDecidePriorityTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyDecidePriorityTask",
+ "version" : "1.0.0"
+ },
+ "UUID" : "f5226370-98b2-322d-9eb9-a17dfd834104",
+ "description" : "Decide task solving the problem by using customer priorities"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideSlaTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideSlaTask",
+ "version" : "1.0.0"
+ },
+ "UUID" : "c231c338-fda7-3cc3-b282-382c0ace4015",
+ "description" : "Decide task solving the problem by balancing SLAs"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideSolvedTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideSolvedTask",
+ "version" : "1.0.0"
+ },
+ "UUID" : "5e5b3951-a4c3-387d-9b75-ad1197372695",
+ "description" : "Decide task solving the problem by using customer priorities"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyEstablishTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyEstablishTask",
+ "version" : "1.0.0"
+ },
+ "UUID" : "83774c6c-73dd-3ce6-98ed-6c9295da9562",
+ "description" : "Task taking a match event and establishing a situation"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyMatchTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyMatchTask",
+ "version" : "1.0.0"
+ },
+ "UUID" : "bb6c7e85-b5de-3f02-96c6-34c85ae174e3",
+ "description" : "Pre-process an edge event"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaTrigger",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaTrigger",
+ "version" : "1.0.0"
+ },
+ "UUID" : "7224a6d5-02cf-3fa0-803e-f930120c14d3",
+ "description" : "Event triggering the VPN SLA policy"
+ }
+ }, {
+ "key" : {
+ "name" : "actionDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "actionDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "9818146b-f42c-378b-8818-519d5e16ea2b",
+ "description" : "An action for the actioning system"
+ }
+ }, {
+ "key" : {
+ "name" : "albumCustomerMap",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "albumCustomerMap",
+ "version" : "0.0.1"
+ },
+ "UUID" : "dde24214-9a5b-3995-a942-81e5c509af7d",
+ "description" : "Generated description for concept referred to by key \"albumCustomerMap:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "albumProblemMap",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "albumProblemMap",
+ "version" : "0.0.1"
+ },
+ "UUID" : "681ed388-d70e-3a87-a322-a11813fb4cd5",
+ "description" : "Generated description for concept referred to by key \"albumProblemMap:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "albumTopoEdges",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "albumTopoEdges",
+ "version" : "0.0.1"
+ },
+ "UUID" : "4ac38510-3a01-33cc-9015-334408041b53",
+ "description" : "Generated description for concept referred to by key \"albumTopoEdges:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "albumTopoNodes",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "albumTopoNodes",
+ "version" : "0.0.1"
+ },
+ "UUID" : "0ca9d9c1-073f-3183-af0c-c5f02cbdb26b",
+ "description" : "Generated description for concept referred to by key \"albumTopoNodes:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerDowntimeSLADecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerDowntimeSLADecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "dd0d2302-58f2-3904-a5b2-60e950c7db9f",
+ "description" : "Customer Context: contracted downtime as per SLA"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerDowntimeYTDDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerDowntimeYTDDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "dc75514e-19dc-307e-9de9-c07317197b17",
+ "description" : "Customer Context: year-to-date downtime experienced"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerLinksDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerLinksDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "49c6b6e3-d987-3612-a846-9305fc5369f2",
+ "description" : "Customer Context: links a customer uses (for events/task)"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerMapDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerMapDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "a32fe8e8-f626-3ad6-a979-6dc0897d0435",
+ "description" : "Map of customers with all known information"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerNameDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerNameDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "38151d46-be2d-354b-8142-994d880314a0",
+ "description" : "Customer Context: customer name"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerPriorityDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerPriorityDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "8c4d86b6-58fa-38a8-a86c-1498701a08fa",
+ "description" : "Customer Context: priority flag"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerSatisfactionDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerSatisfactionDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "5d995fbe-f60a-3e6a-b60e-ed46dba0fc28",
+ "description" : "Customer Context: satisfaction in percent"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtEdgeEndDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtEdgeEndDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "a68eab04-4297-369b-85ac-2968e418fcbd",
+ "description" : "Topology Edges: edge endpoint (end)"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtEdgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtEdgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "7688d4e1-bb1f-30f3-92a6-f3eef9816236",
+ "description" : "Topology Edges: edge (link) name"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtEdgeStartDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtEdgeStartDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "c20605f1-5b90-38a5-8782-d2d23309007a",
+ "description" : "Topology Edges: edge endpoint (start)"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtEdgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtEdgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "785e1b75-5389-35b6-b4a1-e9ec49891155",
+ "description" : "Topology Edges: edge status as up (true) or down (false)"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtNodeMininetNameDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtNodeMininetNameDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "ecfd3326-1425-3793-b4fb-54d5ca58324c",
+ "description" : "Topology Nodes: node name in Mininet"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtNodeNameDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtNodeNameDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "80654d36-82eb-3dc6-b411-1442341946fb",
+ "description" : "Topology Nodes: node name"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtTopologyEdgesDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtTopologyEdgesDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "d2561824-0bf1-3923-b779-89d2e527c507",
+ "description" : "Topology Edges Context Map"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtTopologyNodesDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtTopologyNodesDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "0ee08c50-b09e-36d5-8fb0-ec97c5be8b20",
+ "description" : "Topology Nodes Context Map"
+ }
+ }, {
+ "key" : {
+ "name" : "decideDecisionDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "decideDecisionDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "8f9a3a78-1807-3be5-b70a-e084d638f1f2",
+ "description" : "Decide: the taken decision"
+ }
+ }, {
+ "key" : {
+ "name" : "edgeChangedDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "edgeChangedDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "d21f8db2-1ac0-345a-b328-9227b47628fd",
+ "description" : "Status Change (true:change, false:no change)"
+ }
+ }, {
+ "key" : {
+ "name" : "edgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "edgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "bd8f33d8-b7a5-3fae-82b8-783b84bc7e17",
+ "description" : "Edge name"
+ }
+ }, {
+ "key" : {
+ "name" : "edgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "edgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "ba935212-80f1-3ac1-96d9-6e2519773b9c",
+ "description" : "Statuf of the edge (UP, DOWN)"
+ }
+ }, {
+ "key" : {
+ "name" : "establishSituationDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "establishSituationDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "206ffbd0-cb07-329a-93fe-990961e3f92c",
+ "description" : "Establish: the situation that was established"
+ }
+ }, {
+ "key" : {
+ "name" : "problemMapDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "problemMapDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "260c46a5-4e27-3575-9076-0ff72c9bf32a",
+ "description" : "Map of problems with all known Information"
+ }
+ }, {
+ "key" : {
+ "name" : "reportDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "reportDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "788e86c5-26d6-3af1-b1ab-2d530a0a45fb",
+ "description" : "Report of activities of a policy/task"
+ }
+ }, {
+ "key" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "UUID" : "4d385841-1db1-3ddc-bb7b-8b67b3c701ad",
+ "description" : "Timestamp"
+ }
+ } ]
+ }
+ },
+ "policies" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_Policies",
+ "version" : "1.0.0"
+ },
+ "policyMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "CustomerContextPolicy",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "CustomerContextPolicy",
+ "version" : "1.0.0"
+ },
+ "template" : "FREEFORM",
+ "state" : {
+ "entry" : [ {
+ "key" : "CustomerContextState",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "CustomerContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "CustomerContextState"
+ },
+ "trigger" : {
+ "name" : "CustomerContextEventIn",
+ "version" : "1.0.0"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "CustomerContextState_Output_Direct",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "CustomerContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "CustomerContextState",
+ "localName" : "CustomerContextState_Output_Direct"
+ },
+ "outgoingEvent" : {
+ "name" : "ReportOut",
+ "version" : "1.0.0"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "CustomerContextTask",
+ "version" : "1.0.0"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "CustomerContextTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "CustomerContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "CustomerContextState",
+ "localName" : "doContext"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "CustomerContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "CustomerContextState",
+ "localName" : "CustomerContextState_Output_Direct"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "CustomerContextState"
+ }
+ }, {
+ "key" : {
+ "name" : "EdgeContextPolicy",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "EdgeContextPolicy",
+ "version" : "1.0.0"
+ },
+ "template" : "FREEFORM",
+ "state" : {
+ "entry" : [ {
+ "key" : "EdgeContextState",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "EdgeContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "EdgeContextState"
+ },
+ "trigger" : {
+ "name" : "EdgeContextEventIn",
+ "version" : "1.0.0"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "EdgeContextState_Output_Direct",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "EdgeContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "EdgeContextState",
+ "localName" : "EdgeContextState_Output_Direct"
+ },
+ "outgoingEvent" : {
+ "name" : "ReportOut",
+ "version" : "1.0.0"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "EdgeContextTask",
+ "version" : "1.0.0"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "EdgeContextTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "EdgeContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "EdgeContextState",
+ "localName" : "doContext"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "EdgeContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "EdgeContextState",
+ "localName" : "EdgeContextState_Output_Direct"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "EdgeContextState"
+ }
+ }, {
+ "key" : {
+ "name" : "NodeContextPolicy",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "NodeContextPolicy",
+ "version" : "1.0.0"
+ },
+ "template" : "FREEFORM",
+ "state" : {
+ "entry" : [ {
+ "key" : "NodeContextState",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "NodeContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NodeContextState"
+ },
+ "trigger" : {
+ "name" : "NodeContextEventIn",
+ "version" : "1.0.0"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "NodeContextState_Output_Direct",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "NodeContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NodeContextState",
+ "localName" : "NodeContextState_Output_Direct"
+ },
+ "outgoingEvent" : {
+ "name" : "ReportOut",
+ "version" : "1.0.0"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "NodeContextTask",
+ "version" : "1.0.0"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "NodeContextTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "NodeContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NodeContextState",
+ "localName" : "doContext"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "NodeContextPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NodeContextState",
+ "localName" : "NodeContextState_Output_Direct"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "NodeContextState"
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicy",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "VpnSlaPolicy",
+ "version" : "1.0.0"
+ },
+ "template" : "FREEFORM",
+ "state" : {
+ "entry" : [ {
+ "key" : "VpnSlaPolicyActState",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "VpnSlaPolicyActState"
+ },
+ "trigger" : {
+ "name" : "VpnSlaDecideOut",
+ "version" : "1.0.0"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "SlaPolicyAct_Output_Direct",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyActState",
+ "localName" : "SlaPolicyAct_Output_Direct"
+ },
+ "outgoingEvent" : {
+ "name" : "VpnSlaActOut",
+ "version" : "1.0.0"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "VpnSlaPolicyActTask",
+ "version" : "1.0.0"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "VpnSlaPolicyActTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyActState",
+ "localName" : "act"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyActState",
+ "localName" : "SlaPolicyAct_Output_Direct"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "VpnSlaPolicyDecideState",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "VpnSlaPolicyDecideState"
+ },
+ "trigger" : {
+ "name" : "VpnSlaEstablishOut",
+ "version" : "1.0.0"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "VpnSlaPolicyDecide_Output_Direct",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyDecideState",
+ "localName" : "VpnSlaPolicyDecide_Output_Direct"
+ },
+ "outgoingEvent" : {
+ "name" : "VpnSlaDecideOut",
+ "version" : "1.0.0"
+ },
+ "nextState" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "VpnSlaPolicyActState"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "albumProblemMap",
+ "version" : "0.0.1"
+ } ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nload(\"nashorn:mozilla_compat.js\");\nimportClass(org.slf4j.LoggerFactory);\n\nvar logger = executor.logger;\nlogger.trace(\"start: \" + executor.subject.id + \" - TSL\");\n\nvar rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation = executor.inFields[\"situation\"];\n\nvar albumProblemMap = executor.getContextAlbum(\"albumProblemMap\");\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nif (ifSituation.get(\"problemID\") == \"NONE\") {\n logger.trace(\"-- situation has no problem, selecting <VpnSlaPolicyDecideNoneTask>\");\n executor.subject.getTaskKey(\"VpnSlaPolicyDecideNoneTask\").copyTo(executor.selectedTask);\n var returnValue = new returnValueType(true);\n} else if (albumProblemMap.get(ifSituation.get(\"problemID\")).get(\"status\") == \"SOLVED\") {\n logger.trace(\"-- situation is solved, selecting <VpnSlaPolicyDecideSolvedTask>\");\n executor.subject.getTaskKey(\"VpnSlaPolicyDecideSolvedTask\").copyTo(executor.selectedTask);\n var returnValue = new returnValueType(true);\n} else if (ifSituation.get(\"violatedSLAs\") != null && ifSituation.get(\"violatedSLAs\").size() > 0) {\n logger.trace(\"-- situation is problem with violations, selecting <VpnSlaPolicyDecidePriorityTask>\");\n executor.subject.getTaskKey(\"VpnSlaPolicyDecidePriorityTask\").copyTo(executor.selectedTask);\n var returnValue = new returnValueType(true);\n} else if (ifSituation.get(\"violatedSLAs\") != null && ifSituation.get(\"violatedSLAs\").size() == 0) {\n logger.trace(\"-- situation is problem without violations, selecting <VpnSlaPolicyDecideSlaTask>\");\n executor.subject.getTaskKey(\"VpnSlaPolicyDecideSlaTask\").copyTo(executor.selectedTask);\n var returnValue = new returnValueType(true);\n} else {\n logger.error(\"-- detected unknown decision for situation <\" + ifSituation.get(\"problemID\") + \">\");\n rootLogger.error(executor.subject.id + \" \" + \"-- detected unknown decision for situation <\"\n + ifSituation.get(\"problemID\") + \">\");\n var returnValue = new returnValueType(false);\n}\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-tsl\");"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "VpnSlaPolicyDecideSlaTask",
+ "version" : "1.0.0"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideSlaTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyDecideState",
+ "localName" : "decideSla"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyDecideState",
+ "localName" : "VpnSlaPolicyDecide_Output_Direct"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyDecidePriorityTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyDecideState",
+ "localName" : "decidePriority"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyDecideState",
+ "localName" : "VpnSlaPolicyDecide_Output_Direct"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideSolvedTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyDecideState",
+ "localName" : "decideNone"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyDecideState",
+ "localName" : "VpnSlaPolicyDecide_Output_Direct"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideNoneTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyDecideState",
+ "localName" : "decideNone"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyDecideState",
+ "localName" : "VpnSlaPolicyDecide_Output_Direct"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "VpnSlaPolicyMatchState",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "VpnSlaPolicyMatchState"
+ },
+ "trigger" : {
+ "name" : "VpnSlaTrigger",
+ "version" : "1.0.0"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "VpnSlaPolicyMatch_Output_Direct",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyMatchState",
+ "localName" : "VpnSlaPolicyMatch_Output_Direct"
+ },
+ "outgoingEvent" : {
+ "name" : "VpnSlaMatchOut",
+ "version" : "1.0.0"
+ },
+ "nextState" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "VpmSlaPolicyEstablishState"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "VpnSlaPolicyMatchTask",
+ "version" : "1.0.0"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "VpnSlaPolicyMatchTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyMatchState",
+ "localName" : "match"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpnSlaPolicyMatchState",
+ "localName" : "VpnSlaPolicyMatch_Output_Direct"
+ }
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : "VpmSlaPolicyEstablishState",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "VpmSlaPolicyEstablishState"
+ },
+ "trigger" : {
+ "name" : "VpnSlaMatchOut",
+ "version" : "1.0.0"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "VpnSlaPolicyEstablish_Output_Direct",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpmSlaPolicyEstablishState",
+ "localName" : "VpnSlaPolicyEstablish_Output_Direct"
+ },
+ "outgoingEvent" : {
+ "name" : "VpnSlaEstablishOut",
+ "version" : "1.0.0"
+ },
+ "nextState" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "VpnSlaPolicyDecideState"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "NULL",
+ "logicFlavour" : "UNDEFINED",
+ "logic" : ""
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "VpnSlaPolicyEstablishTask",
+ "version" : "1.0.0"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "VpnSlaPolicyEstablishTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpmSlaPolicyEstablishState",
+ "localName" : "establish"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "VpnSlaPolicy",
+ "parentKeyVersion" : "1.0.0",
+ "parentLocalName" : "VpmSlaPolicyEstablishState",
+ "localName" : "VpnSlaPolicyEstablish_Output_Direct"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "VpnSlaPolicyMatchState"
+ }
+ } ]
+ }
+ },
+ "tasks" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_Tasks",
+ "version" : "1.0.0"
+ },
+ "taskMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "CustomerContextTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "CustomerContextTask",
+ "version" : "1.0.0"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "links",
+ "value" : {
+ "key" : "links",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerLinksDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "priority",
+ "value" : {
+ "key" : "priority",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerPriorityDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "satisfaction",
+ "value" : {
+ "key" : "satisfaction",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerSatisfactionDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "customerName",
+ "value" : {
+ "key" : "customerName",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "dtYTD",
+ "value" : {
+ "key" : "dtYTD",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerDowntimeYTDDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "dtSLA",
+ "value" : {
+ "key" : "dtSLA",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerDowntimeSLADecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "report",
+ "value" : {
+ "key" : "report",
+ "fieldSchemaKey" : {
+ "name" : "reportDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "albumCustomerMap",
+ "version" : "0.0.1"
+ }, {
+ "name" : "albumTopoEdges",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nload(\"nashorn:mozilla_compat.js\");\n\nvar logger = executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifCustomerName = executor.inFields[\"customerName\"];\nvar ifLinks = executor.inFields[\"links\"];\n\nlogger.trace(\"-- got infields, testing existing customer\");\nvar ctxtCustomer = executor.getContextAlbum(\"albumCustomerMap\").get(ifCustomerName);\nif (ctxtCustomer != null) {\n executor.getContextAlbum(\"albumCustomerMap\").remove(ifCustomerName);\n logger.trace(\"-- removed customer: <\" + ifCustomerName + \">\");\n}\n\nlogger.trace(\"-- creating customer: <\" + ifCustomerName + \">\");\nvar links = new Array();\nfor (var i = 0; i < ifLinks.split(\" \").length; i++) {\n var link = executor.getContextAlbum(\"albumTopoEdges\").get(ifLinks.split(\" \")[i]);\n if (link != null) {\n logger.trace(\"-- link: <\" + ifLinks.split(\" \")[i] + \">\");\n links.push(ifLinks.split(\" \")[i]);\n } else {\n logger.trace(\"-- unknown link: <\" + ifLinks.split(\" \")[i] + \"> for customer <\" + ifCustomerName + \">\");\n }\n}\nlogger.trace(\"-- links: <\" + links + \">\");\nctxtCustomer = \"{customerName:\" + ifCustomerName + \", dtSLA:\" + executor.inFields[\"dtSLA\"] + \", dtYTD:\"\n + executor.inFields[\"dtYTD\"] + \", priority:\" + executor.inFields[\"priority\"] + \", satisfaction:\"\n + executor.inFields[\"satisfaction\"] + \", links:[\" + links + \"]}\";\n\nexecutor.getContextAlbum(\"albumCustomerMap\").put(ifCustomerName, ctxtCustomer);\n\nif (logger.isTraceEnabled()) {\n logger.trace(\" >> *** Customers ***\");\n if (executor.getContextAlbum(\"albumCustomerMap\") != null) {\n for (var i = 0; i < executor.getContextAlbum(\"albumCustomerMap\").values().size(); i++) {\n logger.trace(\" >> >> \" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"customerName\")\n + \" : \" + \"dtSLA=\" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"dtSLA\")\n + \" : \" + \"dtYTD=\" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"dtYTD\")\n + \" : \" + \"links=\" + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"links\")\n + \" : \" + \"priority=\"\n + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"priority\") + \" : \"\n + \"satisfaction=\"\n + executor.getContextAlbum(\"albumCustomerMap\").values().get(i).get(\"satisfaction\"));\n }\n } else {\n logger.trace(\" >> >> customer album is null\");\n }\n}\n\nexecutor.outFields[\"report\"] = \"customer ctxt :: added customer: \" + ifCustomerName;\n\nlogger.info(\"vpnsla: ctxt added customer \" + ifCustomerName);\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".\");"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "EdgeContextTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "EdgeContextTask",
+ "version" : "1.0.0"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "edgeName",
+ "value" : {
+ "key" : "edgeName",
+ "fieldSchemaKey" : {
+ "name" : "ctxtEdgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "start",
+ "value" : {
+ "key" : "start",
+ "fieldSchemaKey" : {
+ "name" : "ctxtEdgeStartDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "end",
+ "value" : {
+ "key" : "end",
+ "fieldSchemaKey" : {
+ "name" : "ctxtEdgeEndDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "status",
+ "value" : {
+ "key" : "status",
+ "fieldSchemaKey" : {
+ "name" : "ctxtEdgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "report",
+ "value" : {
+ "key" : "report",
+ "fieldSchemaKey" : {
+ "name" : "reportDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "albumTopoEdges",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nload(\"nashorn:mozilla_compat.js\");\n\nvar logger = executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifEdgeName = executor.inFields[\"edgeName\"];\nvar ifEdgeStatus = executor.inFields[\"status\"];\n\nvar albumTopoEdges = executor.getContextAlbum(\"albumTopoEdges\");\n\nlogger.trace(\"-- got infields, testing existing edge\");\n\nvar ctxtEdge = albumTopoEdges.get(ifEdgeName);\nif (ctxtEdge != null) {\n albumTopoEdges.remove(ifEdgeName);\n logger.trace(\"-- removed edge: <\" + ifEdgeName + \">\");\n}\n\nlogger.trace(\"-- creating edge: <\" + ifEdgeName + \">\");\nctxtEdge = \"{name:\" + ifEdgeName + \", start:\" + executor.inFields[\"start\"] + \", end:\" + executor.inFields[\"end\"]\n + \", active:\" + ifEdgeStatus + \"}\";\nalbumTopoEdges.put(ifEdgeName, ctxtEdge);\n\nif (logger.isTraceEnabled()) {\n logger.trace(\" >> *** Edges ***\");\n if (albumTopoEdges != null) {\n for (var i = 0; i < albumTopoEdges.values().size(); i++) {\n logger.trace(\" >> >> \" + albumTopoEdges.values().get(i).get(\"name\") + \" \\t \"\n + albumTopoEdges.values().get(i).get(\"start\") + \" --> \" + albumTopoEdges.values().get(i).get(\"end\")\n + \" \\t \" + albumTopoEdges.values().get(i).get(\"active\"));\n }\n } else {\n logger.trace(\" >> >> edge album is null\");\n }\n}\n\nexecutor.outFields[\"report\"] = \"edge ctxt :: added edge \" + ifEdgeName;\n\nlogger.info(\"vpnsla: ctxt added edge \" + ifEdgeName);\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".\");"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "NodeContextTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "NodeContextTask",
+ "version" : "1.0.0"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "mininetName",
+ "value" : {
+ "key" : "mininetName",
+ "fieldSchemaKey" : {
+ "name" : "ctxtNodeMininetNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "nodeName",
+ "value" : {
+ "key" : "nodeName",
+ "fieldSchemaKey" : {
+ "name" : "ctxtNodeNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "report",
+ "value" : {
+ "key" : "report",
+ "fieldSchemaKey" : {
+ "name" : "reportDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "albumTopoNodes",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nload(\"nashorn:mozilla_compat.js\");\n\nvar logger = executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifNodeName = executor.inFields[\"nodeName\"];\nvar ifMininetName = executor.inFields[\"mininetName\"];\n\nvar albumTopoNodes = executor.getContextAlbum(\"albumTopoNodes\");\n\nlogger.trace(\"-- got infields, testing existing node\");\n\nvar ctxtNode = albumTopoNodes.get(ifNodeName);\nif (ctxtNode != null) {\n albumTopoNodes.remove(ifNodeName);\n logger.trace(\"-- removed node: <\" + ifNodeName + \">\");\n}\n\nlogger.trace(\"-- creating node: <\" + ifNodeName + \">\");\nctxtNode = \"{name:\" + ifNodeName + \", mnname:\" + ifMininetName + \"}\";\nalbumTopoNodes.put(ifNodeName, ctxtNode);\n\nif (logger.isTraceEnabled()) {\n logger.trace(\" >> *** Nodes ***\");\n if (albumTopoNodes != null) {\n for (var i = 0; i < albumTopoNodes.values().size(); i++) {\n logger.trace(\" >> >> \" + albumTopoNodes.values().get(i).get(\"name\") + \" : \"\n + albumTopoNodes.values().get(i).get(\"mnname\"));\n }\n } else {\n logger.trace(\" >> >> node album is null\");\n }\n}\n\nexecutor.outFields[\"report\"] = \"node ctxt :: added node \" + ifNodeName;\n\nlogger.info(\"vpnsla: ctxt added node \" + ifNodeName);\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".\");"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyActTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyActTask",
+ "version" : "1.0.0"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "decision",
+ "value" : {
+ "key" : "decision",
+ "fieldSchemaKey" : {
+ "name" : "decideDecisionDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "edgeName",
+ "value" : {
+ "key" : "edgeName",
+ "fieldSchemaKey" : {
+ "name" : "edgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "action",
+ "value" : {
+ "key" : "action",
+ "fieldSchemaKey" : {
+ "name" : "actionDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "albumCustomerMap",
+ "version" : "0.0.1"
+ }, {
+ "name" : "albumProblemMap",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nload(\"nashorn:mozilla_compat.js\");\n\nvar logger = executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar ifDecision = executor.inFields[\"decision\"];\nvar ifMatchStart = executor.inFields[\"matchStart\"];\n\nvar albumCustomerMap = executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap = executor.getContextAlbum(\"albumProblemMap\");\n\nswitch (ifDecision.get(\"decision\").toString()) {\ncase \"NONE\":\n executor.outFields[\"edgeName\"] = \"\";\n executor.outFields[\"action\"] = \"\";\n break;\ncase \"IMPEDE\":\n for (var i = 0; i < ifDecision.get(\"customers\").size(); i++) {\n customer = albumCustomerMap.get(ifDecision.get(\"customers\").get(i).toString());\n executor.outFields[\"edgeName\"] = customer.get(\"links\").get(0);\n executor.outFields[\"action\"] = \"firewall\";\n }\n break;\ncase \"REBUILD\":\n // finally solved, remove problem\n albumProblemMap.remove(ifDecision.get(\"problemID\"));\n executor.outFields[\"edgeName\"] = \"L10\"; // this is ###static###\n executor.outFields[\"action\"] = \"rebuild\"; // this is ###static###\n break;\ndefault:\n\n}\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);\n\nif (executor.outFields[\"action\"] != \"\") {\n logger.info(\"vpnsla: action is to \" + executor.outFields[\"action\"] + \" \" + executor.outFields[\"edgeName\"]);\n} else {\n logger.info(\"vpnsla: no action required\");\n}\n\nlogger.trace(\"-- outfields: \" + executor.outFields);\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".a\");\n\nvar now = new Date().getTime();\nlogger.info(\"VPN SLA finished in \" + (now - ifMatchStart) + \" ms\");"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideNoneTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideNoneTask",
+ "version" : "1.0.0"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "situation",
+ "value" : {
+ "key" : "situation",
+ "fieldSchemaKey" : {
+ "name" : "establishSituationDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "decision",
+ "value" : {
+ "key" : "decision",
+ "fieldSchemaKey" : {
+ "name" : "decideDecisionDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nload(\"nashorn:mozilla_compat.js\");\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger = executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation = executor.inFields[\"situation\"];\n\n// create outfiled for decision\nvar decision = executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"None, everything is ok\");\ndecision.put(\"decision\", \"NONE\");\ndecision.put(\"customers\", new ArrayList());\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nif (ifSituation.get(\"problemID\") == \"NONE\") {\n logger.trace(\"-- no problem, everything ok\");\n var returnValue = new returnValueType(true);\n} else {\n logger.trace(\"-- wrong problemID <\" + problemID + \"> for NONE task, we should not be here\");\n rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID <\" + problemID\n + \"> for NONE task, we should not be here\");\n var returnValue = new returnValueType(false);\n}\n\nexecutor.outFields[\"decision\"] = decision;\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-non\");"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyDecidePriorityTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyDecidePriorityTask",
+ "version" : "1.0.0"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "situation",
+ "value" : {
+ "key" : "situation",
+ "fieldSchemaKey" : {
+ "name" : "establishSituationDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "decision",
+ "value" : {
+ "key" : "decision",
+ "fieldSchemaKey" : {
+ "name" : "decideDecisionDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "albumCustomerMap",
+ "version" : "0.0.1"
+ }, {
+ "name" : "albumProblemMap",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nload(\"nashorn:mozilla_compat.js\");\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger = executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation = executor.inFields[\"situation\"];\n\nvar albumCustomerMap = executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap = executor.getContextAlbum(\"albumProblemMap\");\n\n// create outfiled for decision\nvar decision = executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"None, everything is ok\");\ndecision.put(\"decision\", \"IMPEDE\");\ndecision.put(\"problemID\", ifSituation.get(\"problemID\"));\ndecision.put(\"customers\", new ArrayList());\n\nvar problem = albumProblemMap.get(ifSituation.get(\"problemID\"));\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nif (problem != null && ifSituation.get(\"violatedSLAs\").size() > 0) {\n logger.trace(\"-- impede by priority\");\n for (var i = 0; i < problem.get(\"edgeUsedBy\").size(); i++) {\n customerCtxt = albumCustomerMap.get(problem.get(\"edgeUsedBy\").get(i).toString());\n if (customerCtxt.get(\"priority\") == false) {\n decision.get(\"customers\").add(customerCtxt.get(\"customerName\"));\n }\n }\n var returnValue = new returnValueType(true);\n} else {\n logger.trace(\"-- wrong problemID <\" + ifSituation.get(\"problemID\") + \"> for PRIORITY task, we should not be here\");\n rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID <\" + ifSituation.get(\"problemID\")\n + \"> for PRIORITY task, we should not be here\");\n var returnValue = new returnValueType(false);\n}\n\n// set impededLast to decision[customers]\nproblem.get(\"impededLast\").clear();\nproblem.get(\"impededLast\").addAll(decision.get(\"customers\"));\n\nexecutor.outFields[\"decision\"] = decision;\nlogger.trace(\"-- decision: \" + decision);\n\nlogger.info(\"vpnsla: priority, impeding customers \" + decision.get(\"customers\"));\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-pri\");"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideSlaTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideSlaTask",
+ "version" : "1.0.0"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "situation",
+ "value" : {
+ "key" : "situation",
+ "fieldSchemaKey" : {
+ "name" : "establishSituationDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "decision",
+ "value" : {
+ "key" : "decision",
+ "fieldSchemaKey" : {
+ "name" : "decideDecisionDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "albumCustomerMap",
+ "version" : "0.0.1"
+ }, {
+ "name" : "albumProblemMap",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nload(\"nashorn:mozilla_compat.js\");\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger = executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation = executor.inFields[\"situation\"];\n\nvar albumCustomerMap = executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap = executor.getContextAlbum(\"albumProblemMap\");\n\n// create outfiled for decision\nvar decision = executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"Impede given customers selected based on maximum SLA delta\");\ndecision.put(\"decision\", \"IMPEDE\");\ndecision.put(\"problemID\", ifSituation.get(\"problemID\"));\ndecision.put(\"customers\", new ArrayList());\n\nvar problem = albumProblemMap.get(ifSituation.get(\"problemID\"));\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nif (problem != null && ifSituation.get(\"violatedSLAs\").size() == 0) {\n logger.trace(\"-- impede by maximum SLA\");\n var customer = \"\";\n var customerSla = 0;\n for (var i = 0; i < problem.get(\"edgeUsedBy\").size(); i++) {\n customerCtxt = albumCustomerMap.get(problem.get(\"edgeUsedBy\").get(i).toString());\n if (customerSla == 0) {\n customerSla = customerCtxt.get(\"dtSLA\") - customerCtxt.get(\"dtYTD\");\n }\n if ((customerCtxt.get(\"dtSLA\") - customerCtxt.get(\"dtYTD\")) >= customerSla) {\n customer = customerCtxt.get(\"customerName\");\n customerSla = (customerCtxt.get(\"dtSLA\") - customerCtxt.get(\"dtYTD\"));\n }\n }\n decision.get(\"customers\").add(customer);\n var returnValue = new returnValueType(true);\n} else {\n logger.trace(\"-- wrong problemID <\" + ifSituation.get(\"problemID\") + \"> for SLA task, we should not be here\");\n rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID <\" + ifSituation.get(\"problemID\")\n + \"> for SLA task, we should not be here\");\n var returnValue = new returnValueType(false);\n}\n\n// set impededLast to decision[customers]\nproblem.get(\"impededLast\").clear();\nproblem.get(\"impededLast\").addAll(decision.get(\"customers\"));\n\nexecutor.outFields[\"decision\"] = decision;\nlogger.trace(\"-- decision: \" + decision);\n\nlogger.info(\"vpnsla: sla balance, impeding customers \" + decision.get(\"customers\"));\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-sla\");"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideSolvedTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyDecideSolvedTask",
+ "version" : "1.0.0"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "situation",
+ "value" : {
+ "key" : "situation",
+ "fieldSchemaKey" : {
+ "name" : "establishSituationDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "decision",
+ "value" : {
+ "key" : "decision",
+ "fieldSchemaKey" : {
+ "name" : "decideDecisionDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "albumProblemMap",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nload(\"nashorn:mozilla_compat.js\");\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger = executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifSituation = executor.inFields[\"situation\"];\n\nvar albumProblemMap = executor.getContextAlbum(\"albumProblemMap\");\n\n// create outfiled for decision\nvar decision = executor.subject.getOutFieldSchemaHelper(\"decision\").createNewInstance();\ndecision.put(\"description\", \"None, everything is ok\");\ndecision.put(\"decision\", \"REBUILD\");\ndecision.put(\"customers\", new ArrayList());\ndecision.put(\"problemID\", ifSituation.get(\"problemID\"));\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nif (albumProblemMap.get(ifSituation.get(\"problemID\")).get(\"status\") == \"SOLVED\") {\n logger.trace(\"-- problem solved\");\n var returnValue = new returnValueType(true);\n} else {\n logger.trace(\"-- wrong problemID <\" + problemID + \"> for SOLVED task, we should not be here\");\n rootLogger.error(executor.subject.id + \" \" + \"-- wrong problemID <\" + problemID\n + \"> for SOLVED task, we should not be here\");\n var returnValue = new returnValueType(false);\n}\n\nexecutor.outFields[\"decision\"] = decision;\n\nlogger.info(\"vpnsla: sla solved, problem solved\");\n\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".d-non\");"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyEstablishTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyEstablishTask",
+ "version" : "1.0.0"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "edgeName",
+ "value" : {
+ "key" : "edgeName",
+ "fieldSchemaKey" : {
+ "name" : "edgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "hasChanged",
+ "value" : {
+ "key" : "hasChanged",
+ "fieldSchemaKey" : {
+ "name" : "edgeChangedDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "status",
+ "value" : {
+ "key" : "status",
+ "fieldSchemaKey" : {
+ "name" : "edgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "situation",
+ "value" : {
+ "key" : "situation",
+ "fieldSchemaKey" : {
+ "name" : "establishSituationDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "albumCustomerMap",
+ "version" : "0.0.1"
+ }, {
+ "name" : "albumProblemMap",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nload(\"nashorn:mozilla_compat.js\");\nimportClass(org.slf4j.LoggerFactory);\n\nimportClass(java.util.ArrayList);\n\nimportClass(org.apache.avro.generic.GenericData.Array);\nimportClass(org.apache.avro.generic.GenericRecord);\nimportClass(org.apache.avro.Schema);\n\nvar logger = executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifEdgeName = executor.inFields[\"edgeName\"];\nvar ifEdgeStatus = executor.inFields[\"status\"].toString();\nvar ifhasChanged = executor.inFields[\"hasChanged\"];\nvar ifMatchStart = executor.inFields[\"matchStart\"];\n\nvar albumCustomerMap = executor.getContextAlbum(\"albumCustomerMap\");\nvar albumProblemMap = executor.getContextAlbum(\"albumProblemMap\");\n\nvar linkProblem = albumProblemMap.get(ifEdgeName);\n\n// create outfiled for situation\nvar situation = executor.subject.getOutFieldSchemaHelper(\"situation\").createNewInstance();\nsituation.put(\"violatedSLAs\", new ArrayList());\n\n// create a string as states+hasChanged+linkProblem and switch over it\nvar switchTest = ifEdgeStatus + \":\" + ifhasChanged + \":\" + (linkProblem == null ? \"no\" : \"yes\");\nswitch (switchTest) {\ncase \"UP:false:no\":\n logger.trace(\"-- edge <\" + ifEdgeName + \"> UP:false:no => everything ok\");\n logger.info(\"vpnsla: everything ok\");\n situation.put(\"problemID\", \"NONE\");\n break;\ncase \"UP:false:yes\":\n logger.trace(\"-- edge <\" + ifEdgeName + \"> UP:false:yes ==> did we miss earlier up?, removing problem\");\n albumProblemMap.remove(ifEdgeName);\n linkProblem = null;\n situation.put(\"problemID\", \"NONE\");\n break;\ncase \"UP:true:no\":\n logger.trace(\"-- edge <\" + ifEdgeName + \"> UP:true:no ==> did we miss the earlier down?, creating new problem\");\n situation.put(\"problemID\", ifEdgeName);\n break;\ncase \"UP:true:yes\":\n logger.trace(\"-- edge <\" + ifEdgeName + \"> UP:true:yes ==> detected solution, link up again\");\n logger.info(\"vpnsla: problem solved\");\n linkProblem.put(\"endTime\", ifMatchStart);\n linkProblem.put(\"status\", \"SOLVED\");\n situation.put(\"problemID\", \"NONE\");\n break;\ncase \"DOWN:false:no\":\n logger.trace(\"-- edge <\" + ifEdgeName + \"> DOWN:false:no ==> did we miss an earlier down?, creating new problem\");\n situation.put(\"problemID\", ifEdgeName);\n break;\ncase \"DOWN:false:yes\":\n logger.trace(\"-- edge <\" + ifEdgeName + \"> DOWN:false:yes ==> problem STILL exists\");\n logger.info(\"vpnsla: problem still exists\");\n linkProblem.put(\"status\", \"STILL\");\n situation.put(\"problemID\", ifEdgeName);\n break;\ncase \"DOWN:true:no\":\n logger.trace(\"-- edge <\" + ifEdgeName + \"> DOWN:true:no ==> found NEW problem\");\n logger.info(\"vpnsla: this is a new problem\");\n situation.put(\"problemID\", ifEdgeName);\n break;\ncase \"DOWN:true:yes\":\n logger.trace(\"-- edge <\" + ifEdgeName\n + \"> DOWN:true:yes ==> did we miss to remove an earlier problem?, remove and create new problem\");\n linkProblem = null;\n situation.put(\"problemID\", ifEdgeName);\n break;\n\ndefault:\n logger.error(\"-- input wrong for edge\" + ifEdgeName + \": edge status <\" + ifEdgeStatus\n + \"> unknown or null on hasChanged <\" + ifhasChanged + \">\");\n rootLogger.error(\"-- input wrong for edge\" + ifEdgeName + \": edge status <\" + ifEdgeStatus\n + \"> unknown or null on hasChanged <\" + ifhasChanged + \">\");\n}\n\n// create new problem if situation requires it\nif (situation.get(\"problemID\").equals(ifEdgeName) && linkProblem == null) {\n logger.trace(\"-- edge <\" + ifEdgeName + \"> creating new problem\");\n linkProblem = albumProblemMap.getSchemaHelper().createNewInstance();\n linkProblem.put(\"edge\", ifEdgeName);\n linkProblem.put(\"startTime\", ifMatchStart);\n linkProblem.put(\"lastUpdate\", ifMatchStart);\n linkProblem.put(\"endTime\", 0);\n linkProblem.put(\"status\", \"NEW\");\n linkProblem.put(\"edgeUsedBy\", new ArrayList());\n linkProblem.put(\"impededLast\", new ArrayList());\n\n for (var i = 0; i < albumCustomerMap.values().size(); i++) {\n var customer = albumCustomerMap.values().get(i);\n var customerLinks = albumCustomerMap.values().get(i).get(\"links\");\n for (var k = 0; k < customerLinks.size(); k++) {\n if (customerLinks.get(k) == ifEdgeName) {\n linkProblem.get(\"edgeUsedBy\").add(customer.get(\"customerName\"));\n }\n }\n }\n albumProblemMap.put(ifEdgeName, linkProblem);\n logger.trace(\"-- edge <\" + ifEdgeName + \"> problem created as <\" + linkProblem + \">\");\n}\n\n// set dtYTD if situation requires it\nif (linkProblem != null && (linkProblem.get(\"status\") == \"STILL\" || linkProblem.get(\"status\") == \"SOLVED\")) {\n var linkDownTimeinSecs = (ifMatchStart - linkProblem.get(\"lastUpdate\")) / 1000;\n logger.trace(\"-- edge <\" + ifEdgeName + \"> down time: \" + linkDownTimeinSecs + \" s\");\n for (var k = 0; k < linkProblem.get(\"impededLast\").size(); k++) {\n for (var i = 0; i < albumCustomerMap.values().size(); i++) {\n var customer = albumCustomerMap.values().get(i);\n if (customer.get(\"customerName\").equals(linkProblem.get(\"impededLast\").get(k))) {\n logger.info(\"-- vpnsla: customer \" + customer.get(\"customerName\") + \" YDT downtime increased from \"\n + customer.get(\"dtYTD\") + \" to \" + (customer.get(\"dtYTD\") + linkDownTimeinSecs));\n customer.put(\"dtYTD\", (customer.get(\"dtYTD\") + linkDownTimeinSecs))\n }\n }\n }\n // set lastUpdate to this policy execution for next execution calculation\n linkProblem.put(\"lastUpdate\", ifMatchStart);\n}\n\n// check SLA violations if situation requires it\nif (linkProblem != null && linkProblem.get(\"status\") != \"SOLVED\") {\n logger.info(\">e> customer\\tDT SLA\\tDT YTD\\tviolation\");\n for (var i = 0; i < albumCustomerMap.values().size(); i++) {\n var customer = albumCustomerMap.values().get(i);\n if (customer.get(\"dtYTD\") > customer.get(\"dtSLA\")) {\n situation.get(\"violatedSLAs\").add(customer.get(\"customerName\"));\n logger.info(\">e> \" + customer.get(\"customerName\") + \"\\t\\t\" + customer.get(\"dtSLA\") + \"s\\t\"\n + customer.get(\"dtYTD\") + \"s\\t\" + \"!!\");\n } else {\n logger.info(\">e> \" + customer.get(\"customerName\") + \"\\t\\t\" + customer.get(\"dtSLA\") + \"s\\t\"\n + customer.get(\"dtYTD\") + \"s\");\n }\n }\n}\n\nexecutor.outFields[\"situation\"] = situation;\n\nlogger.trace(\"-- out fields <\" + executor.outFields + \">\");\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".e\");"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaPolicyMatchTask",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaPolicyMatchTask",
+ "version" : "1.0.0"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "edgeName",
+ "value" : {
+ "key" : "edgeName",
+ "fieldSchemaKey" : {
+ "name" : "edgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "status",
+ "value" : {
+ "key" : "status",
+ "fieldSchemaKey" : {
+ "name" : "edgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "edgeName",
+ "value" : {
+ "key" : "edgeName",
+ "fieldSchemaKey" : {
+ "name" : "edgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "hasChanged",
+ "value" : {
+ "key" : "hasChanged",
+ "fieldSchemaKey" : {
+ "name" : "edgeChangedDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "status",
+ "value" : {
+ "key" : "status",
+ "fieldSchemaKey" : {
+ "name" : "edgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ {
+ "name" : "albumTopoEdges",
+ "version" : "0.0.1"
+ } ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nload(\"nashorn:mozilla_compat.js\");\n\nvar now = new Date().getTime();\nexecutor.outFields[\"matchStart\"] = now;\n\nimportClass(org.slf4j.LoggerFactory);\n\nvar logger = executor.logger;\nlogger.trace(\"start: \" + executor.subject.id);\nlogger.trace(\"-- infields: \" + executor.inFields);\n\nvar rootLogger = LoggerFactory.getLogger(logger.ROOT_LOGGER_NAME);\n\nvar ifEdgeName = executor.inFields[\"edgeName\"];\nvar ifLinkStatus = executor.inFields[\"status\"];\n\nvar albumTopoEdges = executor.getContextAlbum(\"albumTopoEdges\");\n\nlogger.trace(\"-- got infields, checking albumTopoEdges changes\");\n\nvar active = false;\nswitch (ifLinkStatus.toString()) {\ncase \"UP\":\n active = true;\n break;\ncase \"DOWN\":\n active = false;\n break;\ndefault:\n active = false;\n logger.error(\"-- trigger sent unknown link status <\" + ifLinkStatus + \"> for link <\" + ifEdgeName + \">\");\n rootLogger.error(executor.subject.id + \" \" + \"-- trigger sent unknown link status <\" + ifLinkStatus\n + \"> for link <\" + ifEdgeName + \">\");\n}\n\nvar link = albumTopoEdges.get(ifEdgeName);\nif (link == null) {\n logger.trace(\"-- link <\" + ifEdgeName + \"> not in albumTopoEdges\");\n} else {\n logger.trace(\"-- found link <\" + link + \"> in albumTopoEdges\");\n logger.trace(\"-- active <\" + active + \"> : link.active <\" + link.get(\"active\") + \">\");\n if (active != link.get(\"active\")) {\n link.put(\"active\", active);\n logger.trace(\"-- link <\" + ifEdgeName + \"> status changed to <active:\" + link.get(\"active\") + \">\");\n executor.outFields[\"hasChanged\"] = true;\n } else {\n logger.trace(\"-- link <\" + ifEdgeName + \"> status not changed <active:\" + link.get(\"active\") + \">\");\n executor.outFields[\"hasChanged\"] = false;\n }\n}\n\nexecutor.outFields[\"edgeName\"] = ifEdgeName;\nexecutor.outFields[\"status\"] = ifLinkStatus;\n\nlogger.info(\"vpnsla: detected \" + ifEdgeName + \" as \" + ifLinkStatus);\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);\nlogger.trace(\"finished: \" + executor.subject.id);\nlogger.debug(\".m\");"
+ }
+ }
+ } ]
+ }
+ },
+ "events" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_Events",
+ "version" : "1.0.0"
+ },
+ "eventMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "CustomerContextEventIn",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "CustomerContextEventIn",
+ "version" : "1.0.0"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source" : "CtxtManagement",
+ "target" : "APEX",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "links",
+ "value" : {
+ "key" : "links",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerLinksDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "priority",
+ "value" : {
+ "key" : "priority",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerPriorityDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "satisfaction",
+ "value" : {
+ "key" : "satisfaction",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerSatisfactionDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "customerName",
+ "value" : {
+ "key" : "customerName",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "dtYTD",
+ "value" : {
+ "key" : "dtYTD",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerDowntimeYTDDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "dtSLA",
+ "value" : {
+ "key" : "dtSLA",
+ "fieldSchemaKey" : {
+ "name" : "ctxtCustomerDowntimeSLADecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "EdgeContextEventIn",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "EdgeContextEventIn",
+ "version" : "1.0.0"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source" : "CtxtManagement",
+ "target" : "APEX",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "edgeName",
+ "value" : {
+ "key" : "edgeName",
+ "fieldSchemaKey" : {
+ "name" : "ctxtEdgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "start",
+ "value" : {
+ "key" : "start",
+ "fieldSchemaKey" : {
+ "name" : "ctxtEdgeStartDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "end",
+ "value" : {
+ "key" : "end",
+ "fieldSchemaKey" : {
+ "name" : "ctxtEdgeEndDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "status",
+ "value" : {
+ "key" : "status",
+ "fieldSchemaKey" : {
+ "name" : "ctxtEdgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "NodeContextEventIn",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "NodeContextEventIn",
+ "version" : "1.0.0"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source" : "CtxtManagement",
+ "target" : "APEX",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "mininetName",
+ "value" : {
+ "key" : "mininetName",
+ "fieldSchemaKey" : {
+ "name" : "ctxtNodeMininetNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "nodeName",
+ "value" : {
+ "key" : "nodeName",
+ "fieldSchemaKey" : {
+ "name" : "ctxtNodeNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "ReportOut",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ReportOut",
+ "version" : "1.0.0"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source" : "APEX",
+ "target" : "CtxtManagement",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "report",
+ "value" : {
+ "key" : "report",
+ "fieldSchemaKey" : {
+ "name" : "reportDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaActOut",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaActOut",
+ "version" : "1.0.0"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source" : "SlaAct",
+ "target" : "ActioningSystem",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "edgeName",
+ "value" : {
+ "key" : "edgeName",
+ "fieldSchemaKey" : {
+ "name" : "edgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "action",
+ "value" : {
+ "key" : "action",
+ "fieldSchemaKey" : {
+ "name" : "actionDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaDecideOut",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaDecideOut",
+ "version" : "1.0.0"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source" : "SlaDecide",
+ "target" : "SlaAct",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "decision",
+ "value" : {
+ "key" : "decision",
+ "fieldSchemaKey" : {
+ "name" : "decideDecisionDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaEstablishOut",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaEstablishOut",
+ "version" : "1.0.0"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source" : "SlaEstablish",
+ "target" : "SlaDecide",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "situation",
+ "value" : {
+ "key" : "situation",
+ "fieldSchemaKey" : {
+ "name" : "establishSituationDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaMatchOut",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaMatchOut",
+ "version" : "1.0.0"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source" : "VpnSlaMatch",
+ "target" : "VpnSlaEstablish",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "edgeName",
+ "value" : {
+ "key" : "edgeName",
+ "fieldSchemaKey" : {
+ "name" : "edgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "hasChanged",
+ "value" : {
+ "key" : "hasChanged",
+ "fieldSchemaKey" : {
+ "name" : "edgeChangedDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "matchStart",
+ "value" : {
+ "key" : "matchStart",
+ "fieldSchemaKey" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "status",
+ "value" : {
+ "key" : "status",
+ "fieldSchemaKey" : {
+ "name" : "edgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "VpnSlaTrigger",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "VpnSlaTrigger",
+ "version" : "1.0.0"
+ },
+ "nameSpace" : "org.onap.policy.apex.examples.pcvs.vpnsla",
+ "source" : "TriggerSys",
+ "target" : "VpnSlaMatch",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "edgeName",
+ "value" : {
+ "key" : "edgeName",
+ "fieldSchemaKey" : {
+ "name" : "edgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "status",
+ "value" : {
+ "key" : "status",
+ "fieldSchemaKey" : {
+ "name" : "edgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ } ]
+ }
+ },
+ "albums" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_Albums",
+ "version" : "1.0.0"
+ },
+ "albums" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "albumCustomerMap",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "albumCustomerMap",
+ "version" : "0.0.1"
+ },
+ "scope" : "global",
+ "isWritable" : true,
+ "itemSchema" : {
+ "name" : "ctxtCustomerMapDecl",
+ "version" : "1.0.0"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "albumProblemMap",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "albumProblemMap",
+ "version" : "0.0.1"
+ },
+ "scope" : "global",
+ "isWritable" : true,
+ "itemSchema" : {
+ "name" : "problemMapDecl",
+ "version" : "1.0.0"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "albumTopoEdges",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "albumTopoEdges",
+ "version" : "0.0.1"
+ },
+ "scope" : "global",
+ "isWritable" : true,
+ "itemSchema" : {
+ "name" : "ctxtTopologyEdgesDecl",
+ "version" : "1.0.0"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "albumTopoNodes",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "albumTopoNodes",
+ "version" : "0.0.1"
+ },
+ "scope" : "global",
+ "isWritable" : true,
+ "itemSchema" : {
+ "name" : "ctxtTopologyNodesDecl",
+ "version" : "1.0.0"
+ }
+ }
+ } ]
+ }
+ },
+ "schemas" : {
+ "key" : {
+ "name" : "PCVS-VpnSla_Schemas",
+ "version" : "1.0.0"
+ },
+ "schemas" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "actionDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "actionDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerDowntimeSLADecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerDowntimeSLADecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Integer"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerDowntimeYTDDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerDowntimeYTDDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Integer"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerLinksDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerLinksDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerMapDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerMapDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Avro",
+ "schemaDefinition" : "{\n \"type\" : \"record\",\n \"name\" : \"Customer\",\n \"fields\" : [\n {\"name\" : \"customerName\", \"type\" : \"string\"},\n {\"name\" : \"dtSLA\" , \"type\" : \"int\"},\n {\"name\" : \"dtYTD\" , \"type\" : \"int\"},\n {\"name\" : \"priority\" , \"type\" : \"boolean\"},\n {\"name\" : \"satisfaction\", \"type\" : \"int\"},\n {\n \"name\": \"links\",\n \"doc\": \"Links used by this customer\",\n \"type\": {\"type\" : \"array\", \"items\" : \"string\"}\n }\n ]\n}"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerNameDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerNameDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerPriorityDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerPriorityDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Boolean"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtCustomerSatisfactionDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtCustomerSatisfactionDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Integer"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtEdgeEndDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtEdgeEndDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtEdgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtEdgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtEdgeStartDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtEdgeStartDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtEdgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtEdgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Boolean"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtNodeMininetNameDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtNodeMininetNameDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtNodeNameDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtNodeNameDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtTopologyEdgesDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtTopologyEdgesDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Avro",
+ "schemaDefinition" : "{\n \"type\" : \"record\",\n \"name\" : \"TopologyEdges\",\n \"fields\" : [\n {\"name\": \"name\", \"type\": \"string\", \"doc\": \"Name of the Edge, typically a link name\"},\n {\"name\": \"start\", \"type\": \"string\", \"doc\": \"Edge endpoint: start - a node name\"},\n {\"name\": \"end\", \"type\": \"string\", \"doc\": \"Edge endpoint: end - a node name\"},\n {\"name\": \"active\", \"type\": \"boolean\", \"doc\": \"Flag for active/inactive edges, inactive means a link is down\"}\n ]\n}"
+ }
+ }, {
+ "key" : {
+ "name" : "ctxtTopologyNodesDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "ctxtTopologyNodesDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Avro",
+ "schemaDefinition" : "{\n \"type\" : \"record\",\n \"name\" : \"TopologyNodes\",\n \"fields\" : [\n {\"name\" : \"name\", \"type\" : \"string\", \"doc\": \"The name of the node\"},\n {\"name\" : \"mnname\", \"type\" : \"string\", \"doc\": \"The name of the node in Mininet\"}\n ]\n}"
+ }
+ }, {
+ "key" : {
+ "name" : "decideDecisionDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "decideDecisionDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Avro",
+ "schemaDefinition" : "{\n \"type\" : \"record\",\n \"name\" : \"Situation\",\n \"fields\" : [\n {\"name\": \"description\", \"type\": \"string\", \"doc\": \"Description of the taken decision\"},\n {\n \"name\": \"decision\",\n \"doc\": \"taken decision\",\n \"type\": {\n \"type\": \"enum\",\n \"name\": \"decisionEnum\",\n \"symbols\" : [\n \"IMPEDE\",\n \"REBUILD\",\n \"NONE\"\n ]\n }\n },\n {\"name\": \"customers\", \"type\": {\"type\" : \"array\", \"items\" : \"string\"}, \"doc\": \"List of customers affected by the decision\"},\n {\"name\": \"problemID\", \"type\": \"string\", \"doc\": \"Identifier of the problem for lookup in problemMap\"}\n ]\n}"
+ }
+ }, {
+ "key" : {
+ "name" : "edgeChangedDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "edgeChangedDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Boolean"
+ }
+ }, {
+ "key" : {
+ "name" : "edgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "edgeNameDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "edgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "edgeStatusDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Avro",
+ "schemaDefinition" : "{\n \"type\": \"enum\",\n \"name\": \"Status\",\n \"symbols\" : [\n \"UP\",\n \"DOWN\"\n ]\n}"
+ }
+ }, {
+ "key" : {
+ "name" : "establishSituationDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "establishSituationDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Avro",
+ "schemaDefinition" : "{\n \"type\" : \"record\",\n \"name\" : \"Situation\",\n \"fields\" : [\n {\"name\": \"problemID\", \"type\": \"string\", \"doc\": \"Identifier of the problem for lookup in problemMap\"},\n {\"name\": \"violatedSLAs\", \"type\": {\"type\" : \"array\", \"items\" : \"string\"}, \"doc\": \"List of customers with SLA violations\"}\n ]\n}"
+ }
+ }, {
+ "key" : {
+ "name" : "problemMapDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "problemMapDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Avro",
+ "schemaDefinition" : "{\n \"type\" : \"record\",\n \"name\" : \"Problem\",\n \"fields\" : [\n {\"name\": \"edge\", \"type\": \"string\"},\n {\"name\": \"startTime\", \"type\": \"long\"},\n {\"name\": \"lastUpdate\", \"type\": \"long\"},\n {\"name\": \"endTime\", \"type\": \"long\"},\n {\n \"name\": \"status\",\n \"doc\": \"problem status\",\n \"type\": {\n \"type\": \"enum\",\n \"name\": \"statusEnum\",\n \"symbols\" : [\n \"NONE\",\n \"STILL\",\n \"SOLVED\",\n \"NEW\"\n ]\n }\n },\n {\n \"name\": \"edgeUsedBy\",\n \"doc\": \"customers using the edge\",\n \"type\": {\"type\" : \"array\", \"items\" : \"string\"}\n },\n {\n \"name\": \"impededLast\",\n \"doc\": \"customers last impeded\",\n \"type\": {\"type\" : \"array\", \"items\" : \"string\"}\n }\n ]\n}"
+ }
+ }, {
+ "key" : {
+ "name" : "reportDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "reportDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "value" : {
+ "key" : {
+ "name" : "timestampDecl",
+ "version" : "1.0.0"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ } ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tools/model-generator/src/test/resources/models/JMSSamplePolicyModel.json b/tools/model-generator/src/test/resources/models/JMSSamplePolicyModel.json
new file mode 100644
index 000000000..d85630456
--- /dev/null
+++ b/tools/model-generator/src/test/resources/models/JMSSamplePolicyModel.json
@@ -0,0 +1,456 @@
+{
+ "apexPolicyModel": {
+ "key": {
+ "name": "JMSTestModel",
+ "version": "0.0.1"
+ },
+ "keyInformation": {
+ "key": {
+ "name": "JMSTestModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "keyInfoMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "JMSCopyInOutTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "JMSCopyInOutTask",
+ "version": "0.0.1"
+ },
+ "UUID": "b59815ef-fc5b-4e44-9f6e-2f6212bb7296",
+ "description": "Generated description for a concept called \"JMSCopyInOutTask\" with version \"null\" and UUID \"b59815ef-fc5b-4e44-9f6e-2f6212bb7296\""
+ }
+ },
+ {
+ "key": {
+ "name": "JMSTestModel",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "JMSTestModel",
+ "version": "0.0.1"
+ },
+ "UUID": "a731a845-f984-46a9-adf4-c6c7ca0baa0d",
+ "description": "Generated description for a concept called \"JMSTestModel\" with version \"null\" and UUID \"a731a845-f984-46a9-adf4-c6c7ca0baa0d\""
+ }
+ },
+ {
+ "key": {
+ "name": "JMSTestModel_Albums",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "JMSTestModel_Albums",
+ "version": "0.0.1"
+ },
+ "UUID": "b580c2e2-067e-452c-8410-d69344fa718c",
+ "description": "Generated description for concept referred to by key \"JMSTestModel_Albums:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "JMSTestModel_Events",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "JMSTestModel_Events",
+ "version": "0.0.1"
+ },
+ "UUID": "463f3fa6-2be3-4ded-a015-1f045ee8991e",
+ "description": "Generated description for concept referred to by key \"JMSTestModel_Events:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "JMSTestModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "JMSTestModel_KeyInfo",
+ "version": "0.0.1"
+ },
+ "UUID": "b14d97fb-f215-4b70-9cd6-cbfb3ed085ee",
+ "description": "Generated description for concept referred to by key \"JMSTestModel_KeyInfo:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "JMSTestModel_Policies",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "JMSTestModel_Policies",
+ "version": "0.0.1"
+ },
+ "UUID": "9ae9047f-e0d8-42c4-b3a6-e32954ace3b6",
+ "description": "Generated description for concept referred to by key \"JMSTestModel_Policies:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "JMSTestModel_Schemas",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "JMSTestModel_Schemas",
+ "version": "0.0.1"
+ },
+ "UUID": "adc30c29-d4b9-4408-9213-6d86b051d59c",
+ "description": "Generated description for concept referred to by key \"JMSTestModel_Schemas:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "JMSTestModel_Tasks",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "JMSTestModel_Tasks",
+ "version": "0.0.1"
+ },
+ "UUID": "c3545f15-710c-4339-9a4e-e0eacffac52e",
+ "description": "Generated description for concept referred to by key \"JMSTestModel_Tasks:0.0.1\""
+ }
+ },
+ {
+ "key": {
+ "name": "JMSTestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "JMSTestPolicy",
+ "version": "0.0.1"
+ },
+ "UUID": "fdda6a40-6767-45b0-8703-3b5b3bafaf19",
+ "description": "Generated description for a concept called \"JMSTestPolicy\" with version \"null\" and UUID \"fdda6a40-6767-45b0-8703-3b5b3bafaf19\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestPingIncomingEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestPingIncomingEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "6cdd11f3-5fe8-4510-81b9-af3be303ebae",
+ "description": "Generated description for a concept called \"TestPingIncomingEvent\" with version \"null\" and UUID \"6cdd11f3-5fe8-4510-81b9-af3be303ebae\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestPingOutgoingEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestPingOutgoingEvent",
+ "version": "0.0.1"
+ },
+ "UUID": "dc04de01-2284-4461-9fe2-da58a2122a73",
+ "description": "Generated description for a concept called \"TestPingOutgoingEvent\" with version \"0.0.1\" and UUID \"dc04de01-2284-4461-9fe2-da58a2122a73\""
+ }
+ },
+ {
+ "key": {
+ "name": "TestPingType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestPingType",
+ "version": "0.0.1"
+ },
+ "UUID": "bdc2f70a-de52-4127-8012-b9593657da3c",
+ "description": "Generated description for a concept called \"TestPingType\" with version \"null\" and UUID \"bdc2f70a-de52-4127-8012-b9593657da3c\""
+ }
+ }
+ ]
+ }
+ },
+ "policies": {
+ "key": {
+ "name": "JMSTestModel_Policies",
+ "version": "0.0.1"
+ },
+ "policyMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "JMSTestPolicy",
+ "version": "0.0.1"
+ },
+ "value": {
+ "policyKey": {
+ "name": "JMSTestPolicy",
+ "version": "0.0.1"
+ },
+ "template": "FREEFORM",
+ "state": {
+ "entry": [
+ {
+ "key": "TestJMSState",
+ "value": {
+ "stateKey": {
+ "parentKeyName": "JMSTestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "NULL",
+ "localName": "TestJMSState"
+ },
+ "trigger": {
+ "name": "TestPingIncomingEvent",
+ "version": "0.0.1"
+ },
+ "stateOutputs": {
+ "entry": [
+ {
+ "key": "InOutOutputMapping",
+ "value": {
+ "key": {
+ "parentKeyName": "JMSTestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "TestJMSState",
+ "localName": "InOutOutputMapping"
+ },
+ "outgoingEvent": {
+ "name": "TestPingOutgoingEvent",
+ "version": "0.0.1"
+ },
+ "nextState": {
+ "parentKeyName": "NULL",
+ "parentKeyVersion": "0.0.0",
+ "parentLocalName": "NULL",
+ "localName": "NULL"
+ }
+ }
+ }
+ ]
+ },
+ "contextAlbumReference": [],
+ "taskSelectionLogic": {
+ "key": "NULL",
+ "logicFlavour": "UNDEFINED",
+ "logic": ""
+ },
+ "stateFinalizerLogicMap": {
+ "entry": []
+ },
+ "defaultTask": {
+ "name": "JMSCopyInOutTask",
+ "version": "0.0.1"
+ },
+ "taskReferences": {
+ "entry": [
+ {
+ "key": {
+ "name": "JMSCopyInOutTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "parentKeyName": "JMSTestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "TestJMSState",
+ "localName": "InOutTask"
+ },
+ "outputType": "DIRECT",
+ "output": {
+ "parentKeyName": "JMSTestPolicy",
+ "parentKeyVersion": "0.0.1",
+ "parentLocalName": "TestJMSState",
+ "localName": "InOutOutputMapping"
+ }
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ },
+ "firstState": "TestJMSState"
+ }
+ }
+ ]
+ }
+ },
+ "tasks": {
+ "key": {
+ "name": "JMSTestModel_Tasks",
+ "version": "0.0.1"
+ },
+ "taskMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "JMSCopyInOutTask",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "JMSCopyInOutTask",
+ "version": "0.0.1"
+ },
+ "inputFields": {
+ "entry": [
+ {
+ "key": "TestPing",
+ "value": {
+ "key": "TestPing",
+ "fieldSchemaKey": {
+ "name": "TestPingType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "outputFields": {
+ "entry": [
+ {
+ "key": "TestPing",
+ "value": {
+ "key": "TestPing",
+ "fieldSchemaKey": {
+ "name": "TestPingType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ },
+ "taskParameters": {
+ "entry": []
+ },
+ "contextAlbumReference": [],
+ "taskLogic": {
+ "key": "TaskLogic",
+ "logicFlavour": "JAVASCRIPT",
+ "logic": "var outFieldType = Java.type(\"org.onap.policy.apex.apps.uservice.test.adapt.jms.TestPing\");\nvar outValue = new outFieldType();\n\nvar inValue = executor.inFields.get(\"TestPing\");\n\nexecutor.logger.info(inValue);\n\noutValue.setPingTime(inValue.getPingTime());\noutValue.setPongTime(new Date().getTime());\noutValue.setName(inValue.getName() + \"_out\");\n\noutValue.setDescription(\ninValue.getDescription() +\n\". So Romeo would, were he not Romeo call'd,\" +\n\" retain that dear perfection which he owes, without that title.\");\n\nexecutor.logger.info(outValue);\nexecutor.outFields.put(\"TestPing\", outValue)\n\nvar returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);"
+ }
+ }
+ }
+ ]
+ }
+ },
+ "events": {
+ "key": {
+ "name": "JMSTestModel_Events",
+ "version": "0.0.1"
+ },
+ "eventMap": {
+ "entry": [
+ {
+ "key": {
+ "name": "TestPingIncomingEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestPingIncomingEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.apps.uservice.test.adapt.jms",
+ "source": "JMS",
+ "target": "Apex",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestPing",
+ "value": {
+ "key": "TestPing",
+ "fieldSchemaKey": {
+ "name": "TestPingType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "key": {
+ "name": "TestPingOutgoingEvent",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestPingOutgoingEvent",
+ "version": "0.0.1"
+ },
+ "nameSpace": "org.onap.policy.apex.apps.uservice.test.adapt.jms",
+ "source": "Apex",
+ "target": "JMS",
+ "parameter": {
+ "entry": [
+ {
+ "key": "TestPing",
+ "value": {
+ "key": "TestPing",
+ "fieldSchemaKey": {
+ "name": "TestPingType",
+ "version": "0.0.1"
+ },
+ "optional": false
+ }
+ }
+ ]
+ }
+ }
+ }
+ ]
+ }
+ },
+ "albums": {
+ "key": {
+ "name": "JMSTestModel_Albums",
+ "version": "0.0.1"
+ },
+ "albums": {
+ "entry": []
+ }
+ },
+ "schemas": {
+ "key": {
+ "name": "JMSTestModel_Schemas",
+ "version": "0.0.1"
+ },
+ "schemas": {
+ "entry": [
+ {
+ "key": {
+ "name": "TestPingType",
+ "version": "0.0.1"
+ },
+ "value": {
+ "key": {
+ "name": "TestPingType",
+ "version": "0.0.1"
+ },
+ "schemaFlavour": "Java",
+ "schemaDefinition": "org.onap.policy.apex.apps.uservice.test.adapt.jms.TestPing"
+ }
+ }
+ ]
+ }
+ }
+ }
+}
diff --git a/tools/model-generator/src/test/resources/models/MyFirstPolicyModel.json b/tools/model-generator/src/test/resources/models/MyFirstPolicyModel.json
new file mode 100644
index 000000000..85bb0e411
--- /dev/null
+++ b/tools/model-generator/src/test/resources/models/MyFirstPolicyModel.json
@@ -0,0 +1,1213 @@
+{
+ "apexPolicyModel" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel",
+ "version" : "0.0.1"
+ },
+ "keyInformation" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_KeyInfo",
+ "version" : "0.0.1"
+ },
+ "keyInfoMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "MorningBoozeCheck",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MorningBoozeCheck",
+ "version" : "0.0.1"
+ },
+ "UUID" : "3351b0f4-cf06-4fa2-8823-edf67bd30223",
+ "description" : "This task checks if the sales request is for an item that contains alcohol. \nIf the local time is between 00:00:00 and 11:30:00 then the sale is not authorised. Otherwise the sale is authorised. \nIn this implementation we assume that all items with item_ID values between 1000 and 2000 contain alcohol :-)"
+ }
+ }, {
+ "key" : {
+ "name" : "MorningBoozeCheckAlt1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MorningBoozeCheckAlt1",
+ "version" : "0.0.1"
+ },
+ "UUID" : "bc6d90c9-c902-4686-afd3-925b30e39990",
+ "description" : "This task checks if a sale request is for an item that is an alcoholic drink. \nIf the local time is between 00:00:00 CET and 13:00:00 CET then the sale is not authorised. \nAlso alcohol sales are not allowed on Sundays. Otherwise the sale is authorised. \nIn this implementation we assume that items with item_ID between 1000 and 2000 are all alcoholic drinks"
+ }
+ }, {
+ "key" : {
+ "name" : "MyFirstPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MyFirstPolicy",
+ "version" : "0.0.1"
+ },
+ "UUID" : "6c5e410f-489a-46ff-964e-982ce6e8b6d0",
+ "description" : "This is my first Apex policy. It checks if a sale should be authorised or not."
+ }
+ }, {
+ "key" : {
+ "name" : "MyFirstPolicyModel",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel",
+ "version" : "0.0.1"
+ },
+ "UUID" : "540226fb-55ee-4f0e-a444-983a0494818e",
+ "description" : "This is my first Apex Policy Model."
+ }
+ }, {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Albums",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Albums",
+ "version" : "0.0.1"
+ },
+ "UUID" : "3f70ec50-f896-31ba-afec-5fd47e69045b",
+ "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_Albums:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Events",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Events",
+ "version" : "0.0.1"
+ },
+ "UUID" : "ef281318-5ac9-3ef0-8db3-8f9c4e4a81e2",
+ "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_Events:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "MyFirstPolicyModel_KeyInfo",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_KeyInfo",
+ "version" : "0.0.1"
+ },
+ "UUID" : "d9248c6f-7c00-38df-8251-611463ba4065",
+ "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_KeyInfo:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Policies",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Policies",
+ "version" : "0.0.1"
+ },
+ "UUID" : "77c01a6b-510c-3aa9-b640-b4db356aa03b",
+ "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_Policies:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Schemas",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Schemas",
+ "version" : "0.0.1"
+ },
+ "UUID" : "d0cc3aa0-ea69-3a43-80ff-a0dbb0ebd885",
+ "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_Schemas:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Tasks",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Tasks",
+ "version" : "0.0.1"
+ },
+ "UUID" : "b02a7e02-2cd0-39e6-b3cb-946fa83a8f08",
+ "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_Tasks:0.0.1\""
+ }
+ }, {
+ "key" : {
+ "name" : "SALE_AUTH",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SALE_AUTH",
+ "version" : "0.0.1"
+ },
+ "UUID" : "c4500941-3f98-4080-a9cc-5b9753ed050b",
+ "description" : "An event emitted by the Policy to indicate whether the sale of an item has been authorised"
+ }
+ }, {
+ "key" : {
+ "name" : "SALE_INPUT",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SALE_INPUT",
+ "version" : "0.0.1"
+ },
+ "UUID" : "4f04aa98-e917-4f4a-882a-c75ba5a99374",
+ "description" : "An event raised by the PoS system each time an item is scanned for purchase"
+ }
+ }, {
+ "key" : {
+ "name" : "assistant_ID_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "assistant_ID_type",
+ "version" : "0.0.1"
+ },
+ "UUID" : "36df4c71-9616-4206-8b53-976a5cd4bd87",
+ "description" : "A type for 'assistant_ID' values"
+ }
+ }, {
+ "key" : {
+ "name" : "authorised_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "authorised_type",
+ "version" : "0.0.1"
+ },
+ "UUID" : "d48b619e-d00d-4008-b884-02d76ea4350b",
+ "description" : "A type for 'authorised' values"
+ }
+ }, {
+ "key" : {
+ "name" : "branch_ID_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "branch_ID_type",
+ "version" : "0.0.1"
+ },
+ "UUID" : "6468845f-4122-4128-8e49-0f52c26078b5",
+ "description" : "A type for 'branch_ID' values"
+ }
+ }, {
+ "key" : {
+ "name" : "item_ID_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "item_ID_type",
+ "version" : "0.0.1"
+ },
+ "UUID" : "4f227ff1-aee0-453a-b6b6-9a4b2e0da932",
+ "description" : "A type for 'item_ID' values"
+ }
+ }, {
+ "key" : {
+ "name" : "message_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "message_type",
+ "version" : "0.0.1"
+ },
+ "UUID" : "ad1431bb-3155-4e73-b5a3-b89bee498749",
+ "description" : "A type for 'message' values"
+ }
+ }, {
+ "key" : {
+ "name" : "notes_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "notes_type",
+ "version" : "0.0.1"
+ },
+ "UUID" : "eecfde90-896c-4343-8f9c-2603ced94e2d",
+ "description" : "A type for 'notes' values"
+ }
+ }, {
+ "key" : {
+ "name" : "price_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "price_type",
+ "version" : "0.0.1"
+ },
+ "UUID" : "52c2fc45-fd8c-463c-bd6f-d91b0554aea7",
+ "description" : "A type for 'amount'/'price' values"
+ }
+ }, {
+ "key" : {
+ "name" : "quantity_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "quantity_type",
+ "version" : "0.0.1"
+ },
+ "UUID" : "ac3d9842-80af-4a98-951c-bd79a431c613",
+ "description" : "A type for 'quantity' values"
+ }
+ }, {
+ "key" : {
+ "name" : "sale_ID_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "sale_ID_type",
+ "version" : "0.0.1"
+ },
+ "UUID" : "cca47d74-7754-4a61-b163-ca31f66b157b",
+ "description" : "A type for 'sale_ID' values"
+ }
+ }, {
+ "key" : {
+ "name" : "timestamp_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "timestamp_type",
+ "version" : "0.0.1"
+ },
+ "UUID" : "fd594e88-411d-4a94-b2be-697b3a0d7adf",
+ "description" : "A type for 'time' values"
+ }
+ } ]
+ }
+ },
+ "policies" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Policies",
+ "version" : "0.0.1"
+ },
+ "policyMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "MyFirstPolicy",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "policyKey" : {
+ "name" : "MyFirstPolicy",
+ "version" : "0.0.1"
+ },
+ "template" : "FREEFORM",
+ "state" : {
+ "entry" : [ {
+ "key" : "BoozeAuthDecide",
+ "value" : {
+ "stateKey" : {
+ "parentKeyName" : "MyFirstPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "NULL",
+ "localName" : "BoozeAuthDecide"
+ },
+ "trigger" : {
+ "name" : "SALE_INPUT",
+ "version" : "0.0.1"
+ },
+ "stateOutputs" : {
+ "entry" : [ {
+ "key" : "MorningBoozeCheck_Output_Direct",
+ "value" : {
+ "key" : {
+ "parentKeyName" : "MyFirstPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "BoozeAuthDecide",
+ "localName" : "MorningBoozeCheck_Output_Direct"
+ },
+ "outgoingEvent" : {
+ "name" : "SALE_AUTH",
+ "version" : "0.0.1"
+ },
+ "nextState" : {
+ "parentKeyName" : "NULL",
+ "parentKeyVersion" : "0.0.0",
+ "parentLocalName" : "NULL",
+ "localName" : "NULL"
+ }
+ }
+ } ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskSelectionLogic" : {
+ "key" : "TaskSelectionLogic",
+ "logicFlavour" : "JAVASCRIPT",
+ "logic" : "/* * ============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========================================================= */var returnValueType = Java.type(\"java.lang.Boolean\");\nvar returnValue = new returnValueType(true);\n\nexecutor.logger.info(\"Task Selection Execution: '\"+executor.subject.id+\"'. Input Event: '\"+executor.inFields+\"'\");\n\nbranchid = executor.inFields.get(\"branch_ID\");\ntaskorig = executor.subject.getTaskKey(\"MorningBoozeCheck\");\ntaskalt = executor.subject.getTaskKey(\"MorningBoozeCheckAlt1\");\ntaskdef = executor.subject.getDefaultTaskKey();\n\nif(branchid >=0 && branchid <1000){\n taskorig.copyTo(executor.selectedTask);\n}\nelse if (branchid >=1000 && branchid <2000){\n taskalt.copyTo(executor.selectedTask);\n}\nelse{\n taskdef.copyTo(executor.selectedTask);\n}\n\n/*\nThis task selection logic selects task \"MorningBoozeCheck\" for branches with 0<=branch_ID<1000 and selects task \"MorningBoozeCheckAlt1\" for branches with 1000<=branch_ID<2000. Otherwise the default task is selected. In this case the default task is also \"MorningBoozeCheck\"\n*/"
+ },
+ "stateFinalizerLogicMap" : {
+ "entry" : [ ]
+ },
+ "defaultTask" : {
+ "name" : "MorningBoozeCheck",
+ "version" : "0.0.1"
+ },
+ "taskReferences" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "MorningBoozeCheckAlt1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "MyFirstPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "BoozeAuthDecide",
+ "localName" : "MorningBoozeCheckAlt1"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "MyFirstPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "BoozeAuthDecide",
+ "localName" : "MorningBoozeCheck_Output_Direct"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "MorningBoozeCheck",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "parentKeyName" : "MyFirstPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "BoozeAuthDecide",
+ "localName" : "MorningBoozeCheck"
+ },
+ "outputType" : "DIRECT",
+ "output" : {
+ "parentKeyName" : "MyFirstPolicy",
+ "parentKeyVersion" : "0.0.1",
+ "parentLocalName" : "BoozeAuthDecide",
+ "localName" : "MorningBoozeCheck_Output_Direct"
+ }
+ }
+ } ]
+ }
+ }
+ } ]
+ },
+ "firstState" : "BoozeAuthDecide"
+ }
+ } ]
+ }
+ },
+ "tasks" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Tasks",
+ "version" : "0.0.1"
+ },
+ "taskMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "MorningBoozeCheck",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MorningBoozeCheck",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "sale_ID",
+ "value" : {
+ "key" : "sale_ID",
+ "fieldSchemaKey" : {
+ "name" : "sale_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "amount",
+ "value" : {
+ "key" : "amount",
+ "fieldSchemaKey" : {
+ "name" : "price_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "assistant_ID",
+ "value" : {
+ "key" : "assistant_ID",
+ "fieldSchemaKey" : {
+ "name" : "assistant_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "notes",
+ "value" : {
+ "key" : "notes",
+ "fieldSchemaKey" : {
+ "name" : "notes_type",
+ "version" : "0.0.1"
+ },
+ "optional" : true
+ }
+ }, {
+ "key" : "quantity",
+ "value" : {
+ "key" : "quantity",
+ "fieldSchemaKey" : {
+ "name" : "quantity_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "branch_ID",
+ "value" : {
+ "key" : "branch_ID",
+ "fieldSchemaKey" : {
+ "name" : "branch_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "item_ID",
+ "value" : {
+ "key" : "item_ID",
+ "fieldSchemaKey" : {
+ "name" : "item_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "time",
+ "value" : {
+ "key" : "time",
+ "fieldSchemaKey" : {
+ "name" : "timestamp_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "sale_ID",
+ "value" : {
+ "key" : "sale_ID",
+ "fieldSchemaKey" : {
+ "name" : "sale_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "amount",
+ "value" : {
+ "key" : "amount",
+ "fieldSchemaKey" : {
+ "name" : "price_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "assistant_ID",
+ "value" : {
+ "key" : "assistant_ID",
+ "fieldSchemaKey" : {
+ "name" : "assistant_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "notes",
+ "value" : {
+ "key" : "notes",
+ "fieldSchemaKey" : {
+ "name" : "notes_type",
+ "version" : "0.0.1"
+ },
+ "optional" : true
+ }
+ }, {
+ "key" : "quantity",
+ "value" : {
+ "key" : "quantity",
+ "fieldSchemaKey" : {
+ "name" : "quantity_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "branch_ID",
+ "value" : {
+ "key" : "branch_ID",
+ "fieldSchemaKey" : {
+ "name" : "branch_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "item_ID",
+ "value" : {
+ "key" : "item_ID",
+ "fieldSchemaKey" : {
+ "name" : "item_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "authorised",
+ "value" : {
+ "key" : "authorised",
+ "fieldSchemaKey" : {
+ "name" : "authorised_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "time",
+ "value" : {
+ "key" : "time",
+ "fieldSchemaKey" : {
+ "name" : "timestamp_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "message",
+ "value" : {
+ "key" : "message",
+ "fieldSchemaKey" : {
+ "name" : "message_type",
+ "version" : "0.0.1"
+ },
+ "optional" : true
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nimport java.util.Date;\nimport java.util.Calendar;\nimport java.util.TimeZone;\nimport java.text.SimpleDateFormat;\n\nlogger.info(\"Task Execution: '\"+subject.id+\"'. Input Fields: '\"+inFields+\"'\");\n\noutFields.put(\"amount\" , inFields.get(\"amount\"));\noutFields.put(\"assistant_ID\", inFields.get(\"assistant_ID\"));\noutFields.put(\"notes\" , inFields.get(\"notes\"));\noutFields.put(\"quantity\" , inFields.get(\"quantity\"));\noutFields.put(\"branch_ID\" , inFields.get(\"branch_ID\"));\noutFields.put(\"item_ID\" , inFields.get(\"item_ID\"));\noutFields.put(\"time\" , inFields.get(\"time\"));\noutFields.put(\"sale_ID\" , inFields.get(\"sale_ID\"));\n\nitem_id = inFields.get(\"item_ID\");\n\n//The events used later to test this task use GMT timezone!\ngmt = TimeZone.getTimeZone(\"GMT\");\ntimenow = Calendar.getInstance(gmt);\ndf = new SimpleDateFormat(\"HH:mm:ss z\");\ndf.setTimeZone(gmt);\ntimenow.setTimeInMillis(inFields.get(\"time\"));\n\nmidnight = timenow.clone();\nmidnight.set(\n timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH),\n timenow.get(Calendar.DATE),0,0,0);\neleven30 = timenow.clone();\neleven30.set(\n timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH),\n timenow.get(Calendar.DATE),11,30,0);\n\nitemisalcohol = false;\nif(item_id != null && item_id >=1000 && item_id < 2000)\n itemisalcohol = true;\n\nif( itemisalcohol\n && timenow.after(midnight) && timenow.before(eleven30)){\n outFields.put(\"authorised\", false);\n outFields.put(\"message\", \"Sale not authorised by policy task \"+subject.taskName+\n \" for time \"+df.format(timenow.getTime())+\n \". Alcohol can not be sold between \"+df.format(midnight.getTime())+\n \" and \"+df.format(eleven30.getTime()));\n return true;\n}\nelse{\n outFields.put(\"authorised\", true);\n outFields.put(\"message\", \"Sale authorised by policy task \"+subject.taskName+\n \" for time \"+df.format(timenow.getTime()));\n return true;\n}\n\n/*\nThis task checks if a sale request is for an item that is an alcoholic drink.\nIf the local time is between 00:00:00 GMT and 11:30:00 GMT then the sale is not\nauthorised. Otherwise the sale is authorised. \nIn this implementation we assume that items with item_ID value between 1000 and \n2000 are all alcoholic drinks :-)\n*/"
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "MorningBoozeCheckAlt1",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "MorningBoozeCheckAlt1",
+ "version" : "0.0.1"
+ },
+ "inputFields" : {
+ "entry" : [ {
+ "key" : "sale_ID",
+ "value" : {
+ "key" : "sale_ID",
+ "fieldSchemaKey" : {
+ "name" : "sale_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "amount",
+ "value" : {
+ "key" : "amount",
+ "fieldSchemaKey" : {
+ "name" : "price_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "assistant_ID",
+ "value" : {
+ "key" : "assistant_ID",
+ "fieldSchemaKey" : {
+ "name" : "assistant_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "notes",
+ "value" : {
+ "key" : "notes",
+ "fieldSchemaKey" : {
+ "name" : "notes_type",
+ "version" : "0.0.1"
+ },
+ "optional" : true
+ }
+ }, {
+ "key" : "quantity",
+ "value" : {
+ "key" : "quantity",
+ "fieldSchemaKey" : {
+ "name" : "quantity_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "branch_ID",
+ "value" : {
+ "key" : "branch_ID",
+ "fieldSchemaKey" : {
+ "name" : "branch_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "item_ID",
+ "value" : {
+ "key" : "item_ID",
+ "fieldSchemaKey" : {
+ "name" : "item_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "time",
+ "value" : {
+ "key" : "time",
+ "fieldSchemaKey" : {
+ "name" : "timestamp_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ },
+ "outputFields" : {
+ "entry" : [ {
+ "key" : "sale_ID",
+ "value" : {
+ "key" : "sale_ID",
+ "fieldSchemaKey" : {
+ "name" : "sale_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "amount",
+ "value" : {
+ "key" : "amount",
+ "fieldSchemaKey" : {
+ "name" : "price_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "assistant_ID",
+ "value" : {
+ "key" : "assistant_ID",
+ "fieldSchemaKey" : {
+ "name" : "assistant_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "notes",
+ "value" : {
+ "key" : "notes",
+ "fieldSchemaKey" : {
+ "name" : "notes_type",
+ "version" : "0.0.1"
+ },
+ "optional" : true
+ }
+ }, {
+ "key" : "quantity",
+ "value" : {
+ "key" : "quantity",
+ "fieldSchemaKey" : {
+ "name" : "quantity_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "branch_ID",
+ "value" : {
+ "key" : "branch_ID",
+ "fieldSchemaKey" : {
+ "name" : "branch_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "item_ID",
+ "value" : {
+ "key" : "item_ID",
+ "fieldSchemaKey" : {
+ "name" : "item_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "authorised",
+ "value" : {
+ "key" : "authorised",
+ "fieldSchemaKey" : {
+ "name" : "authorised_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "time",
+ "value" : {
+ "key" : "time",
+ "fieldSchemaKey" : {
+ "name" : "timestamp_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "message",
+ "value" : {
+ "key" : "message",
+ "fieldSchemaKey" : {
+ "name" : "message_type",
+ "version" : "0.0.1"
+ },
+ "optional" : true
+ }
+ } ]
+ },
+ "taskParameters" : {
+ "entry" : [ ]
+ },
+ "contextAlbumReference" : [ ],
+ "taskLogic" : {
+ "key" : "TaskLogic",
+ "logicFlavour" : "MVEL",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nimport java.util.Date;\nimport java.util.Calendar;\nimport java.util.TimeZone;\nimport java.text.SimpleDateFormat;\n\nlogger.info(\"Task Execution: '\"+subject.id+\"'. Input Event: '\"+inFields+\"'\");\n\noutFields.put(\"amount\" , inFields.get(\"amount\"));\noutFields.put(\"assistant_ID\", inFields.get(\"assistant_ID\"));\noutFields.put(\"notes\" , inFields.get(\"notes\"));\noutFields.put(\"quantity\" , inFields.get(\"quantity\"));\noutFields.put(\"branch_ID\" , inFields.get(\"branch_ID\"));\noutFields.put(\"item_ID\" , inFields.get(\"item_ID\"));\noutFields.put(\"time\" , inFields.get(\"time\"));\noutFields.put(\"sale_ID\" , inFields.get(\"sale_ID\"));\n\nitem_id = inFields.get(\"item_ID\");\n\n//The events used later to test this task use CET timezone!\ncet = TimeZone.getTimeZone(\"CET\");\ntimenow = Calendar.getInstance(cet);\ndf = new SimpleDateFormat(\"HH:mm:ss z\");\ndf.setTimeZone(cet);\ntimenow.setTimeInMillis(inFields.get(\"time\"));\n\nmidnight = timenow.clone();\nmidnight.set(\n timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH),\n timenow.get(Calendar.DATE),0,0,0);\nonepm = timenow.clone();\nonepm.set(\n timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH),\n timenow.get(Calendar.DATE),13,0,0);\n\nitemisalcohol = false;\nif(item_id != null && item_id >=1000 && item_id < 2000)\n itemisalcohol = true;\n\nif( itemisalcohol &&\n ( (timenow.after(midnight) && timenow.before(onepm))\n ||\n (timenow.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY)\n )){\n outFields.put(\"authorised\", false);\n outFields.put(\"message\", \"Sale not authorised by policy task \"+subject.taskName+\n \" for time \"+df.format(timenow.getTime())+\n \". Alcohol can not be sold between \"+df.format(midnight.getTime())+\n \" and \"+df.format(onepm.getTime()) +\" or on Sunday\");\n return true;\n}\nelse{\n outFields.put(\"authorised\", true);\n outFields.put(\"message\", \"Sale authorised by policy task \"+subject.taskName+\n \" for time \"+df.format(timenow.getTime()));\n return true;\n}\n\n/*\nThis task checks if a sale request is for an item that is an alcoholic drink. \nIf the local time is between 00:00:00 CET and 13:00:00 CET then the sale is not authorised. \nAlso alcohol sales are not allowed on Sundays. Otherwise the sale is authorised. \nIn this implementation we assume that items with item_ID between 1000 and 2000 are all alcoholic drinks :-)\n*/"
+ }
+ }
+ } ]
+ }
+ },
+ "events" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Events",
+ "version" : "0.0.1"
+ },
+ "eventMap" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "SALE_AUTH",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SALE_AUTH",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "com.hyperm",
+ "source" : "APEX",
+ "target" : "POS",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "sale_ID",
+ "value" : {
+ "key" : "sale_ID",
+ "fieldSchemaKey" : {
+ "name" : "sale_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "amount",
+ "value" : {
+ "key" : "amount",
+ "fieldSchemaKey" : {
+ "name" : "price_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "assistant_ID",
+ "value" : {
+ "key" : "assistant_ID",
+ "fieldSchemaKey" : {
+ "name" : "assistant_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "notes",
+ "value" : {
+ "key" : "notes",
+ "fieldSchemaKey" : {
+ "name" : "notes_type",
+ "version" : "0.0.1"
+ },
+ "optional" : true
+ }
+ }, {
+ "key" : "quantity",
+ "value" : {
+ "key" : "quantity",
+ "fieldSchemaKey" : {
+ "name" : "quantity_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "branch_ID",
+ "value" : {
+ "key" : "branch_ID",
+ "fieldSchemaKey" : {
+ "name" : "branch_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "item_ID",
+ "value" : {
+ "key" : "item_ID",
+ "fieldSchemaKey" : {
+ "name" : "item_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "authorised",
+ "value" : {
+ "key" : "authorised",
+ "fieldSchemaKey" : {
+ "name" : "authorised_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "time",
+ "value" : {
+ "key" : "time",
+ "fieldSchemaKey" : {
+ "name" : "timestamp_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "message",
+ "value" : {
+ "key" : "message",
+ "fieldSchemaKey" : {
+ "name" : "message_type",
+ "version" : "0.0.1"
+ },
+ "optional" : true
+ }
+ } ]
+ }
+ }
+ }, {
+ "key" : {
+ "name" : "SALE_INPUT",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SALE_INPUT",
+ "version" : "0.0.1"
+ },
+ "nameSpace" : "com.hyperm",
+ "source" : "POS",
+ "target" : "APEX",
+ "parameter" : {
+ "entry" : [ {
+ "key" : "sale_ID",
+ "value" : {
+ "key" : "sale_ID",
+ "fieldSchemaKey" : {
+ "name" : "sale_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "amount",
+ "value" : {
+ "key" : "amount",
+ "fieldSchemaKey" : {
+ "name" : "price_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "assistant_ID",
+ "value" : {
+ "key" : "assistant_ID",
+ "fieldSchemaKey" : {
+ "name" : "assistant_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "notes",
+ "value" : {
+ "key" : "notes",
+ "fieldSchemaKey" : {
+ "name" : "notes_type",
+ "version" : "0.0.1"
+ },
+ "optional" : true
+ }
+ }, {
+ "key" : "quantity",
+ "value" : {
+ "key" : "quantity",
+ "fieldSchemaKey" : {
+ "name" : "quantity_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "branch_ID",
+ "value" : {
+ "key" : "branch_ID",
+ "fieldSchemaKey" : {
+ "name" : "branch_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "item_ID",
+ "value" : {
+ "key" : "item_ID",
+ "fieldSchemaKey" : {
+ "name" : "item_ID_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ }, {
+ "key" : "time",
+ "value" : {
+ "key" : "time",
+ "fieldSchemaKey" : {
+ "name" : "timestamp_type",
+ "version" : "0.0.1"
+ },
+ "optional" : false
+ }
+ } ]
+ }
+ }
+ } ]
+ }
+ },
+ "albums" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Albums",
+ "version" : "0.0.1"
+ },
+ "albums" : {
+ "entry" : [ ]
+ }
+ },
+ "schemas" : {
+ "key" : {
+ "name" : "MyFirstPolicyModel_Schemas",
+ "version" : "0.0.1"
+ },
+ "schemas" : {
+ "entry" : [ {
+ "key" : {
+ "name" : "assistant_ID_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "assistant_ID_type",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "authorised_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "authorised_type",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Boolean"
+ }
+ }, {
+ "key" : {
+ "name" : "branch_ID_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "branch_ID_type",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "item_ID_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "item_ID_type",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "message_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "message_type",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "notes_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "notes_type",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.String"
+ }
+ }, {
+ "key" : {
+ "name" : "price_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "price_type",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "quantity_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "quantity_type",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Integer"
+ }
+ }, {
+ "key" : {
+ "name" : "sale_ID_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "sale_ID_type",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ }, {
+ "key" : {
+ "name" : "timestamp_type",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "timestamp_type",
+ "version" : "0.0.1"
+ },
+ "schemaFlavour" : "Java",
+ "schemaDefinition" : "java.lang.Long"
+ }
+ } ]
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/tools/model-generator/src/test/resources/models/SamplePolicyModelJAVASCRIPT.json b/tools/model-generator/src/test/resources/models/SamplePolicyModelJAVASCRIPT.json
new file mode 100644
index 000000000..2dc4bcd3f
--- /dev/null
+++ b/tools/model-generator/src/test/resources/models/SamplePolicyModelJAVASCRIPT.json
@@ -0,0 +1,6684 @@
+{
+ "apexPolicyModel" : {
+ "key" : {
+ "name" : "SamplePolicyModelJAVASCRIPT",
+ "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" : "SamplePolicyModelJAVASCRIPT",
+ "version" : "0.0.1"
+ },
+ "value" : {
+ "key" : {
+ "name" : "SamplePolicyModelJAVASCRIPT",
+ "version" : "0.0.1"
+ },
+ "UUID" : "bc8ee312-81ce-3c4a-92d5-4a73b8077148",
+ "description" : "Generated description for concept referred to by key \"SamplePolicyModelJAVASCRIPT: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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\nvar returnValue = executor.isTrue;"
+ },
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\nvar returnValue = executor.isTrue;"
+ },
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\nvar returnValue = executor.isTrue;"
+ },
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\nvar returnValue = executor.isTrue;"
+ },
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\nvar returnValue = executor.isTrue;"
+ },
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\nvar returnValue = executor.isTrue;"
+ },
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\nvar returnValue = executor.isTrue;"
+ },
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.subject.defaultTaskKey.copyTo(executor.selectedTask)\n\nvar returnValue = executor.isTrue;"
+ },
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestActCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestActStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestDecideCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestDecideStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestEstablishCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestEstablishStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(2));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(3));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(0));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ }, {
+ "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" : "JAVASCRIPT",
+ "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\n\nexecutor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"GlobalContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nvar caseSelectedType = Java.type(\"java.lang.Byte\");\nexecutor.outFields.put(\"TestMatchCaseSelected\", new caseSelectedType(1));\n\nvar JavaDate = Java.type(\"java.util.Date\");\ntimeNow = new JavaDate();\nexecutor.outFields.put(\"TestMatchStateTime\", timeNow.getTime());\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;"
+ }
+ }
+ } ]
+ }
+ },
+ "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"
+ }
+ } ]
+ }
+ }
+ }
+} \ No newline at end of file