aboutsummaryrefslogtreecommitdiffstats
path: root/core/core-deployment
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-28 12:11:59 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-28 12:12:06 +0100
commit1899306c1087d55f2e923f32a7e9ea038aa5275a (patch)
tree8cc0270f6477b138cdc2b3a4eccf6dcafad30057 /core/core-deployment
parentd67a4dbff408ebf73a25158c85169fb7165e357e (diff)
Add unit test for core distribution
JUnit for the batch deployer and deploy facade. Issue-ID: POLICY-1034 Change-Id: I3959578ba8666d64b48bbe4ee9aeab27b92d77ae Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'core/core-deployment')
-rw-r--r--core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java78
-rw-r--r--core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/DeploymentClient.java63
-rw-r--r--core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java24
-rw-r--r--core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java96
-rw-r--r--core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java202
-rw-r--r--core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java222
-rw-r--r--core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java214
-rw-r--r--core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/PeriodicEventManagerTest.java212
-rw-r--r--core/core-deployment/src/test/resources/models/JunkModel.json2
-rw-r--r--core/core-deployment/src/test/resources/models/SamplePolicyModelJAVASCRIPT.json6684
10 files changed, 7671 insertions, 126 deletions
diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java
index 1748a0663..95f74b708 100644
--- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java
+++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java
@@ -21,10 +21,10 @@
package org.onap.policy.apex.core.deployment;
import java.io.IOException;
+import java.io.PrintStream;
import java.util.Arrays;
import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
-import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
import org.slf4j.ext.XLogger;
import org.slf4j.ext.XLoggerFactory;
@@ -47,13 +47,20 @@ public class BatchDeployer {
// The facade that is handling messaging to the engine service
private EngineServiceFacade engineServiceFacade = null;
+ private String hostName;
+ private int port;
+
/**
* Instantiates a new deployer.
*
- * @param hostName the host name of the host running the Apex Engine
- * @param port the port to use for EngDep communication with the Apex engine
+ * @param hostName the apex host name
+ * @param port the apex EngDep port
+ * @param outputStream the output stream
*/
- public BatchDeployer(final String hostName, final int port) {
+ public BatchDeployer(final String hostName, final int port, final PrintStream outputStream) {
+ this.hostName = hostName;
+ this.port = port;
+
engineServiceFacade = new EngineServiceFacade(hostName, port);
}
@@ -63,14 +70,22 @@ public class BatchDeployer {
* @throws ApexDeploymentException thrown on deployment and communication errors
*/
public void init() throws ApexDeploymentException {
- engineServiceFacade.init();
+ try {
+ engineServiceFacade.init();
+ } catch (final ApexException e) {
+ String errorMessage = "model deployment failed on parameters " + hostName + " " + port;
+ LOGGER.error(errorMessage, e);
+ throw new ApexDeploymentException(errorMessage);
+ }
}
/**
* Close the EngDep connection to the Apex server.
*/
public void close() {
- engineServiceFacade.close();
+ if (engineServiceFacade != null) {
+ engineServiceFacade.close();
+ }
}
/**
@@ -102,25 +117,12 @@ public class BatchDeployer {
}
/**
- * Start the Apex engines on the engine service.
- *
- * @throws ApexDeploymentException on messaging errors
+ * Get the engine service facade of the event manager. This method is used for testing only.
+ *
+ * @return the engine service facade
*/
- public void startEngines() throws ApexDeploymentException {
- for (final AxArtifactKey engineKey : engineServiceFacade.getEngineKeyArray()) {
- engineServiceFacade.startEngine(engineKey);
- }
- }
-
- /**
- * Stop the Apex engines on the engine service.
- *
- * @throws ApexDeploymentException on messaging errors
- */
- public void stopEngines() throws ApexDeploymentException {
- for (final AxArtifactKey engineKey : engineServiceFacade.getEngineKeyArray()) {
- engineServiceFacade.stopEngine(engineKey);
- }
+ protected EngineServiceFacade getEngineServiceFacade() {
+ return engineServiceFacade;
}
/**
@@ -128,28 +130,26 @@ public class BatchDeployer {
* line arguments.
*
* @param args the arguments that specify the Apex engine and the Apex model file
+ * @throws ApexException on deployment errors
*/
- public static void main(final String[] args) {
+ public static void main(final String[] args) throws ApexException {
if (args.length != NUM_ARGUMENTS) {
String message = "invalid arguments: " + Arrays.toString(args)
- + "usage: Deployer <server address> <port address> <Apex Model file location>";
+ + "\nusage: BatchDeployer <server address> <port address> <model file path";
LOGGER.error(message);
- return;
+ throw new ApexDeploymentException(message);
}
- BatchDeployer deployer = null;
+ int port;
try {
- // Use a Deployer object to handle model deployment
- deployer = new BatchDeployer(args[0], Integer.parseInt(args[1]));
- deployer.init();
- deployer.deployModel(args[2], false, false);
- deployer.startEngines();
- } catch (final ApexException e) {
- LOGGER.error("model deployment failed on parameters {}", args, e);
- } finally {
- if (deployer != null) {
- deployer.close();
- }
+ port = Integer.parseInt(args[1]);
+ } catch (NumberFormatException nfe) {
+ throw new ApexDeploymentException("argument port is invalid", nfe);
}
+
+ BatchDeployer deployer = new BatchDeployer(args[0], port, System.out);
+ deployer.init();
+ deployer.deployModel(args[2], false, false);
+ deployer.close();
}
}
diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/DeploymentClient.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/DeploymentClient.java
index 0df0166df..c46d6a1ba 100644
--- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/DeploymentClient.java
+++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/DeploymentClient.java
@@ -110,24 +110,7 @@ public class DeploymentClient implements Runnable {
}
// Loop forever, sending messages as they appear on the queue
while (started && !thisThread.isInterrupted()) {
- try {
- final Message messageForSending = sendQueue.poll(CLIENT_SEND_QUEUE_TIMEOUT, TimeUnit.MILLISECONDS);
- if (messageForSending == null) {
- continue;
- }
-
- // Send the message in its message holder
- final MessageHolder<Message> messageHolder = new MessageHolder<>(MessagingUtils.getHost());
- messageHolder.addMessage(messageForSending);
- service.send(messageHolder);
- messagesSent++;
- } catch (final InterruptedException e) {
- // Message sending has been interrupted, we are finished
- LOGGER.debug("engine<-->deployment client interrupted");
- // restore the interrupt status
- thisThread.interrupt();
- break;
- }
+ started = sendMessages();
}
// Thread has been interrupted
@@ -136,6 +119,50 @@ public class DeploymentClient implements Runnable {
}
/**
+ * Send messages off the queue.
+ */
+ private boolean sendMessages() {
+ try {
+ final Message messageForSending = sendQueue.poll(CLIENT_SEND_QUEUE_TIMEOUT, TimeUnit.MILLISECONDS);
+ if (messageForSending == null) {
+ return true;
+ }
+
+ // Send the message in its message holder
+ final MessageHolder<Message> messageHolder = new MessageHolder<>(MessagingUtils.getHost());
+ messageHolder.addMessage(messageForSending);
+ service.send(messageHolder);
+ messagesSent++;
+ } catch (final InterruptedException e) {
+ // Message sending has been interrupted, we are finished
+ LOGGER.debug("engine<-->deployment client interrupted");
+ // restore the interrupt status
+ thisThread.interrupt();
+ return false;
+ }
+
+ return true;
+ }
+
+ /**
+ * Gets the host.
+ *
+ * @return the host
+ */
+ public String getHost() {
+ return host;
+ }
+
+ /**
+ * Gets the port.
+ *
+ * @return the port
+ */
+ public int getPort() {
+ return port;
+ }
+
+ /**
* Send an EngDep message to the Apex server.
*
* @param message the message to send to the Apex server
diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java
index e27bf5d07..caf943dfc 100644
--- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java
+++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/EngineServiceFacade.java
@@ -94,6 +94,9 @@ public class EngineServiceFacade {
public EngineServiceFacade(final String hostName, final int port) {
this.hostName = hostName;
this.port = port;
+
+ // Use the deployment client to handle the EngDep communication towards the Apex server.
+ client = new DeploymentClient(hostName, port);
}
/**
@@ -106,10 +109,7 @@ public class EngineServiceFacade {
LOGGER.debug("handshaking with server {}:{} . . .", hostName, port);
// Use the deployment client to handle the EngDep communication towards the Apex server.
- // It runs a thread to
- // monitor the session and to send
- // messages
- client = new DeploymentClient(hostName, port);
+ // The deployment client runs a thread to monitor the session and to send messages
clientThread = new Thread(client);
clientThread.start();
@@ -206,9 +206,9 @@ public class EngineServiceFacade {
if (apexModelUrl == null) {
apexModelUrl = ResourceUtils.getUrlResource(modelFileName);
if (apexModelUrl == null) {
- LOGGER.error("cound not create apex model, could not read from XML file {}", modelFileName);
+ LOGGER.error("cound not create apex model, could not read from file {}", modelFileName);
throw new ApexDeploymentException(
- "cound not create apex model, could not read XML file " + modelFileName);
+ "cound not create apex model, could not read from file " + modelFileName);
}
}
@@ -236,10 +236,6 @@ public class EngineServiceFacade {
final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class);
modelReader.setValidateFlag(!ignoreConflicts);
final AxPolicyModel apexPolicyModel = modelReader.read(modelInputStream);
- if (apexPolicyModel == null) {
- LOGGER.error("cound not create apex model, could not read model stream");
- throw new ApexDeploymentException("cound not create apex model, could not read model stream");
- }
// Deploy the model
deployModel(apexPolicyModel, ignoreConflicts, force);
@@ -487,4 +483,12 @@ public class EngineServiceFacade {
return responseMessage;
}
+
+ /**
+ * Set a deployment client for this facade. This method is for testing.
+ * @param deploymentClient the deployment client to set
+ */
+ protected void setDeploymentClient(final DeploymentClient deploymentClient) {
+ this.client = deploymentClient;
+ }
}
diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java
index 533db0b17..09d5e8e4b 100644
--- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java
+++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/PeriodicEventManager.java
@@ -55,59 +55,92 @@ public class PeriodicEventManager {
*
* @param args the command parameters
* @param outputStream the output stream
+ * @throws ApexDeploymentException on messaging exceptions
*/
- public PeriodicEventManager(final String[] args, final PrintStream outputStream) {
+ public PeriodicEventManager(final String[] args, final PrintStream outputStream) throws ApexDeploymentException {
if (args.length != NUM_ARGUMENTS) {
String message = "invalid arguments: " + Arrays.toString(args)
- + "\nusage: Deployer <server address> <port address> <start/stop> <periods in ms>";
+ + "\nusage: PeriodicEventManager <server address> <port address> "
+ + "<start/stop> <periods in ms>";
LOGGER.error(message);
outputStream.println(message);
- return;
+ throw new ApexDeploymentException(message);
}
this.hostName = args[0];
- this.port = Integer.parseInt(args[1]);
- this.startFlag = "start".equalsIgnoreCase(args[2]);
- this.period = Long.parseLong(args[3]);
+
+ try {
+ this.port = Integer.parseInt(args[1]);
+ } catch (NumberFormatException nfe) {
+ throw new ApexDeploymentException("argument port is invalid", nfe);
+ }
+
+ if ("start".equalsIgnoreCase(args[2])) {
+ startFlag = true;
+ } else if ("stop".equalsIgnoreCase(args[2])) {
+ startFlag = false;
+ } else {
+ throw new ApexDeploymentException("argument " + args[2] + " must be \"start\" or \"stop\"");
+ }
+
+ try {
+ this.period = Long.parseLong(args[3]);
+ } catch (NumberFormatException nfe) {
+ throw new ApexDeploymentException("argument period is invalid", nfe);
+ }
+
+ // Use an engine service facade to handle periodic event setting
+ engineServiceFacade = new EngineServiceFacade(hostName, port);
}
/**
- * Initializes the deployer, opens an EngDep communication session with the Apex engine.
+ * Initializes the manager, opens an EngDep communication session with the Apex engine.
*
- * @throws ApexDeploymentException thrown on deployment and communication errors
+ * @throws ApexDeploymentException thrown on messaging and communication errors
*/
public void init() throws ApexDeploymentException {
try {
- // Use an engine service facade to handle model deployment
- engineServiceFacade = new EngineServiceFacade(hostName, port);
engineServiceFacade.init();
-
- if (startFlag) {
- startPerioidicEvents(period);
- } else {
- stopPerioidicEvents();
- }
} catch (final ApexException e) {
- LOGGER.error("model deployment failed on parameters {} {} {}", hostName, port, startFlag, e);
- } finally {
- close();
+ String errorMessage = "periodic event setting failed on parameters " + hostName + " " + port + " "
+ + startFlag;
+ LOGGER.error(errorMessage, e);
+ throw new ApexDeploymentException(errorMessage);
}
}
/**
* Close the EngDep connection to the Apex server.
*/
- private void close() {
- engineServiceFacade.close();
+ public void close() {
+ if (engineServiceFacade != null) {
+ engineServiceFacade.close();
+ }
+ }
+
+ /**
+ * Execute the periodic event command.
+ *
+ * @throws ApexDeploymentException on periodic event exceptions
+ */
+ public void runCommand() throws ApexDeploymentException {
+ if (startFlag) {
+ startPerioidicEvents();
+ } else {
+ stopPerioidicEvents();
+ }
}
/**
* Start the Apex engines on the engine service.
*
- * @param period the interval in milliseconds between periodic events
* @throws ApexDeploymentException on messaging errors
*/
- private void startPerioidicEvents(final long period) throws ApexDeploymentException {
+ private void startPerioidicEvents() throws ApexDeploymentException {
+ if (engineServiceFacade.getEngineKeyArray() == null) {
+ throw new ApexDeploymentException("connection to apex is not initialized");
+ }
+
for (final AxArtifactKey engineKey : engineServiceFacade.getEngineKeyArray()) {
engineServiceFacade.startPerioidicEvents(engineKey, period);
}
@@ -119,20 +152,35 @@ public class PeriodicEventManager {
* @throws ApexDeploymentException on messaging errors
*/
private void stopPerioidicEvents() throws ApexDeploymentException {
+ if (engineServiceFacade.getEngineKeyArray() == null) {
+ throw new ApexDeploymentException("connection to apex is not initialized");
+ }
+
for (final AxArtifactKey engineKey : engineServiceFacade.getEngineKeyArray()) {
engineServiceFacade.stopPerioidicEvents(engineKey);
}
}
/**
+ * Get the engine service facade of the event manager. This method is used for testing only.
+ *
+ * @return the engine service facade
+ */
+ protected EngineServiceFacade getEngineServiceFacade() {
+ return engineServiceFacade;
+ }
+
+ /**
* The main method, reads the Apex server host address, port and location of the Apex model XML file from the
* command line arguments.
*
* @param args the arguments that specify the Apex engine and the Apex model file
- * @throws ApexDeploymentException on deployment errors
+ * @throws ApexDeploymentException on messaging errors
*/
public static void main(final String[] args) throws ApexDeploymentException {
PeriodicEventManager peManager = new PeriodicEventManager(args, System.out);
peManager.init();
+ peManager.runCommand();
+ peManager.close();
}
}
diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java
new file mode 100644
index 000000000..fb2d2467b
--- /dev/null
+++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/BatchDeployerTest.java
@@ -0,0 +1,202 @@
+/*-
+ * ============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.core.deployment;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.PrintStream;
+
+import org.junit.Test;
+import org.onap.policy.apex.model.basicmodel.concepts.ApexException;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelException;
+import org.onap.policy.apex.model.basicmodel.handling.ApexModelReader;
+import org.onap.policy.apex.model.policymodel.concepts.AxPolicyModel;
+
+/**
+ * Test the periodic event manager utility.
+ */
+public class BatchDeployerTest {
+ @Test
+ public void testBatchDeployerBad() {
+ try {
+ final String[] eventArgs =
+ { "-h" };
+
+ BatchDeployer.main(eventArgs);
+ fail("test should throw an exception");
+ } catch (Exception exc) {
+ assertEquals("invalid arguments: [-h]", exc.getMessage().substring(0, 23));
+ }
+ }
+
+ @Test
+ public void testBatchDeployerBadPort() {
+ try {
+ final String[] eventArgs =
+ { "localhost", "aport", "afile" };
+
+ BatchDeployer.main(eventArgs);
+ fail("test should throw an exception");
+ } catch (Exception exc) {
+ assertEquals("argument port is invalid", exc.getMessage().substring(0, 24));
+ }
+ }
+
+ @Test
+ public void testBatchDeployerOk() {
+ try {
+ final String[] eventArgs =
+ { "Host", "43443", "src/test/resources/models/SamplePolicyModelJAVASCRIPT.json" };
+
+ BatchDeployer.main(eventArgs);
+ } catch (Exception exc) {
+ assertEquals("model deployment failed on parameters Host 43443", exc.getMessage());
+ }
+ }
+
+ @Test
+ public void testBatchDeployerDeployString() {
+ final ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+
+ BatchDeployer deployer = new BatchDeployer("localhost", 12345, new PrintStream(baosOut, true));
+ deployer.getEngineServiceFacade().setDeploymentClient(new DummyDeploymentClient("aHost", 54553));
+
+ try {
+ deployer.init();
+ } catch (ApexDeploymentException ade) {
+ assertEquals("model deployment failed on parameters localhost 12345 true", ade.getMessage());
+ }
+
+ try {
+ deployer.init();
+ } catch (ApexDeploymentException ade) {
+ ade.printStackTrace();
+ fail("test should not throw an exception");
+ }
+
+ try {
+ deployer.deployModel("src/test/resources/models/SamplePolicyModelJAVASCRIPT.json", false, false);
+ } catch (ApexException ade) {
+ assertEquals("could not deploy apex model from src/test/resources/models/SamplePolicyModelJAVASCRIPT.json",
+ ade.getMessage());
+ }
+
+ try {
+ deployer.deployModel("src/test/resources/models/SamplePolicyModelJAVASCRIPT.json", false, false);
+ } catch (ApexException ade) {
+ fail("test should not throw an exception");
+ }
+
+ deployer.close();
+ }
+
+ @Test
+ public void testBatchDeployerStream() throws ApexModelException, FileNotFoundException {
+
+ final ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+
+ BatchDeployer deployer = new BatchDeployer("localhost", 12345, new PrintStream(baosOut, true));
+ deployer.getEngineServiceFacade().setDeploymentClient(new DummyDeploymentClient("aHost", 54553));
+
+ try {
+ deployer.init();
+ } catch (ApexDeploymentException ade) {
+ assertEquals("model deployment failed on parameters localhost 12345 true", ade.getMessage());
+ }
+
+ try {
+ deployer.init();
+ } catch (ApexDeploymentException ade) {
+ ade.printStackTrace();
+ fail("test should not throw an exception");
+ }
+
+ final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class);
+ modelReader.setValidateFlag(false);
+ final AxPolicyModel apexPolicyModel = modelReader.read(
+ new FileInputStream(new File("src/test/resources/models/SamplePolicyModelJAVASCRIPT.json")));
+
+ try {
+ deployer.deployModel(apexPolicyModel, false, false);
+ } catch (ApexException ade) {
+ assertEquals("failed response Operation failed received from serverlocalhost:12345", ade.getMessage());
+ }
+
+ try {
+ deployer.deployModel(apexPolicyModel, false, false);
+ } catch (ApexException ade) {
+ fail("test should not throw an exception");
+ }
+
+ deployer.close();
+ }
+
+ @Test
+ public void testBatchDeployerUninitialized() {
+ final ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+
+ BatchDeployer deployer = new BatchDeployer("localhost", 12345, new PrintStream(baosOut, true));
+ deployer.getEngineServiceFacade().setDeploymentClient(new DummyDeploymentClient("aHost", 54553));
+
+ try {
+ deployer.deployModel("src/test/resources/models/SamplePolicyModelJAVASCRIPT.json", false, false);
+ fail("test should throw an exception");
+ } catch (ApexException ade) {
+ assertEquals("cound not deploy apex model, deployer is not initialized", ade.getMessage());
+ }
+
+ try {
+ deployer.deployModel("src/test/resources/models/SamplePolicyModelJAVASCRIPT.json", false, false);
+ fail("test should throw an exception");
+ } catch (ApexException ade) {
+ assertEquals("cound not deploy apex model, deployer is not initialized", ade.getMessage());
+ }
+
+ deployer.close();
+ }
+
+ @Test
+ public void testBatchDeployerStreamUninitialized() throws ApexModelException, FileNotFoundException {
+ final ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+
+ BatchDeployer deployer = new BatchDeployer("localhost", 12345, new PrintStream(baosOut, true));
+ deployer.getEngineServiceFacade().setDeploymentClient(new DummyDeploymentClient("aHost", 54553));
+
+ final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class);
+ modelReader.setValidateFlag(false);
+ final AxPolicyModel apexPolicyModel = modelReader.read(
+ new FileInputStream(new File("src/test/resources/models/SamplePolicyModelJAVASCRIPT.json")));
+
+ try {
+ deployer.deployModel(apexPolicyModel, false, false);
+ fail("test should throw an exception");
+ } catch (ApexException ade) {
+ assertEquals("failed response Operation failed received from serverlocalhost:12345", ade.getMessage());
+ }
+
+ deployer.close();
+ }
+}
diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java
new file mode 100644
index 000000000..d37bf3435
--- /dev/null
+++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/DummyDeploymentClient.java
@@ -0,0 +1,222 @@
+/*-
+ * ============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.core.deployment;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
+
+import org.onap.policy.apex.core.infrastructure.threading.ThreadUtilities;
+import org.onap.policy.apex.core.protocols.Message;
+import org.onap.policy.apex.core.protocols.engdep.messages.EngineServiceInfoResponse;
+import org.onap.policy.apex.core.protocols.engdep.messages.GetEngineInfo;
+import org.onap.policy.apex.core.protocols.engdep.messages.GetEngineServiceInfo;
+import org.onap.policy.apex.core.protocols.engdep.messages.GetEngineStatus;
+import org.onap.policy.apex.core.protocols.engdep.messages.Response;
+import org.onap.policy.apex.core.protocols.engdep.messages.StartEngine;
+import org.onap.policy.apex.core.protocols.engdep.messages.StartPeriodicEvents;
+import org.onap.policy.apex.core.protocols.engdep.messages.StopEngine;
+import org.onap.policy.apex.core.protocols.engdep.messages.StopPeriodicEvents;
+import org.onap.policy.apex.core.protocols.engdep.messages.UpdateModel;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+import org.onap.policy.apex.model.utilities.TextFileUtils;
+
+/**
+ * Dummy deployment client.
+ */
+public class DummyDeploymentClient extends DeploymentClient implements Runnable {
+ private static final AxArtifactKey MODEL_KEY = new AxArtifactKey("Model", "0.0.1");
+ private static final AxArtifactKey ENGINE_KEY = new AxArtifactKey("Engine", "0.0.1");
+ private static final AxArtifactKey ENGINE_SERVICE_KEY = new AxArtifactKey("EngineService", "0.0.1");
+
+ private Thread thisThread;
+
+ private final BlockingQueue<Message> receiveQueue = new LinkedBlockingQueue<>();
+
+ private boolean started = false;
+
+ private boolean initSuccessful = false;
+ private boolean deployModelSuccessful = false;
+ private boolean startEngineSuccessful = false;
+ private boolean stopEngineSuccessful = false;
+ private boolean startPeriodicSuccessful = false;
+ private boolean stopPeriodicSuccessful = false;
+ private boolean statusSuccessful = false;
+ private boolean infoSuccessful = false;
+
+ public DummyDeploymentClient(String host, int port) {
+ super(host, port);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void run() {
+ // Set up the thread name
+ thisThread = Thread.currentThread();
+ thisThread.setName(DeploymentClient.class.getName() + "-" + getHost() + ":" + getPort());
+
+ started = true;
+
+ // Loop forever, sending messages as they appear on the queue
+ while (started && !thisThread.isInterrupted()) {
+ ThreadUtilities.sleep(50);
+ }
+
+ // Thread has been interrupted
+ thisThread = null;
+ started = false;
+ }
+
+ /**
+ * Send an EngDep message to the Apex server.
+ *
+ * @param message the message to send to the Apex server
+ */
+ public void sendMessage(final Message message) {
+ if (message instanceof GetEngineServiceInfo) {
+ handleEngineServiceInfo(message);
+ } else if (message instanceof UpdateModel) {
+ deployModelSuccessful = handleAndReturnMessage(message, deployModelSuccessful);
+ } else if (message instanceof StartEngine) {
+ startEngineSuccessful = handleAndReturnMessage(message, startEngineSuccessful);
+ } else if (message instanceof StopEngine) {
+ stopEngineSuccessful = handleAndReturnMessage(message, stopEngineSuccessful);
+ } else if (message instanceof StartPeriodicEvents) {
+ startPeriodicSuccessful = handleAndReturnMessage(message, startPeriodicSuccessful);
+ } else if (message instanceof StopPeriodicEvents) {
+ stopPeriodicSuccessful = handleAndReturnMessage(message, stopPeriodicSuccessful);
+ } else if (message instanceof GetEngineStatus) {
+ statusSuccessful = handleAndReturnEngineStatus(message, statusSuccessful);
+ } else if (message instanceof GetEngineInfo) {
+ infoSuccessful = handleAndReturnMessage(message, infoSuccessful);
+ }
+ }
+
+ /**
+ * Handle the EngineServiceInfo message.
+ *
+ * @param message the EngineServiceInfo message
+ */
+ private void handleEngineServiceInfo(final Message message) {
+ EngineServiceInfoResponse infoResponse = new EngineServiceInfoResponse(ENGINE_KEY, initSuccessful, message);
+ infoResponse.setApexModelKey(MODEL_KEY);
+
+ List<AxArtifactKey> engineKeyList = new ArrayList<>();
+ engineKeyList.add(ENGINE_KEY);
+ infoResponse.setEngineKeyArray(engineKeyList);
+
+ infoResponse.setEngineServiceKey(ENGINE_SERVICE_KEY);
+
+ receiveQueue.add(infoResponse);
+
+ initSuccessful = !initSuccessful;
+ }
+
+ /**
+ * Handle and return the response to the engine status message.
+ *
+ * @param message the incoming status message
+ * @param successFlag true if the result should be successful
+ * @return
+ */
+ private boolean handleAndReturnEngineStatus(Message message, boolean successFlag) {
+ if ("DoNotRespond".equals(message.getTarget().getName())) {
+ return !successFlag;
+ }
+
+ if ("ReturnBadMessage".equals(message.getTarget().getName())) {
+ receiveQueue.add(message);
+ return !successFlag;
+ }
+
+ if ("ReturnBadResponse".equals(message.getTarget().getName())) {
+ Response badResponse = new Response(ENGINE_KEY, successFlag,new StartEngine(message.getTarget()));
+ receiveQueue.add(badResponse);
+ return !successFlag;
+ }
+
+ Response response = new Response(ENGINE_KEY, successFlag, message);
+
+ if (successFlag) {
+ try {
+ response.setMessageData(TextFileUtils
+ .getTextFileAsString("src/test/resources/models/SamplePolicyModelJAVASCRIPT.json"));
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ } else {
+ response.setMessageData("Operation failed");
+ }
+
+ receiveQueue.add(response);
+ return !successFlag;
+ }
+
+ /**
+ * Handle and return a message.
+ *
+ * @param message the message
+ */
+ private boolean handleAndReturnMessage(final Message message, final boolean successFlag) {
+ Response response = new Response(ENGINE_KEY, successFlag, message);
+
+ if (successFlag) {
+ response.setMessageData("Operation was successful");
+ } else {
+ response.setMessageData("Operation failed");
+ }
+
+ receiveQueue.add(response);
+ return !successFlag;
+ }
+
+ /**
+ * Stop the deployment client.
+ */
+ public void stopClient() {
+ if (thisThread != null) {
+ thisThread.interrupt();
+ }
+ started = false;
+ }
+
+ /**
+ * Checks if the client thread is started.
+ *
+ * @return true, if the client thread is started
+ */
+ public boolean isStarted() {
+ return started;
+ }
+
+ /**
+ * Allows users of this class to get a reference to the receive queue to receove messages.
+ *
+ * @return the receive queue
+ */
+ public BlockingQueue<Message> getReceiveQueue() {
+ return receiveQueue;
+ }
+}
diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java
new file mode 100644
index 000000000..414bd4144
--- /dev/null
+++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/EngineServiceFacadeTest.java
@@ -0,0 +1,214 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2018 Ericsson. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.policy.apex.core.deployment;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import org.junit.Test;
+import org.onap.policy.apex.model.basicmodel.concepts.AxArtifactKey;
+
+/**
+ * Test the deployment web socket client.
+ */
+public class EngineServiceFacadeTest {
+ @Test
+ public void testEngineServiceFacade() throws Exception {
+ EngineServiceFacade facade = new EngineServiceFacade("localhost", 51273);
+
+ facade.setDeploymentClient(new DummyDeploymentClient("localhost", 51273));
+
+ // First init should fail
+ facade.init();
+
+ assertNull(facade.getKey());
+ assertNull(facade.getApexModelKey());
+ assertNull(facade.getEngineKeyArray());
+
+ try {
+ facade.deployModel("src/test/resources/models/SamplePolicyModelJAVASCRIPT.json", false, false);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("cound not deploy apex model, deployer is not initialized", ade.getMessage());
+ }
+
+ // Second init should work
+ facade.init();
+
+ assertEquals("EngineService:0.0.1", facade.getKey().getId());
+ assertEquals("Model:0.0.1", facade.getApexModelKey().getId());
+ assertEquals("Engine:0.0.1", facade.getEngineKeyArray()[0].getId());
+
+ try {
+ facade.deployModel("src/test/resources/models/NonExistantModel.json", false, false);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("cound not create apex model, could not read from file "
+ + "src/test/resources/models/NonExistantModel.json", ade.getMessage());
+ }
+
+ try {
+ facade.deployModel("src/test/resources/models/JunkModel.json", false, false);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("could not deploy apex model from src/test/resources/models/JunkModel.json", ade.getMessage());
+ }
+
+ InputStream badStream = new ByteArrayInputStream("".getBytes());
+ try {
+ facade.deployModel("MyModel", badStream, false, false);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("format of input for Apex concept is neither JSON nor XML", ade.getMessage());
+ }
+
+ InputStream closedStream = new ByteArrayInputStream("".getBytes());
+ closedStream.close();
+ try {
+ facade.deployModel("MyModel", closedStream, false, false);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("format of input for Apex concept is neither JSON nor XML", ade.getMessage());
+ }
+
+ try {
+ facade.deployModel("src/test/resources/models/SamplePolicyModelJAVASCRIPT.json", false, false);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("could not deploy apex model from src/test/resources/models/SamplePolicyModelJAVASCRIPT.json",
+ ade.getMessage());
+ }
+
+ try {
+ facade.deployModel("src/test/resources/models/SamplePolicyModelJAVASCRIPT.json", false, false);
+ } catch (final Exception ade) {
+ fail("test should not throw an exception here");
+ }
+
+ try {
+ facade.startEngine(facade.getEngineKeyArray()[0]);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("failed response Operation failed received from serverlocalhost:51273", ade.getMessage());
+ }
+
+ try {
+ facade.startEngine(facade.getEngineKeyArray()[0]);
+ } catch (final Exception ade) {
+ fail("test should not throw an exception here");
+ }
+
+ try {
+ facade.stopEngine(facade.getEngineKeyArray()[0]);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("failed response Operation failed received from serverlocalhost:51273", ade.getMessage());
+ }
+
+ try {
+ facade.stopEngine(facade.getEngineKeyArray()[0]);
+ } catch (final Exception ade) {
+ fail("test should not throw an exception here");
+ }
+
+ try {
+ facade.startPerioidicEvents(facade.getEngineKeyArray()[0], 1000);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("failed response Operation failed received from serverlocalhost:51273", ade.getMessage());
+ }
+
+ try {
+ facade.startPerioidicEvents(facade.getEngineKeyArray()[0], 1000);
+ } catch (final Exception ade) {
+ fail("test should not throw an exception here");
+ }
+
+ try {
+ facade.stopPerioidicEvents(facade.getEngineKeyArray()[0]);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("failed response Operation failed received from serverlocalhost:51273", ade.getMessage());
+ }
+
+ try {
+ facade.stopPerioidicEvents(facade.getEngineKeyArray()[0]);
+ } catch (final Exception ade) {
+ fail("test should not throw an exception here");
+ }
+
+ try {
+ facade.getEngineStatus(facade.getEngineKeyArray()[0]);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("failed response Operation failed received from serverlocalhost:51273", ade.getMessage());
+ }
+
+ try {
+ facade.getEngineStatus(facade.getEngineKeyArray()[0]);
+ } catch (final Exception ade) {
+ fail("test should not throw an exception here");
+ }
+
+ try {
+ facade.getEngineInfo(facade.getEngineKeyArray()[0]);
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("failed response Operation failed received from serverlocalhost:51273", ade.getMessage());
+ }
+
+ try {
+ facade.getEngineInfo(facade.getEngineKeyArray()[0]);
+ } catch (final Exception ade) {
+ fail("test should not throw an exception here");
+ }
+
+ try {
+ facade.getEngineStatus(new AxArtifactKey("ReturnBadMessage", "0.0.1"));
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("response received from server is of incorrect type "
+ + "org.onap.policy.apex.core.protocols.engdep.messages.GetEngineStatus, should be of type "
+ + "org.onap.policy.apex.core.protocols.engdep.messages.Response", ade.getMessage());
+ }
+
+ try {
+ facade.getEngineStatus(new AxArtifactKey("ReturnBadResponse", "0.0.1"));
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("response received is not correct response to sent message GET_ENGINE_STATUS",
+ ade.getMessage());
+ }
+
+ try {
+ facade.getEngineStatus(new AxArtifactKey("DoNotRespond", "0.0.1"));
+ fail("test should throw an exception here");
+ } catch (final Exception ade) {
+ assertEquals("no response received to sent message GET_ENGINE_STATUS", ade.getMessage());
+ }
+
+ facade.close();
+ }
+}
diff --git a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/PeriodicEventManagerTest.java b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/PeriodicEventManagerTest.java
index fb204c3a3..816c528bb 100644
--- a/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/PeriodicEventManagerTest.java
+++ b/core/core-deployment/src/test/java/org/onap/policy/apex/core/deployment/PeriodicEventManagerTest.java
@@ -36,82 +36,225 @@ import org.junit.Test;
*/
public class PeriodicEventManagerTest {
@Test
- public void testPeroidicEventManager() {
+ public void testPeroidicEventManagerBad() {
try {
- final String[] EventArgs =
+ final String[] eventArgs =
{ "-h" };
- PeriodicEventManager.main(EventArgs);
+ PeriodicEventManager.main(eventArgs);
+ fail("test should throw an exception");
} catch (Exception exc) {
- fail("test should not throw an exception");
+ assertEquals("invalid arguments: [-h]", exc.getMessage().substring(0, 23));
+ }
+ }
+
+ @Test
+ public void testPeroidicEventManagerOk() {
+ try {
+ final String[] eventArgs =
+ { "Host", "43443", "start", "1000" };
+
+ PeriodicEventManager.main(eventArgs);
+ fail("test should throw an exception");
+ } catch (Exception exc) {
+ assertEquals("periodic event setting failed on parameters Host 43443 true", exc.getMessage());
}
}
@Test
public void testPeroidicEventManagerNoOptions() {
- final String[] EventArgs = new String[]
+ final String[] eventArgs = new String[]
{};
- final String outputString = runPeriodicEventManager(EventArgs);
+ final String outputString = testPeriodicEventManagerConstructor(eventArgs);
- assertTrue(outputString
- .contains("usage: Deployer <server address> <port address> <start/stop> <periods in ms>"));
+ assertTrue(outputString.contains(
+ "usage: PeriodicEventManager <server address> <port address> <start/stop> <periods in ms>"));
}
@Test
public void testPeroidicEventManagerBadOptions() {
- final String[] EventArgs =
+ final String[] eventArgs =
{ "-zabbu" };
- final String outputString = runPeriodicEventManager(EventArgs);
+ final String outputString = testPeriodicEventManagerConstructor(eventArgs);
- assertTrue(outputString
- .contains("usage: Deployer <server address> <port address> <start/stop> <periods in ms>"));
+ assertTrue(outputString.contains(
+ "usage: PeriodicEventManager <server address> <port address> <start/stop> <periods in ms>"));
}
@Test
public void testPeroidicEventManagerNonNumeric3() {
- final String[] EventArgs =
+ final String[] eventArgs =
{ "aaa", "bbb", "ccc", "ddd" };
+ final String outputString = testPeriodicEventManagerConstructor(eventArgs);
+
+ assertTrue(outputString.contains("argument port is invalid"));
+ }
+
+ @Test
+ public void testPeroidicEventManagerNonNumeric2() {
+ final String[] eventArgs =
+ { "aaa", "12345", "start", "stop" };
+
+ final String outputString = testPeriodicEventManagerConstructor(eventArgs);
+
+ assertTrue(outputString.contains("argument period is invalid"));
+ }
+
+ @Test
+ public void testPeroidicEventManagerNotStartStop() {
+ final String[] eventArgs =
+ { "aaa", "12345", "1000", "1000" };
+
+ final String outputString = testPeriodicEventManagerConstructor(eventArgs);
+
+ assertTrue(outputString.contains("argument 1000 must be \"start\" or \"stop\""));
+ }
+
+ @Test
+ public void testPeroidicEventManagerStart() {
+ final String[] eventArgs =
+ { "localhost", "12345", "start", "1000" };
+
+ final ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+
+ PeriodicEventManager peManager = null;
+ try {
+ peManager = new PeriodicEventManager(eventArgs, new PrintStream(baosOut, true));
+ peManager.getEngineServiceFacade().setDeploymentClient(new DummyDeploymentClient("aHost", 54553));
+ } catch (ApexDeploymentException ade) {
+ fail("test should not throw an exception");
+ }
+
+ try {
+ peManager.init();
+ } catch (ApexDeploymentException ade) {
+ assertEquals("model deployment failed on parameters localhost 12345 true", ade.getMessage());
+ }
+
try {
- runPeriodicEventManager(EventArgs);
- } catch (NumberFormatException nfe) {
- assertEquals("For input string: \"bbb\"", nfe.getMessage());
+ peManager.init();
+ } catch (ApexDeploymentException ade) {
+ ade.printStackTrace();
+ fail("test should not throw an exception");
+ }
+
+ try {
+ peManager.runCommand();
+ } catch (ApexDeploymentException ade) {
+ assertEquals("failed response Operation failed received from serverlocalhost:12345", ade.getMessage());
}
+
+ try {
+ peManager.runCommand();
+ } catch (ApexDeploymentException ade) {
+ fail("test should not throw an exception");
+ }
+
+ peManager.close();
}
@Test
- public void testPeroidicEventManagerNonNumeric2() {
- final String[] EventArgs =
- { "aaa", "12345", "ccc", "1000" };
+ public void testPeroidicEventManagerStop() {
+ final String[] eventArgs =
+ { "localhost", "12345", "stop", "1000" };
+
+ final ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+
+ PeriodicEventManager peManager = null;
+ try {
+ peManager = new PeriodicEventManager(eventArgs, new PrintStream(baosOut, true));
+ peManager.getEngineServiceFacade().setDeploymentClient(new DummyDeploymentClient("aHost", 54553));
+ } catch (ApexDeploymentException ade) {
+ fail("test should not throw an exception");
+ }
try {
- runPeriodicEventManager(EventArgs);
- } catch (NumberFormatException nfe) {
- assertEquals("For input string: \"ddd\"", nfe.getMessage());
+ peManager.init();
+ } catch (ApexDeploymentException ade) {
+ assertEquals("model deployment failed on parameters localhost 12345 true", ade.getMessage());
+ }
+
+ try {
+ peManager.init();
+ } catch (ApexDeploymentException ade) {
+ ade.printStackTrace();
+ fail("test should not throw an exception");
+ }
+
+ try {
+ peManager.runCommand();
+ } catch (ApexDeploymentException ade) {
+ assertEquals("failed response Operation failed received from serverlocalhost:12345", ade.getMessage());
}
+
+ try {
+ peManager.runCommand();
+ } catch (ApexDeploymentException ade) {
+ fail("test should not throw an exception");
+ }
+
+ peManager.close();
}
@Test
- public void testPeroidicEventManagerStart() {
- final String[] EventArgs =
+ public void testPeroidicEventManagerStartUninitialized() {
+ final String[] eventArgs =
{ "localhost", "12345", "start", "1000" };
- final String outputString = runPeriodicEventManager(EventArgs);
+ final ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+
+ PeriodicEventManager peManager = null;
+ try {
+ peManager = new PeriodicEventManager(eventArgs, new PrintStream(baosOut, true));
+ peManager.getEngineServiceFacade().setDeploymentClient(new DummyDeploymentClient("aHost", 54553));
+ } catch (ApexDeploymentException ade) {
+ fail("test should not throw an exception");
+ }
- assertTrue(outputString.contains("\n*** StdErr ***\n\n*** exception ***"));
+ try {
+ peManager.runCommand();
+ fail("test should throw an exception");
+ } catch (ApexDeploymentException ade) {
+ assertEquals("connection to apex is not initialized", ade.getMessage());
+ }
+
+ try {
+ peManager.runCommand();
+ fail("test should throw an exception");
+ } catch (ApexDeploymentException ade) {
+ assertEquals("connection to apex is not initialized", ade.getMessage());
+ ade.printStackTrace();
+ }
+
+ peManager.close();
}
-
@Test
- public void testPeroidicEventManagerStop() {
- final String[] EventArgs =
+ public void testPeroidicEventManagerStopUninitialized() {
+ final String[] eventArgs =
{ "localhost", "12345", "stop", "1000" };
- final String outputString = runPeriodicEventManager(EventArgs);
+ final ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+
+ PeriodicEventManager peManager = null;
+ try {
+ peManager = new PeriodicEventManager(eventArgs, new PrintStream(baosOut, true));
+ peManager.getEngineServiceFacade().setDeploymentClient(new DummyDeploymentClient("aHost", 54553));
+ } catch (ApexDeploymentException ade) {
+ fail("test should not throw an exception");
+ }
- assertTrue(outputString.contains("\n*** StdErr ***\n\n*** exception ***"));
+ try {
+ peManager.runCommand();
+ fail("test should throw an exception");
+ } catch (ApexDeploymentException ade) {
+ assertEquals("connection to apex is not initialized", ade.getMessage());
+ }
+
+ peManager.close();
}
/**
@@ -120,15 +263,14 @@ public class PeriodicEventManagerTest {
* @param eventArgs the command arguments
* @return a string containing the command output
*/
- private String runPeriodicEventManager(final String[] eventArgs) {
+ private String testPeriodicEventManagerConstructor(final String[] eventArgs) {
final ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
final ByteArrayOutputStream baosErr = new ByteArrayOutputStream();
- PeriodicEventManager peManager = new PeriodicEventManager(eventArgs, new PrintStream(baosOut, true));
-
String exceptionString = "";
try {
- peManager.init();
+ PeriodicEventManager peManager = new PeriodicEventManager(eventArgs, new PrintStream(baosOut, true));
+ peManager.getEngineServiceFacade().setDeploymentClient(new DummyDeploymentClient("aHost", 54553));
} catch (ApexDeploymentException ade) {
exceptionString = ade.getCascadedMessage();
}
diff --git a/core/core-deployment/src/test/resources/models/JunkModel.json b/core/core-deployment/src/test/resources/models/JunkModel.json
new file mode 100644
index 000000000..7a73a41bf
--- /dev/null
+++ b/core/core-deployment/src/test/resources/models/JunkModel.json
@@ -0,0 +1,2 @@
+{
+} \ No newline at end of file
diff --git a/core/core-deployment/src/test/resources/models/SamplePolicyModelJAVASCRIPT.json b/core/core-deployment/src/test/resources/models/SamplePolicyModelJAVASCRIPT.json
new file mode 100644
index 000000000..2dc4bcd3f
--- /dev/null
+++ b/core/core-deployment/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