diff options
author | liamfallon <liam.fallon@ericsson.com> | 2018-11-06 12:02:46 +0000 |
---|---|---|
committer | Liam Fallon <liam.fallon@ericsson.com> | 2018-11-08 17:54:13 +0000 |
commit | cad452cdb6d999f822fe11dc4fdd232cce30ff6a (patch) | |
tree | a2fdfb5a689d7c2a6f045424a9f078a44ea36f4d /services/services-engine/src/test | |
parent | ad6efc439440e991df30694ef2da17d640f20bdf (diff) |
Refactor unit test data
There were many copies of test policies and examples
strewn through the Apex unit tests. This change cleans
up the unit tests so that a single version of all example
policies is used in all tests.
Also added a new relative file root command line parameter
to Apex to allow the root of relative paths in configuration
files to be set.
Apologies for the size of this review but unfortunately
all of this must be done in one shot.
Issue-ID: POLICY-1252
Change-Id: Ibbb18fbf18e3897a1c61301d0a65e62bc643a0e9
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
(cherry picked from commit 53d8916cc60d97e2ce7ae345f8cc25f5602567da)
Diffstat (limited to 'services/services-engine/src/test')
63 files changed, 1414 insertions, 15259 deletions
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/JsonEventGenerator.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/JsonEventGenerator.java index 1ba901090..c2dbd48d6 100644 --- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/JsonEventGenerator.java +++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/JsonEventGenerator.java @@ -20,60 +20,27 @@ package org.onap.policy.apex.service.engine.event; -import java.util.Random; - /** * This class generates JSON event used for the test cases. * * @author Liam Fallon (liam.fallon@ericsson.com) */ public class JsonEventGenerator { - private static int nextEventNo = 0; - - /** - * Json events. - * - * @param eventCount the event count - * @return the string - */ - public static String jsonEvents(final int eventCount) { - final StringBuilder builder = new StringBuilder(); - - for (int i = 0; i < eventCount; i++) { - if (i > 0) { - builder.append("\n"); - } - builder.append(jsonEvent()); - } - - return builder.toString(); - } - /** * Json event. * * @return the string */ public static String jsonEvent() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100"); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"name\": \"" + eventName + "\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12345\n"); builder.append("}"); return builder.toString(); @@ -85,25 +52,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventNoName() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100"); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"namez\": \"" + eventName + "\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"namez\": \"BasicEvent\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12346\n"); builder.append("}"); return builder.toString(); @@ -115,24 +72,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventBadName() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); builder.append(" \"name\": \"%%%%\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12347\n"); builder.append("}"); return builder.toString(); @@ -144,23 +92,14 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventNoExName() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); builder.append(" \"name\": \"I_DONT_EXIST\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12348\n"); builder.append("}"); return builder.toString(); @@ -172,25 +111,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventNoVersion() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100"); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"name\": \"" + eventName + "\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"versiion\": \"0.0.1\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12349\n"); builder.append("}"); return builder.toString(); @@ -202,25 +131,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventBadVersion() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100"); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"name\": \"" + eventName + "\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"#####\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12350\n"); builder.append("}"); return builder.toString(); @@ -232,24 +151,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventNoExVersion() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"name\": \"Event0000\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"1.2.3\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12351\n"); builder.append("}"); return builder.toString(); @@ -261,25 +171,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventNoNamespace() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100"); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpacee\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"name\": \"" + eventName + "\",\n"); + builder.append(" \"nameSpacee\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12352\n"); builder.append("}"); return builder.toString(); @@ -291,25 +191,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventBadNamespace() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100"); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); builder.append(" \"nameSpace\": \"hello.&&&&\",\n"); - builder.append(" \"name\": \"" + eventName + "\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12353\n"); builder.append("}"); return builder.toString(); @@ -321,24 +211,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventNoExNamespace() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); builder.append(" \"nameSpace\": \"pie.in.the.sky\",\n"); - builder.append(" \"name\": \"Event0000\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12354\n"); builder.append("}"); return builder.toString(); @@ -350,25 +231,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventNoSource() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100"); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"name\": \"" + eventName + "\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"sourcee\": \"test\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12355\n"); builder.append("}"); return builder.toString(); @@ -380,25 +251,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventBadSource() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100"); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"name\": \"" + eventName + "\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"source\": \"%!@**@!\",\n"); builder.append(" \"target\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12356\n"); builder.append("}"); return builder.toString(); @@ -410,25 +271,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventNoTarget() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100"); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"name\": \"" + eventName + "\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"targett\": \"apex\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12357\n"); builder.append("}"); return builder.toString(); @@ -440,25 +291,15 @@ public class JsonEventGenerator { * @return the string */ public static String jsonEventBadTarget() { - final Random rand = new Random(); - final StringBuilder builder = new StringBuilder(); - int nextEventNo = rand.nextInt(2); - final String eventName = (nextEventNo == 0 ? "Event0000" : "Event0100"); - final int nextMatchCase = rand.nextInt(4); - final float nextTestTemperature = rand.nextFloat() * 10000; - builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"name\": \"" + eventName + "\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"KNIO(*S)A(S)D\",\n"); - builder.append(" \"TestSlogan\": \"Test slogan for External Event" + (nextEventNo++) + "\",\n"); - builder.append(" \"TestMatchCase\": " + nextMatchCase + ",\n"); - builder.append(" \"TestTimestamp\": " + System.currentTimeMillis() + ",\n"); - builder.append(" \"TestTemperature\": " + nextTestTemperature + "\n"); + builder.append(" \"intPar\": 12358\n"); builder.append("}"); return builder.toString(); @@ -473,8 +314,8 @@ public class JsonEventGenerator { final StringBuilder builder = new StringBuilder(); builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"name\": \"Event0000\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"apex\"\n"); @@ -492,49 +333,14 @@ public class JsonEventGenerator { final StringBuilder builder = new StringBuilder(); builder.append("{\n"); - builder.append(" \"nameSpace\": \"org.onap.policy.apex.sample.events\",\n"); - builder.append(" \"name\": \"Event0000\",\n"); + builder.append(" \"nameSpace\": \"org.onap.policy.apex.events\",\n"); + builder.append(" \"name\": \"BasicEvent\",\n"); builder.append(" \"version\": \"0.0.1\",\n"); builder.append(" \"source\": \"test\",\n"); builder.append(" \"target\": \"Apex\",\n"); - builder.append(" \"TestSlogan\": null,\n"); - builder.append(" \"TestMatchCase\": -1,\n"); - builder.append(" \"TestTimestamp\": -1,\n"); - builder.append(" \"TestTemperature\": -1.0\n"); + builder.append(" \"intPar\": -1\n"); builder.append("}"); return builder.toString(); } - - /** - * The main method. - * - * @param args the arguments - */ - public static void main(final String[] args) { - if (args.length != 1) { - System.err.println("usage EventGenerator #events"); - return; - } - - int eventCount = 0; - try { - eventCount = Integer.parseInt(args[0]); - } catch (final Exception e) { - System.err.println("usage EventGenerator #events"); - e.printStackTrace(); - return; - } - - System.out.println(jsonEvents(eventCount)); - } - - /** - * Gets the next event no. - * - * @return the next event no - */ - public static int getNextEventNo() { - return nextEventNo; - } } diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJsonEventHandler.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJsonEventHandler.java index 6e462a3e1..fa399e8c0 100644 --- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJsonEventHandler.java +++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/event/TestJsonEventHandler.java @@ -22,12 +22,12 @@ package org.onap.policy.apex.service.engine.event; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.io.ByteArrayInputStream; import java.io.IOException; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -68,7 +68,7 @@ public class TestJsonEventHandler { @BeforeClass public static void setupEventModel() throws IOException, ApexModelException { final String policyModelString = TextFileUtils - .getTextFileAsString("src/test/resources/policymodels/SamplePolicyModelMVEL.json"); + .getTextFileAsString("src/test/resources/policymodels/SmallModel.json"); final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<AxPolicyModel>(AxPolicyModel.class); final AxPolicyModel apexPolicyModel = modelReader.read(new ByteArrayInputStream(policyModelString.getBytes())); @@ -118,15 +118,15 @@ public class TestJsonEventHandler { logger.debug(apexEvent.toString()); - assertTrue(apexEvent.getName().equals("Event0000") || apexEvent.getName().equals("Event0100")); - assertTrue(apexEvent.getVersion().equals("0.0.1")); - assertTrue(apexEvent.getNameSpace().equals("org.onap.policy.apex.sample.events")); - assertTrue(apexEvent.getSource().equals("test")); - assertTrue(apexEvent.getTarget().equals("apex")); - assertTrue(apexEvent.get("TestSlogan").toString().startsWith("Test slogan for External Event")); + assertEquals("BasicEvent", apexEvent.getName()); + assertEquals("0.0.1", apexEvent.getVersion()); + assertEquals("org.onap.policy.apex.events", apexEvent.getNameSpace()); + assertEquals("test", apexEvent.getSource()); + assertEquals("apex", apexEvent.getTarget()); + assertEquals(12345, apexEvent.get("intPar")); final Object testMatchCaseSelected = apexEvent.get("TestMatchCaseSelected"); - assertTrue(testMatchCaseSelected == null); + assertNull(testMatchCaseSelected); } } catch (final Exception e) { e.printStackTrace(); @@ -162,8 +162,8 @@ public class TestJsonEventHandler { jsonEventConverter.toApexEvent(null, apexEventJsonStringIn); fail("Test should throw an exception here"); } catch (final ApexEventException e) { - assertTrue(e.getMessage().startsWith( - "Failed to unmarshal JSON event: field \"name\" with value \"%%%%\" is invalid")); + assertEquals("Failed to unmarshal JSON event: field \"name\" with value \"%%%%\" is invalid", + e.getMessage().substring(0, 73)); } try { @@ -184,8 +184,8 @@ public class TestJsonEventHandler { jsonEventConverter.toApexEvent(null, apexEventJsonStringIn); fail("Test should throw an exception here"); } catch (final ApexEventException e) { - assertTrue(e.getMessage().startsWith( - "Failed to unmarshal JSON event: field \"version\" with value \"#####\" is invalid")); + assertEquals("Failed to unmarshal JSON event: field \"version\" with value \"#####\" is invalid", + e.getMessage().substring(0, 77)); } try { @@ -193,22 +193,23 @@ public class TestJsonEventHandler { jsonEventConverter.toApexEvent(null, apexEventJsonStringIn); fail("Test should throw an exception here"); } catch (final ApexEventException e) { - assertTrue(e.getMessage() - .startsWith("Failed to unmarshal JSON event: an event definition for an event named " - + "\"Event0000\" with version \"1.2.3\" not found in Apex model")); + assertEquals("Failed to unmarshal JSON event: an event definition for an event named " + + "\"BasicEvent\" with version \"1.2.3\" not found in Apex model", + e.getMessage().substring(0, 128)); } apexEventJsonStringIn = JsonEventGenerator.jsonEventNoNamespace(); event = jsonEventConverter.toApexEvent(null, apexEventJsonStringIn).get(0); - assertEquals("org.onap.policy.apex.sample.events", event.getNameSpace()); + assertEquals("org.onap.policy.apex.events", event.getNameSpace()); try { apexEventJsonStringIn = JsonEventGenerator.jsonEventBadNamespace(); jsonEventConverter.toApexEvent(null, apexEventJsonStringIn); fail("Test should throw an exception here"); } catch (final ApexEventException e) { - assertTrue(e.getMessage().startsWith("Failed to unmarshal JSON event: field \"nameSpace\" " - + "with value \"hello.&&&&\" is invalid")); + assertEquals("Failed to unmarshal JSON event: " + + "field \"nameSpace\" with value \"hello.&&&&\" is invalid", + e.getMessage().substring(0, 84)); } try { @@ -216,37 +217,36 @@ public class TestJsonEventHandler { jsonEventConverter.toApexEvent(null, apexEventJsonStringIn); fail("Test should throw an exception here"); } catch (final ApexEventException e) { - assertTrue(e.getMessage() - .startsWith("Failed to unmarshal JSON event: namespace \"pie.in.the.sky\" " - + "on event \"Event0000\" does not" - + " match namespace \"org.onap.policy.apex.sample.events\" " - + "for that event in the Apex model")); + assertEquals("Failed to unmarshal JSON event: namespace \"pie.in.the.sky\" " + + "on event \"BasicEvent\" does not" + + " match namespace \"org.onap.policy.apex.events\" " + + "for that event in the Apex model", e.getMessage().substring(0, 168)); } apexEventJsonStringIn = JsonEventGenerator.jsonEventNoSource(); event = jsonEventConverter.toApexEvent(null, apexEventJsonStringIn).get(0); - assertEquals("Outside", event.getSource()); + assertEquals("source", event.getSource()); try { apexEventJsonStringIn = JsonEventGenerator.jsonEventBadSource(); jsonEventConverter.toApexEvent(null, apexEventJsonStringIn); fail("Test should throw an exception here"); } catch (final ApexEventException e) { - assertTrue(e.getMessage().startsWith( - "Failed to unmarshal JSON event: field \"source\" with value \"%!@**@!\" is invalid")); + assertEquals("Failed to unmarshal JSON event: field \"source\" with value \"%!@**@!\" is invalid", + e.getMessage().substring(0, 78)); } apexEventJsonStringIn = JsonEventGenerator.jsonEventNoTarget(); event = jsonEventConverter.toApexEvent(null, apexEventJsonStringIn).get(0); - assertEquals("Match", event.getTarget()); + assertEquals("target", event.getTarget()); try { apexEventJsonStringIn = JsonEventGenerator.jsonEventBadTarget(); jsonEventConverter.toApexEvent(null, apexEventJsonStringIn); fail("Test should throw an exception here"); } catch (final ApexEventException e) { - assertTrue(e.getMessage().startsWith("Failed to unmarshal JSON event: field \"target\" " - + "with value \"KNIO(*S)A(S)D\" is invalid")); + assertEquals("Failed to unmarshal JSON event: field \"target\" with value \"KNIO(*S)A(S)D\" is invalid", + e.getMessage().substring(0, 84)); } try { @@ -254,30 +254,24 @@ public class TestJsonEventHandler { jsonEventConverter.toApexEvent(null, apexEventJsonStringIn); fail("Test should throw an exception here"); } catch (final ApexEventException e) { - assertTrue(e.getMessage().startsWith("Failed to unmarshal JSON event: error parsing Event0000:0.0.1 " - + "event from Json. Field \"TestMatchCase\" is missing, but is mandatory.")); + assertEquals("Failed to unmarshal JSON event: error parsing BasicEvent:0.0.1 " + + "event from Json. Field \"intPar\" is missing, but is mandatory.", + e.getMessage().substring(0, 124)); } apexEventJsonStringIn = JsonEventGenerator.jsonEventNullFields(); event = jsonEventConverter.toApexEvent(null, apexEventJsonStringIn).get(0); assertEquals(null, event.get("TestSlogan")); - assertEquals((byte) -1, event.get("TestMatchCase")); - assertEquals((long) -1, event.get("TestTimestamp")); - assertEquals(-1.0, event.get("TestTemperature")); + assertEquals(-1, event.get("intPar")); // Set the missing fields as optional in the model - final AxEvent eventDefinition = ModelService.getModel(AxEvents.class).get("Event0000"); - eventDefinition.getParameterMap().get("TestSlogan").setOptional(true); - eventDefinition.getParameterMap().get("TestMatchCase").setOptional(true); - eventDefinition.getParameterMap().get("TestTimestamp").setOptional(true); - eventDefinition.getParameterMap().get("TestTemperature").setOptional(true); + final AxEvent eventDefinition = ModelService.getModel(AxEvents.class).get("BasicEvent"); + eventDefinition.getParameterMap().get("intPar").setOptional(true); apexEventJsonStringIn = JsonEventGenerator.jsonEventMissingFields(); event = jsonEventConverter.toApexEvent(null, apexEventJsonStringIn).get(0); assertEquals(null, event.get("TestSlogan")); - assertEquals(null, event.get("TestMatchCase")); - assertEquals(null, event.get("TestTimestamp")); - assertEquals(null, event.get("TestTemperature")); + assertEquals(null, event.get("intPar")); } catch (final Exception e) { e.printStackTrace(); throw new ApexException("Exception reading Apex event JSON file", e); @@ -296,62 +290,23 @@ public class TestJsonEventHandler { jsonEventConverter.init(new JsonEventProtocolParameters()); assertNotNull(jsonEventConverter); - final Date event0000StartTime = new Date(); - final Map<String, Object> event0000DataMap = new HashMap<String, Object>(); - event0000DataMap.put("TestSlogan", "This is a test slogan"); - event0000DataMap.put("TestMatchCase", 12345); - event0000DataMap.put("TestTimestamp", event0000StartTime.getTime()); - event0000DataMap.put("TestTemperature", 34.5445667); + final Map<String, Object> basicEventMap = new HashMap<String, Object>(); + basicEventMap.put("intPar", 12345); - final ApexEvent apexEvent0000 = new ApexEvent("Event0000", "0.0.1", "org.onap.policy.apex.sample.events", - "test", "apex"); - apexEvent0000.putAll(event0000DataMap); + final ApexEvent basicEvent = new ApexEvent("BasicEvent", "0.0.1", "org.onap.policy.apex.events", "test", + "apex"); + basicEvent.putAll(basicEventMap); - final String apexEvent0000JsonString = (String) jsonEventConverter.fromApexEvent(apexEvent0000); + final String apexEvent0000JsonString = (String) jsonEventConverter.fromApexEvent(basicEvent); logger.debug(apexEvent0000JsonString); - assertTrue(apexEvent0000JsonString.contains("\"name\": \"Event0000\"")); + assertTrue(apexEvent0000JsonString.contains("\"name\": \"BasicEvent\"")); assertTrue(apexEvent0000JsonString.contains("\"version\": \"0.0.1\"")); - assertTrue(apexEvent0000JsonString.contains("\"nameSpace\": \"org.onap.policy.apex.sample.events\"")); + assertTrue(apexEvent0000JsonString.contains("\"nameSpace\": \"org.onap.policy.apex.events\"")); assertTrue(apexEvent0000JsonString.contains("\"source\": \"test\"")); assertTrue(apexEvent0000JsonString.contains("\"target\": \"apex\"")); - assertTrue(apexEvent0000JsonString.contains("\"TestSlogan\": \"This is a test slogan\"")); - assertTrue(apexEvent0000JsonString.contains("\"TestMatchCase\": 12345")); - assertTrue(apexEvent0000JsonString.contains("\"TestTimestamp\": " + event0000StartTime.getTime())); - assertTrue(apexEvent0000JsonString.contains("\"TestTemperature\": 34.5445667")); - - final Date event0004StartTime = new Date(1434363272000L); - final Map<String, Object> event0004DataMap = new HashMap<String, Object>(); - event0004DataMap.put("TestSlogan", "Test slogan for External Event"); - event0004DataMap.put("TestMatchCase", new Integer(2)); - event0004DataMap.put("TestTimestamp", new Long(event0004StartTime.getTime())); - event0004DataMap.put("TestTemperature", new Double(1064.43)); - event0004DataMap.put("TestMatchCaseSelected", new Integer(2)); - event0004DataMap.put("TestMatchStateTime", new Long(1434370506078L)); - event0004DataMap.put("TestEstablishCaseSelected", new Integer(0)); - event0004DataMap.put("TestEstablishStateTime", new Long(1434370506085L)); - event0004DataMap.put("TestDecideCaseSelected", new Integer(3)); - event0004DataMap.put("TestDecideStateTime", new Long(1434370506092L)); - event0004DataMap.put("TestActCaseSelected", new Integer(2)); - event0004DataMap.put("TestActStateTime", new Long(1434370506095L)); - - final ApexEvent apexEvent0004 = new ApexEvent("Event0004", "0.0.1", "org.onap.policy.apex.sample.events", - "test", "apex"); - apexEvent0004.putAll(event0004DataMap); - - final String apexEvent0004JsonString = (String) jsonEventConverter.fromApexEvent(apexEvent0004); - - logger.debug(apexEvent0004JsonString); - - assertTrue(apexEvent0004JsonString.contains("\"name\": \"Event0004\"")); - assertTrue(apexEvent0004JsonString.contains("\"version\": \"0.0.1\"")); - assertTrue(apexEvent0004JsonString.contains("\"nameSpace\": \"org.onap.policy.apex.sample.events\"")); - assertTrue(apexEvent0004JsonString.contains("\"source\": \"test\"")); - assertTrue(apexEvent0004JsonString.contains("\"target\": \"apex\"")); - assertTrue(apexEvent0004JsonString.contains("\"TestSlogan\": \"Test slogan for External Event\"")); - assertTrue(apexEvent0004JsonString.contains("1434370506078")); - assertTrue(apexEvent0004JsonString.contains("1064.43")); + assertTrue(apexEvent0000JsonString.contains("\"intPar\": 12345")); } catch (final Exception e) { e.printStackTrace(); throw new ApexException("Exception reading Apex event JSON file", e); diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/TestApexCommandLineArguments.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/TestApexCommandLineArguments.java index 2b8bd6771..c26e4fcb7 100644 --- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/TestApexCommandLineArguments.java +++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/main/TestApexCommandLineArguments.java @@ -24,20 +24,27 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import org.junit.After; import org.junit.Test; import org.onap.policy.apex.model.basicmodel.concepts.ApexException; /** * Test Apex Command Line Arguments. + * * @author Liam Fallon (liam.fallon@ericsson.com) */ public class TestApexCommandLineArguments { + @After + public void clearRelativeFileRoot() { + System.clearProperty("APEX_RELATIVE_FILE_ROOT"); + } @Test public void testCommandLineArguments() { final ApexCommandLineArguments apexArguments = new ApexCommandLineArguments(); - final String[] args00 = {""}; + final String[] args00 = + { "" }; try { apexArguments.parse(args00); apexArguments.validate(); @@ -46,7 +53,8 @@ public class TestApexCommandLineArguments { assertEquals("Apex configuration file was not specified as an argument", e.getMessage()); } - final String[] args01 = {"-h"}; + final String[] args01 = + { "-h" }; try { final String result = apexArguments.parse(args01); assertTrue(result.startsWith("usage: org.onap.policy.apex.service.engine.main.ApexMain [options...]")); @@ -55,7 +63,8 @@ public class TestApexCommandLineArguments { fail("Test should not throw an exception"); } - final String[] args02 = {"-v"}; + final String[] args02 = + { "-v" }; try { final String result = apexArguments.parse(args02); assertTrue(result.startsWith("Apex Adaptive Policy Engine")); @@ -64,7 +73,8 @@ public class TestApexCommandLineArguments { fail("Test should not throw an exception"); } - final String[] args03 = {"-v", "-h"}; + final String[] args03 = + { "-v", "-h" }; try { final String result = apexArguments.parse(args03); assertTrue(result.startsWith("usage: org.onap.policy.apex.service.engine.main.ApexMain [options...]")); @@ -73,7 +83,8 @@ public class TestApexCommandLineArguments { fail("Test should not throw an exception"); } - final String[] args04 = {"-h", "-v"}; + final String[] args04 = + { "-h", "-v" }; try { final String result = apexArguments.parse(args04); assertTrue(result.startsWith("usage: org.onap.policy.apex.service.engine.main.ApexMain [options...]")); @@ -82,14 +93,16 @@ public class TestApexCommandLineArguments { fail("Test should not throw an exception"); } - final String[] args05 = {"-a"}; + final String[] args05 = + { "-a" }; try { apexArguments.parse(args05); } catch (final ApexException e) { assertEquals("invalid command line arguments specified : Unrecognized option: -a", e.getMessage()); } - final String[] args06 = {"-c", "hello", "-m", "goodbye", "-h", "-v"}; + final String[] args06 = + { "-c", "hello", "-m", "goodbye", "-h", "-v" }; try { final String result = apexArguments.parse(args06); assertTrue(result.startsWith("usage: org.onap.policy.apex.service.engine.main.ApexMain [options...]")); @@ -97,13 +110,14 @@ public class TestApexCommandLineArguments { assertEquals("invalid command line arguments specified : Unrecognized option: -a", e.getMessage()); } - final String[] args07 = {"-c", "hello", "-m", "goodbye", "-h", "aaa"}; + final String[] args07 = + { "-c", "hello", "-m", "goodbye", "-h", "aaa" }; try { final String result = apexArguments.parse(args07); assertTrue(result.startsWith("usage: org.onap.policy.apex.service.engine.main.ApexMain [options...]")); } catch (final ApexException e) { assertEquals("too many command line arguments specified : [-c, hello, -m, goodbye, -h, aaa]", - e.getMessage()); + e.getMessage()); } } @@ -111,7 +125,8 @@ public class TestApexCommandLineArguments { public void testCommandLineFileParameters() { final ApexCommandLineArguments apexArguments = new ApexCommandLineArguments(); - final String[] args00 = {"-c", "zooby"}; + final String[] args00 = + { "-c", "zooby" }; try { apexArguments.parse(args00); apexArguments.validate(); @@ -120,7 +135,8 @@ public class TestApexCommandLineArguments { assertEquals("Apex configuration file \"zooby\" does not exist", e.getMessage()); } - final String[] args01 = {"-c"}; + final String[] args01 = + { "-c" }; try { apexArguments.parse(args01); apexArguments.validate(); @@ -129,7 +145,8 @@ public class TestApexCommandLineArguments { assertEquals("invalid command line arguments specified : Missing argument for option: c", e.getMessage()); } - final String[] args02 = {"-c", "src/test/resources/parameters/goodParams.json"}; + final String[] args02 = + { "-c", "src/test/resources/parameters/goodParams.json" }; try { apexArguments.parse(args02); apexArguments.validate(); @@ -138,7 +155,8 @@ public class TestApexCommandLineArguments { fail("Test should not throw an exception"); } - final String[] args03 = {"-c", "src/test/resources/parameters/goodParams.json", "-m", "zooby"}; + final String[] args03 = + { "-c", "src/test/resources/parameters/goodParams.json", "-m", "zooby" }; try { apexArguments.parse(args03); apexArguments.validate(); @@ -147,7 +165,8 @@ public class TestApexCommandLineArguments { assertEquals("Apex model file \"zooby\" does not exist", e.getMessage()); } - final String[] args04 = {"-m"}; + final String[] args04 = + { "-m" }; try { apexArguments.parse(args04); apexArguments.validate(); @@ -156,7 +175,8 @@ public class TestApexCommandLineArguments { assertEquals("invalid command line arguments specified : Missing argument for option: m", e.getMessage()); } - final String[] args05 = {"-c", "src/test/resources/parameters/goodParams.json", "-m"}; + final String[] args05 = + { "-c", "src/test/resources/parameters/goodParams.json", "-m" }; try { apexArguments.parse(args05); apexArguments.validate(); @@ -165,8 +185,9 @@ public class TestApexCommandLineArguments { assertEquals("invalid command line arguments specified : Missing argument for option: m", e.getMessage()); } - final String[] args06 = {"-c", "src/test/resources/parameters/goodParams.json", "-m", - "src/test/resources/main/DummyModelFile.json"}; + final String[] args06 = + { "-c", "src/test/resources/parameters/goodParams.json", "-m", + "src/test/resources/main/DummyModelFile.json" }; try { apexArguments.parse(args06); apexArguments.validate(); @@ -175,7 +196,8 @@ public class TestApexCommandLineArguments { fail("Test should not throw an exception"); } - final String[] args07 = {"-c", "parameters/goodParams.json", "-m", "main/DummyModelFile.json"}; + final String[] args07 = + { "-c", "parameters/goodParams.json", "-m", "main/DummyModelFile.json" }; try { apexArguments.parse(args07); apexArguments.validate(); @@ -184,4 +206,57 @@ public class TestApexCommandLineArguments { fail("Test should not throw an exception"); } } + + @Test + public void testCommandLineRelativeRootParameters() { + final ApexCommandLineArguments apexArguments = new ApexCommandLineArguments(); + + final String[] args00 = + { "-c", "src/test/resources/parameters/goodParams.json", "-rfr", "zooby" }; + try { + apexArguments.parse(args00); + apexArguments.validate(); + fail("Test should throw an exception here"); + } catch (final ApexException e) { + assertTrue(e.getMessage().contains("zooby\" does not exist or is not a directory")); + } + + final String[] args01 = + { "-rfr" }; + try { + apexArguments.parse(args01); + apexArguments.validate(); + fail("Test should throw an exception here"); + } catch (final ApexException e) { + assertEquals("invalid command line arguments specified : Missing argument for option: rfr", e.getMessage()); + } + + final String[] args02 = + { "-c", "src/test/resources/parameters/goodParams.json", "-rfr", "pom.xml" }; + try { + apexArguments.parse(args02); + apexArguments.validate(); + fail("Test should throw an exception here"); + } catch (final ApexException e) { + assertTrue(e.getMessage().contains("pom.xml\" does not exist or is not a directory")); + } + + final String[] args03 = + { "-c", "src/test/resources/parameters/goodParams.json", "-rfr", "target" }; + try { + apexArguments.parse(args03); + apexArguments.validate(); + } catch (final ApexException e) { + fail("Test should not throw an exception here"); + } + + final String[] args04 = + { "-c", "src/test/resources/parameters/goodParamsRelative.json", "-rfr", "src/test/resources" }; + try { + apexArguments.parse(args04); + apexArguments.validate(); + } catch (final ApexException e) { + fail("Test should not throw an exception here"); + } + } } diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java index 5e42ede1a..e77767d44 100644 --- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java +++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java @@ -21,8 +21,10 @@ package org.onap.policy.apex.service.engine.parameters; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; +import org.junit.After; import org.junit.Test; import org.onap.policy.apex.service.engine.main.ApexCommandLineArguments; import org.onap.policy.apex.service.parameters.ApexParameterHandler; @@ -35,16 +37,21 @@ import org.onap.policy.common.parameters.ParameterException; * @author Liam Fallon (liam.fallon@ericsson.com) */ public class ExecutorParameterTests { + @After + public void resetRelativeFileRoot() { + System.clearProperty("APEX_RELATIVE_FILE_ROOT"); + } @Test public void noParamsTest() { - final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorNoParams.json"}; + final String[] args = + { "-c", "src/test/resources/parameters/serviceExecutorNoParams.json" }; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); try { final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments); - assertEquals(0, - parameters.getEngineServiceParameters().getEngineParameters().getExecutorParameterMap().size()); + assertEquals(0, parameters.getEngineServiceParameters().getEngineParameters().getExecutorParameterMap() + .size()); } catch (final ParameterException e) { fail("This test should not throw any exception: " + e.getMessage()); } @@ -52,24 +59,25 @@ public class ExecutorParameterTests { @Test public void badParamsTest() { - final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadParams.json"}; + final String[] args = + { "-c", "src/test/resources/parameters/serviceExecutorBadParams.json" }; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); try { new ApexParameterHandler().getParameters(arguments); fail("This test should throw an exception"); } catch (final ParameterException e) { - assertEquals( - "error reading parameters from \"src/test/resources/parameters/serviceExecutorBadParams.json\"\n" + assertEquals("error reading parameters from " + + "\"src/test/resources/parameters/serviceExecutorBadParams.json\"\n" + "(ParameterRuntimeException):value of \"executorParameters:ZOOBY\" entry is not " - + "a parameter JSON object", - e.getMessage()); + + "a parameter JSON object", e.getMessage()); } } @Test public void noExecutorParamsTest() { - final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorNoExecutorParams.json"}; + final String[] args = + { "-c", "src/test/resources/parameters/serviceExecutorNoExecutorParams.json" }; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); try { @@ -77,15 +85,16 @@ public class ExecutorParameterTests { fail("This test should throw an exception"); } catch (final ParameterException e) { assertEquals("error reading parameters from " - + "\"src/test/resources/parameters/serviceExecutorNoExecutorParams.json\"\n" - + "(ParameterRuntimeException):no \"executorParameters\" entry found in parameters," - + " at least one executor parameter entry must be specified", e.getMessage()); + + "\"src/test/resources/parameters/serviceExecutorNoExecutorParams.json\"\n" + + "(ParameterRuntimeException):no \"executorParameters\" entry found in parameters," + + " at least one executor parameter entry must be specified", e.getMessage()); } } @Test public void emptyParamsTest() { - final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorEmptyParams.json"}; + final String[] args = + { "-c", "src/test/resources/parameters/serviceExecutorEmptyParams.json" }; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); try { @@ -93,15 +102,16 @@ public class ExecutorParameterTests { fail("This test should throw an exception"); } catch (final ParameterException e) { assertEquals("error reading parameters from " - + "\"src/test/resources/parameters/serviceExecutorEmptyParams.json\"\n" - + "(ParameterRuntimeException):could not find field \"parameterClassName\" " - + "in \"executorParameters:ZOOBY\" entry", e.getMessage()); + + "\"src/test/resources/parameters/serviceExecutorEmptyParams.json\"\n" + + "(ParameterRuntimeException):could not find field \"parameterClassName\" " + + "in \"executorParameters:ZOOBY\" entry", e.getMessage()); } } @Test public void badPluginParamNameTest() { - final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginNameParams.json"}; + final String[] args = + { "-c", "src/test/resources/parameters/serviceExecutorBadPluginNameParams.json" }; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); try { @@ -109,15 +119,16 @@ public class ExecutorParameterTests { fail("This test should throw an exception"); } catch (final ParameterException e) { assertEquals("error reading parameters from " - + "\"src/test/resources/parameters/serviceExecutorBadPluginNameParams.json\"\n" - + "(ParameterRuntimeException):could not find field \"parameterClassName\" " - + "in \"executorParameters:ZOOBY\" entry", e.getMessage()); + + "\"src/test/resources/parameters/serviceExecutorBadPluginNameParams.json\"\n" + + "(ParameterRuntimeException):could not find field \"parameterClassName\" " + + "in \"executorParameters:ZOOBY\" entry", e.getMessage()); } } @Test public void badPluginParamObjectTest() { - final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json"}; + final String[] args = + { "-c", "src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json" }; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); try { @@ -125,15 +136,16 @@ public class ExecutorParameterTests { fail("This test should throw an exception"); } catch (final ParameterException e) { assertEquals("error reading parameters from " - + "\"src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json\"\n" - + "(ParameterRuntimeException):value for field \"parameterClassName\" " - + "of \"executorParameters:LOOBY\" entry is not a plain string", e.getMessage()); + + "\"src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json\"\n" + + "(ParameterRuntimeException):value for field \"parameterClassName\" " + + "of \"executorParameters:LOOBY\" entry is not a plain string", e.getMessage()); } } @Test public void badPluginParamBlankTest() { - final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json"}; + final String[] args = + { "-c", "src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json" }; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); try { @@ -141,16 +153,16 @@ public class ExecutorParameterTests { fail("This test should throw an exception"); } catch (final ParameterException e) { assertEquals("error reading parameters from " - + "\"src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json\"\n" - + "(ParameterRuntimeException):value for field \"parameterClassName\" " - + "in \"executorParameters:LOOBY\" entry is not specified or is blank", e.getMessage()); + + "\"src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json\"\n" + + "(ParameterRuntimeException):value for field \"parameterClassName\" " + + "in \"executorParameters:LOOBY\" entry is not specified or is blank", e.getMessage()); } } - @Test public void badPluginParamValueTest() { - final String[] args = {"-c", "src/test/resources/parameters/serviceExecutorBadPluginValueParams.json"}; + final String[] args = + { "-c", "src/test/resources/parameters/serviceExecutorBadPluginValueParams.json" }; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); try { @@ -158,16 +170,36 @@ public class ExecutorParameterTests { fail("This test should throw an exception"); } catch (final ParameterException e) { assertEquals("error reading parameters from" - + " \"src/test/resources/parameters/serviceExecutorBadPluginValueParams.json\"\n" - + "(ParameterRuntimeException):failed to deserialize the parameters " - + "for \"executorParameters:LOOBY\" to parameter class \"helloworld\"\n" - + "java.lang.ClassNotFoundException: helloworld", e.getMessage()); + + " \"src/test/resources/parameters/serviceExecutorBadPluginValueParams.json\"\n" + + "(ParameterRuntimeException):failed to deserialize the parameters " + + "for \"executorParameters:LOOBY\" to parameter class \"helloworld\"\n" + + "java.lang.ClassNotFoundException: helloworld", e.getMessage()); } } @Test public void goodParametersTest() { - final String[] args = {"-c", "src/test/resources/parameters/goodParams.json"}; + final String[] args = + { "-c", "src/test/resources/parameters/goodParams.json" }; + final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); + + try { + final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments); + + assertEquals("MyApexEngine", parameters.getEngineServiceParameters().getName()); + assertEquals("0.0.1", parameters.getEngineServiceParameters().getVersion()); + assertEquals(45, parameters.getEngineServiceParameters().getId()); + assertEquals(19, parameters.getEngineServiceParameters().getInstanceCount()); + assertEquals(65522, parameters.getEngineServiceParameters().getDeploymentPort()); + } catch (final ParameterException e) { + fail("This test should not throw any exception: " + e.getMessage()); + } + } + + @Test + public void relativeParametersTest() { + final String[] args = + { "-rfr", "src/test/resources", "-c", "src/test/resources/parameters/goodParamsRelative.json" }; final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); try { @@ -178,6 +210,8 @@ public class ExecutorParameterTests { assertEquals(45, parameters.getEngineServiceParameters().getId()); assertEquals(19, parameters.getEngineServiceParameters().getInstanceCount()); assertEquals(65522, parameters.getEngineServiceParameters().getDeploymentPort()); + assertTrue(parameters.getEngineServiceParameters().getPolicyModelFileName() + .endsWith("/src/test/resources/policymodels/SmallModel.json")); } catch (final ParameterException e) { fail("This test should not throw any exception: " + e.getMessage()); } diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java index 7b71253b0..61518b84f 100644 --- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java +++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java @@ -150,7 +150,7 @@ public class ParameterTests { + " field \"deploymentPort\" type \"int\" value \"65536\" INVALID, " + "deploymentPort [65536] invalid, must be specified as 1024 <= port <= 65535\n" + " field \"policyModelFileName\" type \"java.lang.String\" " - + "value \"/some/file/name.xml\" INVALID, not found or is not a plain file\n" + + "value \"/some/file/name.xml\" INVALID, not found\n" + " parameter group map \"eventOutputParameters\" INVALID, " + "parameter group has status INVALID\n" + " parameter group \"FirstProducer\" type " + "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" INVALID" @@ -159,8 +159,7 @@ public class ParameterTests { + "filecarrierplugin.FileCarrierTechnologyParameters\" INVALID, " + "parameter group has status INVALID\n" + " field \"fileName\" type \"java.lang.String\" value \"null\" INVALID, " - + "fileName not specified or is blank or null, " - + "it must be specified as a valid file location\n" + + "\"null\" invalid, must be specified as a non-empty string\n" + " parameter group map \"eventInputParameters\" INVALID, " + "parameter group has status INVALID\n" + " parameter group \"TheFileConsumer1\" type " + "\"org.onap.policy.apex.service.parameters.eventhandler.EventHandlerParameters\" INVALID" @@ -169,8 +168,29 @@ public class ParameterTests { + "filecarrierplugin.FileCarrierTechnologyParameters\" INVALID, " + "parameter group has status INVALID\n" + " field \"fileName\" type \"java.lang.String\" value \"null\" INVALID, " - + "fileName not specified or is blank or null, " - + "it must be specified as a valid file location\n", e.getMessage()); + + "\"null\" invalid, must be specified as a non-empty string\n", e.getMessage()); + } + } + + @Test + public void modelNotFileTest() { + final String[] args = + { "-c", "src/test/resources/parameters/badParamsModelNotFile.json" }; + final ApexCommandLineArguments arguments = new ApexCommandLineArguments(args); + + try { + new ApexParameterHandler().getParameters(arguments); + fail("This test should throw an exception"); + } catch (final ParameterException e) { + assertEquals("validation error(s) on parameters from " + + "\"src/test/resources/parameters/badParamsModelNotFile.json\"\n" + + "parameter group \"APEX_PARAMETERS\" type " + + "\"org.onap.policy.apex.service.parameters.ApexParameters\" INVALID, " + + "parameter group has status INVALID\n" + " parameter group \"MyApexEngine\" type " + + "\"org.onap.policy.apex.service.parameters.engineservice.EngineServiceParameters\" " + + "INVALID, parameter group has status INVALID\n" + " field \"policyModelFileName\" " + + "type \"java.lang.String\" value \"src/test\" INVALID, is not a plain file\n", + e.getMessage()); } } @@ -257,8 +277,8 @@ public class ParameterTests { assertTrue(prodCarrierTech instanceof SuperDooperCarrierTechnologyParameters); - final SuperDooperCarrierTechnologyParameters superDooperParameters = - (SuperDooperCarrierTechnologyParameters) prodCarrierTech; + final SuperDooperCarrierTechnologyParameters superDooperParameters + = (SuperDooperCarrierTechnologyParameters) prodCarrierTech; assertEquals("somehost:12345", superDooperParameters.getBootstrapServers()); assertEquals("0", superDooperParameters.getAcks()); assertEquals(25, superDooperParameters.getRetries()); diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java index 374a2df14..87f1adc02 100644 --- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java +++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ProducerConsumerTests.java @@ -21,6 +21,7 @@ package org.onap.policy.apex.service.engine.parameters; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import org.junit.Test; @@ -120,8 +121,7 @@ public class ProducerConsumerTests { + "filecarrierplugin.FileCarrierTechnologyParameters\" INVALID, " + "parameter group has status INVALID\n" + " field \"fileName\" type \"java.lang.String\" value \"null\" INVALID, " - + "fileName not specified or is blank or null, " - + "it must be specified as a valid file location\n", e.getMessage()); + + "\"null\" invalid, must be specified as a non-empty string\n", e.getMessage()); } } @@ -191,7 +191,7 @@ public class ProducerConsumerTests { final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments); final FileCarrierTechnologyParameters fileParams = (FileCarrierTechnologyParameters) parameters .getEventOutputParameters().get("aProducer").getCarrierTechnologyParameters(); - assertEquals("/tmp/aaa.json", fileParams.getFileName()); + assertTrue(fileParams.getFileName().endsWith("target/aaa.json")); assertEquals(false, fileParams.isStandardError()); assertEquals(false, fileParams.isStandardIo()); assertEquals(false, fileParams.isStreamingMode()); @@ -223,8 +223,7 @@ public class ProducerConsumerTests { + "filecarrierplugin.FileCarrierTechnologyParameters\" INVALID, " + "parameter group has status INVALID\n" + " field \"fileName\" type " + "\"java.lang.String\" value \"null\" INVALID, " - + "fileName not specified or is blank or null, " - + "it must be specified as a valid file location\n", e.getMessage()); + + "\"null\" invalid, must be specified as a non-empty string\n", e.getMessage()); } } diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineServiceImplTest.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineServiceImplTest.java index f68a4872b..fcb207c62 100644 --- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineServiceImplTest.java +++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineServiceImplTest.java @@ -59,7 +59,7 @@ import org.onap.policy.common.parameters.ParameterService; public class EngineServiceImplTest { private static String simpleModelString; - private static String mfpModelString; + private static String differentModelString; private static AxPolicyModel simpleModel; /** @@ -71,9 +71,10 @@ public class EngineServiceImplTest { @BeforeClass public static void readSimpleModel() throws IOException, ApexModelException { simpleModelString = TextFileUtils - .getTextFileAsString("src/test/resources/policymodels/SamplePolicyModelJAVASCRIPT.json"); + .getTextFileAsString("src/test/resources/policymodels/SmallModel.json"); - mfpModelString = TextFileUtils.getTextFileAsString("src/test/resources/policymodels/MyFirstPolicyModel.json"); + differentModelString = TextFileUtils + .getTextFileAsString("src/test/resources/policymodels/SmallModelDifferent.json"); final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class); simpleModel = modelReader.read(new ByteArrayInputStream(simpleModelString.getBytes())); @@ -177,7 +178,7 @@ public class EngineServiceImplTest { } catch (Exception apEx) { assertEquals("removeEventListener()<-Engine-0:0.0.1,STOPPED, listenerName is null", apEx.getMessage()); } - + esImpl.deregisterActionListener("DummyListener"); assertEquals(esImpl, esImpl.getEngineServiceEventInterface()); @@ -425,17 +426,17 @@ public class EngineServiceImplTest { } try { - esImpl.updateModel(config.getEngineKey(), mfpModelString, false); + esImpl.updateModel(config.getEngineKey(), differentModelString, false); fail("test should throw an exception"); } catch (ApexException apEx) { - assertEquals("apex model update failed, supplied model with key \"MyFirstPolicyModel:0.0.1\" is not a " + assertEquals("apex model update failed, supplied model with key \"SmallModelDifferent:0.0.1\" is not a " + "compatible model update " - + "from the existing engine model with key \"SamplePolicyModelJAVASCRIPT:0.0.1\"", + + "from the existing engine model with key \"SmallModel:0.0.1\"", apEx.getMessage()); } try { - esImpl.updateModel(config.getEngineKey(), mfpModelString, true); + esImpl.updateModel(config.getEngineKey(), differentModelString, true); } catch (ApexException apEx) { fail("test should not throw an exception"); } diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineWorkerTest.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineWorkerTest.java index 1f8052d4a..87a523506 100644 --- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineWorkerTest.java +++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineWorkerTest.java @@ -64,7 +64,7 @@ public class EngineWorkerTest { private final ApplicationThreadFactory atFactory = new ApplicationThreadFactory("apex-engine-service", 512); private static String simpleModelString; - private static String mfpModelString; + private static String differentModelString; private static AxPolicyModel simpleModel; /** @@ -75,10 +75,10 @@ public class EngineWorkerTest { */ @BeforeClass public static void readSimpleModel() throws IOException, ApexModelException { - simpleModelString = TextFileUtils - .getTextFileAsString("src/test/resources/policymodels/SamplePolicyModelJAVASCRIPT.json"); + simpleModelString = TextFileUtils.getTextFileAsString("src/test/resources/policymodels/SmallModel.json"); - mfpModelString = TextFileUtils.getTextFileAsString("src/test/resources/policymodels/MyFirstPolicyModel.json"); + differentModelString = TextFileUtils + .getTextFileAsString("src/test/resources/policymodels/SmallModelDifferent.json"); final ApexModelReader<AxPolicyModel> modelReader = new ApexModelReader<>(AxPolicyModel.class); simpleModel = modelReader.read(new ByteArrayInputStream(simpleModelString.getBytes())); @@ -161,9 +161,9 @@ public class EngineWorkerTest { } catch (Exception apEx) { assertEquals("addEventListener()<-Worker:0.0.1,STOPPED, listenerName is null", apEx.getMessage()); } - + worker.registerActionListener("DummyListener", null); - + try { worker.registerActionListener(null, new DummyApexEventListener()); fail("test should throw an exception"); @@ -172,7 +172,7 @@ public class EngineWorkerTest { } worker.registerActionListener("DummyListener", new DummyApexEventListener()); - + try { worker.deregisterActionListener(null); fail("test should throw an exception"); @@ -344,17 +344,16 @@ public class EngineWorkerTest { eventQueue.add(new ApexEvent("SomeEvent", "0.0.1", "the.event.namespace", "EventSource", "EventTarget")); try { - worker.updateModel(worker.getKey(), mfpModelString, false); + worker.updateModel(worker.getKey(), differentModelString, false); fail("test should throw an exception"); } catch (ApexException apEx) { - assertEquals("apex model update failed, supplied model with key \"MyFirstPolicyModel:0.0.1\" is not a " + assertEquals("apex model update failed, supplied model with key \"SmallModelDifferent:0.0.1\" is not a " + "compatible model update " - + "from the existing engine model with key \"SamplePolicyModelJAVASCRIPT:0.0.1\"", - apEx.getMessage()); + + "from the existing engine model with key \"SmallModel:0.0.1\"", apEx.getMessage()); } try { - worker.updateModel(worker.getKey(), mfpModelString, true); + worker.updateModel(worker.getKey(), differentModelString, true); } catch (ApexException apEx) { fail("test should not throw an exception"); } diff --git a/services/services-engine/src/test/resources/parameters/badParamsModelNotFile.json b/services/services-engine/src/test/resources/parameters/badParamsModelNotFile.json new file mode 100644 index 000000000..8dec995be --- /dev/null +++ b/services/services-engine/src/test/resources/parameters/badParamsModelNotFile.json @@ -0,0 +1,64 @@ +{ + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 19, + "deploymentPort": 65522, + "policyModelFileName": "src/test", + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } + } + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + }, + "MyOtherProducer": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/aaa.json" + } + } + } + }, + "eventInputParameters": { + "TheFileConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "target/bbb.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + }, + "MySuperDooperConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "SUPER_TOK_DEL", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + } + } + } +}
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/factoryGoodParams.json b/services/services-engine/src/test/resources/parameters/factoryGoodParams.json index 54b58ce00..87448f5e7 100644 --- a/services/services-engine/src/test/resources/parameters/factoryGoodParams.json +++ b/services/services-engine/src/test/resources/parameters/factoryGoodParams.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -30,7 +30,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -43,7 +43,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/goodParams.json b/services/services-engine/src/test/resources/parameters/goodParams.json index c470f3eea..f323b0b51 100644 --- a/services/services-engine/src/test/resources/parameters/goodParams.json +++ b/services/services-engine/src/test/resources/parameters/goodParams.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -33,7 +33,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } } } @@ -43,7 +43,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/goodParamsRelative.json b/services/services-engine/src/test/resources/parameters/goodParamsRelative.json new file mode 100644 index 000000000..b3d193111 --- /dev/null +++ b/services/services-engine/src/test/resources/parameters/goodParamsRelative.json @@ -0,0 +1,64 @@ +{ + "engineServiceParameters": { + "name": "MyApexEngine", + "version": "0.0.1", + "id": 45, + "instanceCount": 19, + "deploymentPort": 65522, + "policyModelFileName": "policymodels/SmallModel.json", + "engineParameters": { + "executorParameters": { + "JAVASCRIPT": { + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" + } + } + } + }, + "eventOutputParameters": { + "FirstProducer": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "aaa.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + }, + "MyOtherProducer": { + "eventProtocolParameters": { + "eventProtocol": "JSON" + }, + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "aaa.json" + } + } + } + }, + "eventInputParameters": { + "TheFileConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "FILE", + "parameters": { + "fileName": "bbb.json" + } + }, + "eventProtocolParameters": { + "eventProtocol": "JSON" + } + }, + "MySuperDooperConsumer1": { + "carrierTechnologyParameters": { + "carrierTechnology": "SUPER_DOOPER", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperCarrierTechnologyParameters" + }, + "eventProtocolParameters": { + "eventProtocol": "SUPER_TOK_DEL", + "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperTokenDelimitedEventProtocolParameters" + } + } + } +}
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json index bb431279e..48c2dc905 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsBadCTParClass.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/prodConsBadEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsBadEPParClass.json index 7b1f1c099..51e9c3972 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsBadEPParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsBadEPParClass.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/prodConsBadFileName.json b/services/services-engine/src/test/resources/parameters/prodConsBadFileName.json index 2dc506561..38fba4480 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsBadFileName.json +++ b/services/services-engine/src/test/resources/parameters/prodConsBadFileName.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } diff --git a/services/services-engine/src/test/resources/parameters/prodConsMismatchCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsMismatchCTParClass.json index e8d1a9632..42c3e69ee 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsMismatchCTParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsMismatchCTParClass.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/prodConsMismatchEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsMismatchEPParClass.json index 89e905c3a..1bb893218 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsMismatchEPParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsMismatchEPParClass.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/prodConsNoCT.json b/services/services-engine/src/test/resources/parameters/prodConsNoCT.json index cbd9957c8..e94f05a5b 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsNoCT.json +++ b/services/services-engine/src/test/resources/parameters/prodConsNoCT.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/prodConsNoCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsNoCTParClass.json index 9c8723a81..07d50b30f 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsNoCTParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsNoCTParClass.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/prodConsNoEP.json b/services/services-engine/src/test/resources/parameters/prodConsNoEP.json index 92c089225..bdb780f4a 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsNoEP.json +++ b/services/services-engine/src/test/resources/parameters/prodConsNoEP.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventParameters": { diff --git a/services/services-engine/src/test/resources/parameters/prodConsNoEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsNoEPParClass.json index 8aea0ea3e..f39173ff8 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsNoEPParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsNoEPParClass.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/prodConsOKFileName.json b/services/services-engine/src/test/resources/parameters/prodConsOKFileName.json index b2424043e..938c318a7 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsOKFileName.json +++ b/services/services-engine/src/test/resources/parameters/prodConsOKFileName.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/prodConsWrongTypeCTParClass.json b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeCTParClass.json index 6bfab6a99..adbda5c13 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsWrongTypeCTParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeCTParClass.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/prodConsWrongTypeEPParClass.json b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeEPParClass.json index d72139de8..bbc50bde6 100644 --- a/services/services-engine/src/test/resources/parameters/prodConsWrongTypeEPParClass.json +++ b/services/services-engine/src/test/resources/parameters/prodConsWrongTypeEPParClass.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json index 6468e10a4..12f22c1eb 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassDistParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json index 57a38024d..00e6ca64a 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassLockParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", @@ -14,7 +14,7 @@ } }, "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json index a2920303a..c10172d23 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { "parameterClassName": "java.lang.Integer" diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json index 598c20bd7..8c2331e32 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadClassPersistParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", @@ -14,7 +14,7 @@ } }, "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadParams.json index d850ba290..abb6b18cf 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { "parameterClassName": "hello" diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json index beb049069..1083f18b1 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginClassParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" diff --git a/services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json index d152809fa..7d9d8900c 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextBadPluginNameParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { "parameterClassNamelooby": "" diff --git a/services/services-engine/src/test/resources/parameters/serviceContextNoParams.json b/services/services-engine/src/test/resources/parameters/serviceContextNoParams.json index 2d6cb4d85..44c53bb29 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextNoParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextNoParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { diff --git a/services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json index 56294a3c7..f4fee9fa9 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextOKDefaultParams.json @@ -5,13 +5,13 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters" }, "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -22,7 +22,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/serviceContextOKDistParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKDistParams.json index 1aa2abb0b..5aff80d94 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextOKDistParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextOKDistParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", @@ -14,7 +14,7 @@ } }, "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -25,7 +25,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/serviceContextOKFlushParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKFlushParams.json index 7d9eb6f2e..8bae50523 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextOKFlushParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextOKFlushParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", @@ -15,7 +15,7 @@ } }, "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -26,7 +26,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json b/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json index edbcb07df..24544d2ab 100644 --- a/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceContextOKFullParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "contextParameters": { "parameterClassName": "org.onap.policy.apex.context.parameters.ContextParameters", @@ -25,7 +25,7 @@ } }, "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -36,7 +36,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadParams.json index 839694af3..f9f50ee07 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorBadParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadParams.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" }, "ZOOBY": "hello" diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json index 5a28d8985..4a28d58aa 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginNameParams.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" }, "ZOOBY": { diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json index c70fa4c8b..7dd74ea34 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueBlankParams.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" }, "ZOOBY": { diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json index 200d8f1a5..2f7219f46 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueObjectParams.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" }, "ZOOBY": { diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json index b96a27409..39618055f 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorBadPluginValueParams.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" }, "ZOOBY": { diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json index f07eaff9d..3927740e3 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorEmptyParams.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" }, "ZOOBY": { diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json index 44d643cd2..0c6618f2e 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorNoExecutorParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "someParameter": "someValue" } diff --git a/services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json b/services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json index 751ac2171..4eb6fe024 100644 --- a/services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json +++ b/services/services-engine/src/test/resources/parameters/serviceExecutorNoParams.json @@ -5,7 +5,7 @@ "id": 45, "instanceCount": 345, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { @@ -17,7 +17,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json b/services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json index 6393d4864..355531417 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsBadPeers.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -32,7 +32,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -47,7 +47,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json b/services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json index a6de63f30..7a04a439a 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsBadTimeout.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -33,7 +33,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "synchronousTimeout": 12345 @@ -44,7 +44,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsInvalidTimeout.json b/services/services-engine/src/test/resources/parameters/syncBadParamsInvalidTimeout.json index ac24c8231..6a4270b27 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsInvalidTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsInvalidTimeout.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -34,7 +34,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -55,7 +55,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } } }, diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json b/services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json index 98840912f..8c6910a13 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsNoSyncWithPeer.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -31,7 +31,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -46,7 +46,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json b/services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json index 477bf8639..e1ed8316a 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsNotSyncWithPeer.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -32,7 +32,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -47,7 +47,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } }, "eventProtocolParameters": { diff --git a/services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json b/services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json index 93c998b29..9e24926b9 100644 --- a/services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncBadParamsUnpairedTimeout.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -34,7 +34,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -55,7 +55,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } } }, diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParams.json b/services/services-engine/src/test/resources/parameters/syncGoodParams.json index b2980aaed..2a29254de 100644 --- a/services/services-engine/src/test/resources/parameters/syncGoodParams.json +++ b/services/services-engine/src/test/resources/parameters/syncGoodParams.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -33,7 +33,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -52,7 +52,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } } }, diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json b/services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json index 68626958d..1988b76bd 100644 --- a/services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncGoodParamsBothTimeout.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "synchronousTimeout": 12345, @@ -35,7 +35,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -55,7 +55,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } } }, diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json b/services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json index d849040ac..b294a22f7 100644 --- a/services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncGoodParamsConsumerTimeout.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -33,7 +33,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -53,7 +53,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } } }, diff --git a/services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json b/services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json index b248259a4..824f0f6c2 100644 --- a/services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncGoodParamsProducerTimeout.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -20,7 +20,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -34,7 +34,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -54,7 +54,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } } }, diff --git a/services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json b/services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json index 9e5399d4f..4ca73fc74 100644 --- a/services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json +++ b/services/services-engine/src/test/resources/parameters/syncMismatchedPeers.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -33,7 +33,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -52,7 +52,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } } }, diff --git a/services/services-engine/src/test/resources/parameters/syncMismatchedTimeout.json b/services/services-engine/src/test/resources/parameters/syncMismatchedTimeout.json index 378106825..e4f9ea335 100644 --- a/services/services-engine/src/test/resources/parameters/syncMismatchedTimeout.json +++ b/services/services-engine/src/test/resources/parameters/syncMismatchedTimeout.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -33,7 +33,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -53,7 +53,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } } }, diff --git a/services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json b/services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json index 71337f340..3f2c8c555 100644 --- a/services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json +++ b/services/services-engine/src/test/resources/parameters/syncUnusedConsumerPeers.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -33,7 +33,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -52,7 +52,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } } }, diff --git a/services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json b/services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json index 4fe58bacc..c377ea6fc 100644 --- a/services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json +++ b/services/services-engine/src/test/resources/parameters/syncUnusedProducerPeers.json @@ -5,10 +5,10 @@ "id": 45, "instanceCount": 19, "deploymentPort": 65522, - "policyModelFileName": "src/test/resources/policymodels/SamplePolicyModelMVEL.json", + "policyModelFileName": "src/test/resources/policymodels/SmallModel.json", "engineParameters": { "executorParameters": { - "MVEL": { + "JAVASCRIPT": { "parameterClassName": "org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperExecutorParameters" } } @@ -19,7 +19,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -33,7 +33,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/aaa.json" + "fileName": "target/aaa.json" } }, "eventProtocolParameters": { @@ -52,7 +52,7 @@ "carrierTechnologyParameters": { "carrierTechnology": "FILE", "parameters": { - "fileName": "/tmp/bbb.json" + "fileName": "target/bbb.json" } } }, diff --git a/services/services-engine/src/test/resources/policymodels/MyFirstPolicyModel.json b/services/services-engine/src/test/resources/policymodels/MyFirstPolicyModel.json deleted file mode 100644 index 39ca63271..000000000 --- a/services/services-engine/src/test/resources/policymodels/MyFirstPolicyModel.json +++ /dev/null @@ -1,974 +0,0 @@ -{ - "apexPolicyModel" : { - "key" : { - "name" : "MyFirstPolicyModel", - "version" : "0.0.1" - }, - "keyInformation" : { - "key" : { - "name" : "MyFirstPolicyModel_KeyInfo", - "version" : "0.0.1" - }, - "keyInfoMap" : { - "entry" : [ { - "key" : { - "name" : "MorningBoozeCheck", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "MorningBoozeCheck", - "version" : "0.0.1" - }, - "UUID" : "3351b0f4-cf06-4fa2-8823-edf67bd30223", - "description" : "This task checks if the sales request is for an item that contains alcohol. \nIf the local time is between 00:00:00 and 11:30:00 then the sale is not authorised. Otherwise the sale is authorised. \nIn this implementation we assume that all items with item_ID values between 1000 and 2000 contain alcohol :-)" - } - }, { - "key" : { - "name" : "MyFirstPolicy", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "MyFirstPolicy", - "version" : "0.0.1" - }, - "UUID" : "6c5e410f-489a-46ff-964e-982ce6e8b6d0", - "description" : "This is my first Apex policy. It checks if a sale should be authorised or not." - } - }, { - "key" : { - "name" : "MyFirstPolicyModel", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "MyFirstPolicyModel", - "version" : "0.0.1" - }, - "UUID" : "540226fb-55ee-4f0e-a444-983a0494818e", - "description" : "This is my first Apex Policy Model." - } - }, { - "key" : { - "name" : "MyFirstPolicyModel_Albums", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "MyFirstPolicyModel_Albums", - "version" : "0.0.1" - }, - "UUID" : "3f70ec50-f896-31ba-afec-5fd47e69045b", - "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_Albums:0.0.1\"" - } - }, { - "key" : { - "name" : "MyFirstPolicyModel_Events", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "MyFirstPolicyModel_Events", - "version" : "0.0.1" - }, - "UUID" : "ef281318-5ac9-3ef0-8db3-8f9c4e4a81e2", - "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_Events:0.0.1\"" - } - }, { - "key" : { - "name" : "MyFirstPolicyModel_KeyInfo", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "MyFirstPolicyModel_KeyInfo", - "version" : "0.0.1" - }, - "UUID" : "d9248c6f-7c00-38df-8251-611463ba4065", - "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_KeyInfo:0.0.1\"" - } - }, { - "key" : { - "name" : "MyFirstPolicyModel_Policies", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "MyFirstPolicyModel_Policies", - "version" : "0.0.1" - }, - "UUID" : "77c01a6b-510c-3aa9-b640-b4db356aa03b", - "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_Policies:0.0.1\"" - } - }, { - "key" : { - "name" : "MyFirstPolicyModel_Schemas", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "MyFirstPolicyModel_Schemas", - "version" : "0.0.1" - }, - "UUID" : "d0cc3aa0-ea69-3a43-80ff-a0dbb0ebd885", - "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_Schemas:0.0.1\"" - } - }, { - "key" : { - "name" : "MyFirstPolicyModel_Tasks", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "MyFirstPolicyModel_Tasks", - "version" : "0.0.1" - }, - "UUID" : "b02a7e02-2cd0-39e6-b3cb-946fa83a8f08", - "description" : "Generated description for concept referred to by key \"MyFirstPolicyModel_Tasks:0.0.1\"" - } - }, { - "key" : { - "name" : "SALE_AUTH", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "SALE_AUTH", - "version" : "0.0.1" - }, - "UUID" : "c4500941-3f98-4080-a9cc-5b9753ed050b", - "description" : "An event emitted by the Policy to indicate whether the sale of an item has been authorised" - } - }, { - "key" : { - "name" : "SALE_INPUT", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "SALE_INPUT", - "version" : "0.0.1" - }, - "UUID" : "4f04aa98-e917-4f4a-882a-c75ba5a99374", - "description" : "An event raised by the PoS system each time an item is scanned for purchase" - } - }, { - "key" : { - "name" : "assistant_ID_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "assistant_ID_type", - "version" : "0.0.1" - }, - "UUID" : "36df4c71-9616-4206-8b53-976a5cd4bd87", - "description" : "A type for 'assistant_ID' values" - } - }, { - "key" : { - "name" : "authorised_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "authorised_type", - "version" : "0.0.1" - }, - "UUID" : "d48b619e-d00d-4008-b884-02d76ea4350b", - "description" : "A type for 'authorised' values" - } - }, { - "key" : { - "name" : "branch_ID_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "branch_ID_type", - "version" : "0.0.1" - }, - "UUID" : "6468845f-4122-4128-8e49-0f52c26078b5", - "description" : "A type for 'branch_ID' values" - } - }, { - "key" : { - "name" : "item_ID_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "item_ID_type", - "version" : "0.0.1" - }, - "UUID" : "4f227ff1-aee0-453a-b6b6-9a4b2e0da932", - "description" : "A type for 'item_ID' values" - } - }, { - "key" : { - "name" : "message_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "message_type", - "version" : "0.0.1" - }, - "UUID" : "ad1431bb-3155-4e73-b5a3-b89bee498749", - "description" : "A type for 'message' values" - } - }, { - "key" : { - "name" : "notes_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "notes_type", - "version" : "0.0.1" - }, - "UUID" : "eecfde90-896c-4343-8f9c-2603ced94e2d", - "description" : "A type for 'notes' values" - } - }, { - "key" : { - "name" : "price_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "price_type", - "version" : "0.0.1" - }, - "UUID" : "52c2fc45-fd8c-463c-bd6f-d91b0554aea7", - "description" : "A type for 'amount'/'price' values" - } - }, { - "key" : { - "name" : "quantity_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "quantity_type", - "version" : "0.0.1" - }, - "UUID" : "ac3d9842-80af-4a98-951c-bd79a431c613", - "description" : "A type for 'quantity' values" - } - }, { - "key" : { - "name" : "sale_ID_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "sale_ID_type", - "version" : "0.0.1" - }, - "UUID" : "cca47d74-7754-4a61-b163-ca31f66b157b", - "description" : "A type for 'sale_ID' values" - } - }, { - "key" : { - "name" : "timestamp_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "timestamp_type", - "version" : "0.0.1" - }, - "UUID" : "fd594e88-411d-4a94-b2be-697b3a0d7adf", - "description" : "A type for 'time' values" - } - } ] - } - }, - "policies" : { - "key" : { - "name" : "MyFirstPolicyModel_Policies", - "version" : "0.0.1" - }, - "policyMap" : { - "entry" : [ { - "key" : { - "name" : "MyFirstPolicy", - "version" : "0.0.1" - }, - "value" : { - "policyKey" : { - "name" : "MyFirstPolicy", - "version" : "0.0.1" - }, - "template" : "FREEFORM", - "state" : { - "entry" : [ { - "key" : "BoozeAuthDecide", - "value" : { - "stateKey" : { - "parentKeyName" : "MyFirstPolicy", - "parentKeyVersion" : "0.0.1", - "parentLocalName" : "NULL", - "localName" : "BoozeAuthDecide" - }, - "trigger" : { - "name" : "SALE_INPUT", - "version" : "0.0.1" - }, - "stateOutputs" : { - "entry" : [ { - "key" : "MorningBoozeCheck_Output_Direct", - "value" : { - "key" : { - "parentKeyName" : "MyFirstPolicy", - "parentKeyVersion" : "0.0.1", - "parentLocalName" : "BoozeAuthDecide", - "localName" : "MorningBoozeCheck_Output_Direct" - }, - "outgoingEvent" : { - "name" : "SALE_AUTH", - "version" : "0.0.1" - }, - "nextState" : { - "parentKeyName" : "NULL", - "parentKeyVersion" : "0.0.0", - "parentLocalName" : "NULL", - "localName" : "NULL" - } - } - } ] - }, - "contextAlbumReference" : [ ], - "taskSelectionLogic" : { - "key" : "NULL", - "logicFlavour" : "UNDEFINED", - "logic" : "" - }, - "stateFinalizerLogicMap" : { - "entry" : [ ] - }, - "defaultTask" : { - "name" : "MorningBoozeCheck", - "version" : "0.0.1" - }, - "taskReferences" : { - "entry" : [ { - "key" : { - "name" : "MorningBoozeCheck", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "parentKeyName" : "MyFirstPolicy", - "parentKeyVersion" : "0.0.1", - "parentLocalName" : "BoozeAuthDecide", - "localName" : "MorningBoozeCheck" - }, - "outputType" : "DIRECT", - "output" : { - "parentKeyName" : "MyFirstPolicy", - "parentKeyVersion" : "0.0.1", - "parentLocalName" : "BoozeAuthDecide", - "localName" : "MorningBoozeCheck_Output_Direct" - } - } - } ] - } - } - } ] - }, - "firstState" : "BoozeAuthDecide" - } - } ] - } - }, - "tasks" : { - "key" : { - "name" : "MyFirstPolicyModel_Tasks", - "version" : "0.0.1" - }, - "taskMap" : { - "entry" : [ { - "key" : { - "name" : "MorningBoozeCheck", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "MorningBoozeCheck", - "version" : "0.0.1" - }, - "inputFields" : { - "entry" : [ { - "key" : "sale_ID", - "value" : { - "key" : "sale_ID", - "fieldSchemaKey" : { - "name" : "sale_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "amount", - "value" : { - "key" : "amount", - "fieldSchemaKey" : { - "name" : "price_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "assistant_ID", - "value" : { - "key" : "assistant_ID", - "fieldSchemaKey" : { - "name" : "assistant_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "notes", - "value" : { - "key" : "notes", - "fieldSchemaKey" : { - "name" : "notes_type", - "version" : "0.0.1" - }, - "optional" : true - } - }, { - "key" : "quantity", - "value" : { - "key" : "quantity", - "fieldSchemaKey" : { - "name" : "quantity_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "branch_ID", - "value" : { - "key" : "branch_ID", - "fieldSchemaKey" : { - "name" : "branch_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "item_ID", - "value" : { - "key" : "item_ID", - "fieldSchemaKey" : { - "name" : "item_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "time", - "value" : { - "key" : "time", - "fieldSchemaKey" : { - "name" : "timestamp_type", - "version" : "0.0.1" - }, - "optional" : false - } - } ] - }, - "outputFields" : { - "entry" : [ { - "key" : "sale_ID", - "value" : { - "key" : "sale_ID", - "fieldSchemaKey" : { - "name" : "sale_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "amount", - "value" : { - "key" : "amount", - "fieldSchemaKey" : { - "name" : "price_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "assistant_ID", - "value" : { - "key" : "assistant_ID", - "fieldSchemaKey" : { - "name" : "assistant_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "notes", - "value" : { - "key" : "notes", - "fieldSchemaKey" : { - "name" : "notes_type", - "version" : "0.0.1" - }, - "optional" : true - } - }, { - "key" : "quantity", - "value" : { - "key" : "quantity", - "fieldSchemaKey" : { - "name" : "quantity_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "branch_ID", - "value" : { - "key" : "branch_ID", - "fieldSchemaKey" : { - "name" : "branch_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "item_ID", - "value" : { - "key" : "item_ID", - "fieldSchemaKey" : { - "name" : "item_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "authorised", - "value" : { - "key" : "authorised", - "fieldSchemaKey" : { - "name" : "authorised_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "time", - "value" : { - "key" : "time", - "fieldSchemaKey" : { - "name" : "timestamp_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "message", - "value" : { - "key" : "message", - "fieldSchemaKey" : { - "name" : "message_type", - "version" : "0.0.1" - }, - "optional" : true - } - } ] - }, - "taskParameters" : { - "entry" : [ ] - }, - "contextAlbumReference" : [ ], - "taskLogic" : { - "key" : "TaskLogic", - "logicFlavour" : "MVEL", - "logic" : "/*\n * ============LICENSE_START=======================================================\n * Copyright (C) 2016-2018 Ericsson. All rights reserved.\n * ================================================================================\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * SPDX-License-Identifier: Apache-2.0\n * ============LICENSE_END=========================================================\n */\nimport java.util.Date;\nimport java.util.Calendar;\nimport java.util.TimeZone;\nimport java.text.SimpleDateFormat;\n\nlogger.info(\"Task Execution: '\"+subject.id+\"'. Input Fields: '\"+inFields+\"'\");\n\noutFields.put(\"amount\" , inFields.get(\"amount\"));\noutFields.put(\"assistant_ID\", inFields.get(\"assistant_ID\"));\noutFields.put(\"notes\" , inFields.get(\"notes\"));\noutFields.put(\"quantity\" , inFields.get(\"quantity\"));\noutFields.put(\"branch_ID\" , inFields.get(\"branch_ID\"));\noutFields.put(\"item_ID\" , inFields.get(\"item_ID\"));\noutFields.put(\"time\" , inFields.get(\"time\"));\noutFields.put(\"sale_ID\" , inFields.get(\"sale_ID\"));\n\nitem_id = inFields.get(\"item_ID\");\n\n//The events used later to test this task use GMT timezone!\ngmt = TimeZone.getTimeZone(\"GMT\");\ntimenow = Calendar.getInstance(gmt);\ndf = new SimpleDateFormat(\"HH:mm:ss z\");\ndf.setTimeZone(gmt);\ntimenow.setTimeInMillis(inFields.get(\"time\"));\n\nmidnight = timenow.clone();\nmidnight.set(\n timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH),\n timenow.get(Calendar.DATE),0,0,0);\neleven30 = timenow.clone();\neleven30.set(\n timenow.get(Calendar.YEAR),timenow.get(Calendar.MONTH),\n timenow.get(Calendar.DATE),11,30,0);\n\nitemisalcohol = false;\nif(item_id != null && item_id >=1000 && item_id < 2000)\n itemisalcohol = true;\n\nif( itemisalcohol\n && timenow.after(midnight) && timenow.before(eleven30)){\n outFields.put(\"authorised\", false);\n outFields.put(\"message\", \"Sale not authorised by policy task \"+subject.taskName+\n \" for time \"+df.format(timenow.getTime())+\n \". Alcohol can not be sold between \"+df.format(midnight.getTime())+\n \" and \"+df.format(eleven30.getTime()));\n return true;\n}\nelse{\n outFields.put(\"authorised\", true);\n outFields.put(\"message\", \"Sale authorised by policy task \"+subject.taskName+\n \" for time \"+df.format(timenow.getTime()));\n return true;\n}\n\n/*\nThis task checks if a sale request is for an item that is an alcoholic drink.\nIf the local time is between 00:00:00 GMT and 11:30:00 GMT then the sale is not\nauthorised. Otherwise the sale is authorised. \nIn this implementation we assume that items with item_ID value between 1000 and \n2000 are all alcoholic drinks :-)\n*/" - } - } - } ] - } - }, - "events" : { - "key" : { - "name" : "MyFirstPolicyModel_Events", - "version" : "0.0.1" - }, - "eventMap" : { - "entry" : [ { - "key" : { - "name" : "SALE_AUTH", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "SALE_AUTH", - "version" : "0.0.1" - }, - "nameSpace" : "com.hyperm", - "source" : "APEX", - "target" : "POS", - "parameter" : { - "entry" : [ { - "key" : "sale_ID", - "value" : { - "key" : "sale_ID", - "fieldSchemaKey" : { - "name" : "sale_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "amount", - "value" : { - "key" : "amount", - "fieldSchemaKey" : { - "name" : "price_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "assistant_ID", - "value" : { - "key" : "assistant_ID", - "fieldSchemaKey" : { - "name" : "assistant_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "notes", - "value" : { - "key" : "notes", - "fieldSchemaKey" : { - "name" : "notes_type", - "version" : "0.0.1" - }, - "optional" : true - } - }, { - "key" : "quantity", - "value" : { - "key" : "quantity", - "fieldSchemaKey" : { - "name" : "quantity_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "branch_ID", - "value" : { - "key" : "branch_ID", - "fieldSchemaKey" : { - "name" : "branch_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "item_ID", - "value" : { - "key" : "item_ID", - "fieldSchemaKey" : { - "name" : "item_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "authorised", - "value" : { - "key" : "authorised", - "fieldSchemaKey" : { - "name" : "authorised_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "time", - "value" : { - "key" : "time", - "fieldSchemaKey" : { - "name" : "timestamp_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "message", - "value" : { - "key" : "message", - "fieldSchemaKey" : { - "name" : "message_type", - "version" : "0.0.1" - }, - "optional" : true - } - } ] - } - } - }, { - "key" : { - "name" : "SALE_INPUT", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "SALE_INPUT", - "version" : "0.0.1" - }, - "nameSpace" : "com.hyperm", - "source" : "POS", - "target" : "APEX", - "parameter" : { - "entry" : [ { - "key" : "sale_ID", - "value" : { - "key" : "sale_ID", - "fieldSchemaKey" : { - "name" : "sale_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "amount", - "value" : { - "key" : "amount", - "fieldSchemaKey" : { - "name" : "price_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "assistant_ID", - "value" : { - "key" : "assistant_ID", - "fieldSchemaKey" : { - "name" : "assistant_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "notes", - "value" : { - "key" : "notes", - "fieldSchemaKey" : { - "name" : "notes_type", - "version" : "0.0.1" - }, - "optional" : true - } - }, { - "key" : "quantity", - "value" : { - "key" : "quantity", - "fieldSchemaKey" : { - "name" : "quantity_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "branch_ID", - "value" : { - "key" : "branch_ID", - "fieldSchemaKey" : { - "name" : "branch_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "item_ID", - "value" : { - "key" : "item_ID", - "fieldSchemaKey" : { - "name" : "item_ID_type", - "version" : "0.0.1" - }, - "optional" : false - } - }, { - "key" : "time", - "value" : { - "key" : "time", - "fieldSchemaKey" : { - "name" : "timestamp_type", - "version" : "0.0.1" - }, - "optional" : false - } - } ] - } - } - } ] - } - }, - "albums" : { - "key" : { - "name" : "MyFirstPolicyModel_Albums", - "version" : "0.0.1" - }, - "albums" : { - "entry" : [ ] - } - }, - "schemas" : { - "key" : { - "name" : "MyFirstPolicyModel_Schemas", - "version" : "0.0.1" - }, - "schemas" : { - "entry" : [ { - "key" : { - "name" : "assistant_ID_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "assistant_ID_type", - "version" : "0.0.1" - }, - "schemaFlavour" : "Java", - "schemaDefinition" : "java.lang.Long" - } - }, { - "key" : { - "name" : "authorised_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "authorised_type", - "version" : "0.0.1" - }, - "schemaFlavour" : "Java", - "schemaDefinition" : "java.lang.Boolean" - } - }, { - "key" : { - "name" : "branch_ID_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "branch_ID_type", - "version" : "0.0.1" - }, - "schemaFlavour" : "Java", - "schemaDefinition" : "java.lang.Long" - } - }, { - "key" : { - "name" : "item_ID_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "item_ID_type", - "version" : "0.0.1" - }, - "schemaFlavour" : "Java", - "schemaDefinition" : "java.lang.Long" - } - }, { - "key" : { - "name" : "message_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "message_type", - "version" : "0.0.1" - }, - "schemaFlavour" : "Java", - "schemaDefinition" : "java.lang.String" - } - }, { - "key" : { - "name" : "notes_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "notes_type", - "version" : "0.0.1" - }, - "schemaFlavour" : "Java", - "schemaDefinition" : "java.lang.String" - } - }, { - "key" : { - "name" : "price_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "price_type", - "version" : "0.0.1" - }, - "schemaFlavour" : "Java", - "schemaDefinition" : "java.lang.Long" - } - }, { - "key" : { - "name" : "quantity_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "quantity_type", - "version" : "0.0.1" - }, - "schemaFlavour" : "Java", - "schemaDefinition" : "java.lang.Integer" - } - }, { - "key" : { - "name" : "sale_ID_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "sale_ID_type", - "version" : "0.0.1" - }, - "schemaFlavour" : "Java", - "schemaDefinition" : "java.lang.Long" - } - }, { - "key" : { - "name" : "timestamp_type", - "version" : "0.0.1" - }, - "value" : { - "key" : { - "name" : "timestamp_type", - "version" : "0.0.1" - }, - "schemaFlavour" : "Java", - "schemaDefinition" : "java.lang.Long" - } - } ] - } - } - } -}
\ No newline at end of file diff --git a/services/services-engine/src/test/resources/policymodels/SamplePolicyModelJAVASCRIPT.json b/services/services-engine/src/test/resources/policymodels/SamplePolicyModelJAVASCRIPT.json deleted file mode 100644 index 2dc4bcd3f..000000000 --- a/services/services-engine/src/test/resources/policymodels/SamplePolicyModelJAVASCRIPT.json +++ /dev/null @@ -1,6684 +0,0 @@ -{ - "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 diff --git a/services/services-engine/src/test/resources/policymodels/SamplePolicyModelMVEL.json b/services/services-engine/src/test/resources/policymodels/SamplePolicyModelMVEL.json deleted file mode 100644 index 982444f36..000000000 --- a/services/services-engine/src/test/resources/policymodels/SamplePolicyModelMVEL.json +++ /dev/null @@ -1,7036 +0,0 @@ -{ - "apexPolicyModel": { - "key": { - "name": "SamplePolicyModelMVEL", - "version": "0.0.1" - }, - "keyInformation": { - "key": { - "name": "KeyInformation", - "version": "0.0.1" - }, - "keyInfoMap": { - "entry": [ - { - "key": { - "name": "Context", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Context", - "version": "0.0.1" - }, - "UUID": "2708db15-3117-4ef5-ae06-44ad4bc72756", - "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": "20f7f2d0-36e1-4134-93d9-8978e0ebb916", - "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": "bfa262fc-f59d-4b05-af44-a5b5c218b314", - "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": "84eeac88-5031-4487-b67a-5a3ae13c1a89", - "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": "7a46a411-1715-48d8-9e70-9b5d14bbbed4", - "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": "da0ba1b4-f654-4e99-97b5-595de84cb3dc", - "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": "1267b311-60e2-48a7-8d0e-23c4ea21d863", - "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": "84013070-ff2e-4295-acbd-4128f0509040", - "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": "6fb7761e-b86f-47fc-8e19-6a116600764e", - "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": "141cc707-009c-4e3b-a0f8-c346f074f590", - "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": "98f4d09f-ff73-4385-8876-df6d04b552cc", - "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": "889f6414-bc4d-4f29-b7af-175e63d23ac5", - "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": "64e4911c-5aed-467f-be19-277fb6170857", - "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": "cb6a1892-8c3c-44df-b8a7-0e5a333ff9eb", - "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": "f3126983-e26c-491f-8738-c57784ca4026", - "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": "b20a18d5-c419-4e90-8519-9c8f8b3ce2ab", - "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": "28943e99-871b-482b-953f-cfa7138da02c", - "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": "2b1b738b-70f6-4b45-9d3c-a7e889b49993", - "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": "798ee6ea-f349-41bb-a281-7e4c22184e8c", - "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": "eb9568d5-d95f-4713-9622-d95ef4cf81c3", - "description": "Generated description for concept referred to by key \"Policy1ContextAlbum:0.0.1\"" - } - }, - { - "key": { - "name": "SamplePolicyModelMVEL", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "SamplePolicyModelMVEL", - "version": "0.0.1" - }, - "UUID": "10979d21-947f-4920-83ae-63b827e8e80f", - "description": "Generated description for concept referred to by key \"SamplePolicyModelMVEL:0.0.1\"" - } - }, - { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "UUID": "cb65d7fe-8d86-463c-aa16-0f4e6138d705", - "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": "ea2b4e7a-1a79-440c-9cf0-6fddaad64c0c", - "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": "269e1d08-9ab4-48b8-8854-b65deb9d41b1", - "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": "f9c4a91d-92aa-49ce-9b65-ab2378f6b048", - "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": "7fde2446-ce2a-4bc2-a675-96496c387c88", - "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": "bc185db6-f18f-4fdd-b5b4-37d14b57f463", - "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": "2c1e2ede-d67c-4845-90ac-a4d53311bfbb", - "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": "1d1645a2-2852-4296-9f22-8f31ebe5386a", - "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": "f3739d83-a029-4ad8-a0b9-e5a028b369b2", - "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": "5351a5a5-4134-44fd-9a6f-fd37dbfc8aa7", - "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": "4206bb68-e710-4a01-aade-3e34771da63b", - "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": "cbaab234-b586-4f63-986e-ed0b317b6c66", - "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": "24dbc71b-8773-4393-9c36-a5f4991e0f55", - "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": "42ecd25d-e8cb-48e4-890a-b0616528cf10", - "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": "7e691294-a816-42f8-b124-9b5eac70b116", - "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": "bc7cad3c-85a5-40b4-9eda-51ac2387af05", - "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": "4386403d-b23c-4c3e-bc14-5d581f9de2f5", - "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": "901a80ab-dd46-4697-b818-f669b9f9bce9", - "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": "cfd19e5d-ab54-4e54-b4e5-1c5eaa832622", - "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": "42c27d27-878d-4e9d-a139-e60c98f1c747", - "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": "83919fa0-ed4d-4981-908f-79913734a0f5", - "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": "194882b0-d987-4200-b82a-2c015605279b", - "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": "948d345b-39c3-4436-8036-ac9e5c561977", - "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": "fdad8cb5-4375-4bbf-9ffc-1e5ed8f4bae6", - "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": "5243c0ba-5c50-4835-a885-6cd988252bb7", - "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": "29f0b15f-f7c3-46e5-98d7-59a34a677968", - "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": "aac96de5-9f3c-452c-855f-e556cc807351", - "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": "7fdc1cc3-08c7-42a4-92a9-39e172fe2f1f", - "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": "cf60cca6-a2e8-4371-b0e5-85ecaae44acc", - "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": "1671f996-e14e-407d-a503-f4de09f0785b", - "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": "814c4c28-9027-4516-9598-adc75fafa92a", - "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": "33e81d08-a62b-40ce-b7ff-50734427ebf9", - "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": "5cd74351-8e27-4dee-a379-86124db50383", - "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": "e8c9a056-5e95-4e14-bc96-0c0d13a34b18", - "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": "92489659-02f3-4cb2-b25f-a6234ad71d36", - "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": "1c3b9345-32c2-4f7e-94ce-be36d0775e9e", - "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": "9e719a99-1d73-4d40-b097-c9622b9ea2b4", - "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": "3bcc8ef1-4cc5-4b7f-9dc4-83046d4a2a5d", - "description": "Generated description for concept referred to by key \"TestTimestamp:0.0.1\"" - } - } - ] - } - }, - "policies": { - "key": { - "name": "Policies", - "version": "0.0.1" - }, - "policyMap": { - "entry": [ - { - "key": { - "name": "Policy0", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "Policy0", - "version": "0.0.1" - }, - "template": "MEDA", - "state": { - "entry": [ - { - "key": "Act", - "value": { - "stateKey": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Act" - }, - "trigger": { - "name": "Event0003", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Act_NULL", - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - }, - "outgoingEvent": { - "name": "Event0004", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "MVEL", - "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act0_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act1_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act2_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act3_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - } - ] - } - } - }, - { - "key": "Decide", - "value": { - "stateKey": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Decide" - }, - "trigger": { - "name": "Event0002", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Decide_Act", - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - }, - "outgoingEvent": { - "name": "Event0003", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Act" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "MVEL", - "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Decide0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide0_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide1_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide2_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide3_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - } - ] - } - } - }, - { - "key": "Establish", - "value": { - "stateKey": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Establish" - }, - "trigger": { - "name": "Event0001", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Establish_Decide", - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - }, - "outgoingEvent": { - "name": "Event0002", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Decide" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "MVEL", - "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Establish0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish0_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish1_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish2_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish3_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - } - ] - } - } - }, - { - "key": "Match", - "value": { - "stateKey": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Match" - }, - "trigger": { - "name": "Event0000", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Match_Establish", - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - }, - "outgoingEvent": { - "name": "Event0001", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Establish" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "MVEL", - "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match0_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match1_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match2_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match3_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - } - ] - } - } - } - ] - }, - "firstState": "Match" - } - }, - { - "key": { - "name": "Policy1", - "version": "0.0.1" - }, - "value": { - "policyKey": { - "name": "Policy1", - "version": "0.0.1" - }, - "template": "MEDA", - "state": { - "entry": [ - { - "key": "Act", - "value": { - "stateKey": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Act" - }, - "trigger": { - "name": "Event0103", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Act_NULL", - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - }, - "outgoingEvent": { - "name": "Event0104", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "NULL", - "parentKeyVersion": "0.0.0", - "parentLocalName": "NULL", - "localName": "NULL" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "MVEL", - "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act0_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act1_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act2_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - }, - { - "key": { - "name": "Task_Act3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Task_Act3_DIRECT_Act_NULL" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Act", - "localName": "Act_NULL" - } - } - } - ] - } - } - }, - { - "key": "Decide", - "value": { - "stateKey": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Decide" - }, - "trigger": { - "name": "Event0102", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Decide_Act", - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - }, - "outgoingEvent": { - "name": "Event0103", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Act" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "MVEL", - "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Decide0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide0_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide1_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide2_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - }, - { - "key": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Task_Decide3_DIRECT_Decide_Act" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Decide", - "localName": "Decide_Act" - } - } - } - ] - } - } - }, - { - "key": "Establish", - "value": { - "stateKey": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Establish" - }, - "trigger": { - "name": "Event0101", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Establish_Decide", - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - }, - "outgoingEvent": { - "name": "Event0102", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Decide" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "MVEL", - "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Establish0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish0_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish1_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish2_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - }, - { - "key": { - "name": "Task_Establish3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Task_Establish3_DIRECT_Establish_Decide" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Establish", - "localName": "Establish_Decide" - } - } - } - ] - } - } - }, - { - "key": "Match", - "value": { - "stateKey": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Match" - }, - "trigger": { - "name": "Event0100", - "version": "0.0.1" - }, - "stateOutputs": { - "entry": [ - { - "key": "Match_Establish", - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - }, - "outgoingEvent": { - "name": "Event0101", - "version": "0.0.1" - }, - "nextState": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Establish" - } - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskSelectionLogic": { - "key": "TaskSelectionLigic", - "logicFlavour": "MVEL", - "logic": "logger.debug(subject.id + \":\" + subject.stateName);\nsubject.defaultTaskKey.copyTo(selectedTask);\nreturn true;" - }, - "stateFinalizerLogicMap": { - "entry": [] - }, - "defaultTask": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "taskReferences": { - "entry": [ - { - "key": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match0_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match1", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match1_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match2", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match2_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - }, - { - "key": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "value": { - "key": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Task_Match3_DIRECT_Match_Establish" - }, - "outputType": "DIRECT", - "output": { - "parentKeyName": "Policy1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "Match", - "localName": "Match_Establish" - } - } - } - ] - } - } - } - ] - }, - "firstState": "Match" - } - } - ] - } - }, - "tasks": { - "key": { - "name": "Tasks", - "version": "0.0.1" - }, - "taskMap": { - "entry": [ - { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act0", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestActCaseSelected", - "value": { - "key": "TestActCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Act0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Act0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - }, - { - "key": "Parameter2", - "value": { - "key": { - "parentKeyName": "Task_Act0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter2" - }, - "defaultValue": "DefaultValue2" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestActCaseSelected\"] = (byte)2;\ntimeNow = new Date();\noutFields[\"TestActStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act1", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestActCaseSelected", - "value": { - "key": "TestActCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Act1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Act1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestActCaseSelected\"] = (byte)3;\ntimeNow = new Date();\noutFields[\"TestActStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Act2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act2", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestActCaseSelected", - "value": { - "key": "TestActCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Act2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestActCaseSelected\"] = (byte)0;\ntimeNow = new Date();\noutFields[\"TestActStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Act3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Act3", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestActCaseSelected", - "value": { - "key": "TestActCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Act3", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestActCaseSelected\"] = (byte)1;\ntimeNow = new Date();\noutFields[\"TestActStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Decide0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide0", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Decide0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Decide0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - }, - { - "key": "Parameter2", - "value": { - "key": { - "parentKeyName": "Task_Decide0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter2" - }, - "defaultValue": "DefaultValue2" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestDecideCaseSelected\"] = (byte)2;\ntimeNow = new Date();\noutFields[\"TestDecideStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Decide1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide1", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Decide1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Decide1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestDecideCaseSelected\"] = (byte)3;\ntimeNow = new Date();\noutFields[\"TestDecideStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Decide2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide2", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Decide2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestDecideCaseSelected\"] = (byte)0;\ntimeNow = new Date();\noutFields[\"TestDecideStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Decide3", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Decide3", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestDecideCaseSelected\"] = (byte)1;\ntimeNow = new Date();\noutFields[\"TestDecideStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Establish0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish0", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Establish0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Establish0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - }, - { - "key": "Parameter2", - "value": { - "key": { - "parentKeyName": "Task_Establish0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter2" - }, - "defaultValue": "DefaultValue2" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestEstablishCaseSelected\"] = (byte)2;\ntimeNow = new Date();\noutFields[\"TestEstablishStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish1", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Establish1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Establish1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestEstablishCaseSelected\"] = (byte)3;\ntimeNow = new Date();\noutFields[\"TestEstablishStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish2", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Establish2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestEstablishCaseSelected\"] = (byte)0;\ntimeNow = new Date();\noutFields[\"TestEstablishStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Establish3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Establish3", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Establish3", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestEstablishCaseSelected\"] = (byte)1;\ntimeNow = new Date();\noutFields[\"TestEstablishStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match0", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Match0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Match0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - }, - { - "key": "Parameter2", - "value": { - "key": { - "parentKeyName": "Task_Match0", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter2" - }, - "defaultValue": "DefaultValue2" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestMatchCaseSelected\"] = (byte)2;\ntimeNow = new Date();\noutFields[\"TestMatchStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Match1", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match1", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Match1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - }, - { - "key": "Parameter1", - "value": { - "key": { - "parentKeyName": "Task_Match1", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter1" - }, - "defaultValue": "DefaultValue1" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy0ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestMatchCaseSelected\"] = (byte)3;\ntimeNow = new Date();\noutFields[\"TestMatchStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Match2", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match2", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Match2", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - }, - { - "name": "Policy1ContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestMatchCaseSelected\"] = (byte)0;\ntimeNow = new Date();\noutFields[\"TestMatchStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - }, - { - "key": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Task_Match3", - "version": "0.0.1" - }, - "inputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "outputFields": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - }, - "taskParameters": { - "entry": [ - { - "key": "Parameter0", - "value": { - "key": { - "parentKeyName": "Task_Match3", - "parentKeyVersion": "0.0.1", - "parentLocalName": "NULL", - "localName": "Parameter0" - }, - "defaultValue": "DefaultValue0" - } - } - ] - }, - "contextAlbumReference": [ - { - "name": "ExternalContextAlbum", - "version": "0.0.1" - }, - { - "name": "GlobalContextAlbum", - "version": "0.0.1" - } - ], - "taskLogic": { - "key": "_TaskLogic", - "logicFlavour": "MVEL", - "logic": "import java.util.Date;\nlogger.debug(subject.id);\ngc = getContextAlbum(\"GlobalContextAlbum\");\nlogger.debug(gc);\nlogger.debug(inFields);\noutFields[\"TestMatchCaseSelected\"] = (byte)1;\ntimeNow = new Date();\noutFields[\"TestMatchStateTime\"] = timeNow.getTime();\nlogger.debug(outFields);\nreturn true;" - } - } - } - ] - } - }, - "events": { - "key": { - "name": "Events", - "version": "0.0.1" - }, - "eventMap": { - "entry": [ - { - "key": { - "name": "Event0000", - "version": "0.0.1" - }, - "value": { - "key": { - "name": "Event0000", - "version": "0.0.1" - }, - "nameSpace": "org.onap.policy.apex.sample.events", - "source": "Outside", - "target": "Match", - "parameter": { - "entry": [ - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - } - } - }, - { - "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" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - } - } - }, - { - "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" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - } - } - }, - { - "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" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - } - } - }, - { - "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" - } - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - } - } - }, - { - "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" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - } - } - }, - { - "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" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - } - } - }, - { - "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" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - } - } - }, - { - "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" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - } - } - }, - { - "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" - } - } - }, - { - "key": "TestActStateTime", - "value": { - "key": "TestActStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideCaseSelected", - "value": { - "key": "TestDecideCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestDecideStateTime", - "value": { - "key": "TestDecideStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishCaseSelected", - "value": { - "key": "TestEstablishCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestEstablishStateTime", - "value": { - "key": "TestEstablishStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCase", - "value": { - "key": "TestMatchCase", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchCaseSelected", - "value": { - "key": "TestMatchCaseSelected", - "fieldSchemaKey": { - "name": "TestCase", - "version": "0.0.1" - } - } - }, - { - "key": "TestMatchStateTime", - "value": { - "key": "TestMatchStateTime", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - }, - { - "key": "TestSlogan", - "value": { - "key": "TestSlogan", - "fieldSchemaKey": { - "name": "TestSlogan", - "version": "0.0.1" - } - } - }, - { - "key": "TestTemperature", - "value": { - "key": "TestTemperature", - "fieldSchemaKey": { - "name": "TestTemperature", - "version": "0.0.1" - } - } - }, - { - "key": "TestTimestamp", - "value": { - "key": "TestTimestamp", - "fieldSchemaKey": { - "name": "TestTimestamp", - "version": "0.0.1" - } - } - } - ] - } - } - } - ] - } - }, - "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 diff --git a/services/services-engine/src/test/resources/policymodels/SmallModel.json b/services/services-engine/src/test/resources/policymodels/SmallModel.json new file mode 100644 index 000000000..5c0628809 --- /dev/null +++ b/services/services-engine/src/test/resources/policymodels/SmallModel.json @@ -0,0 +1,416 @@ +{ + "apexPolicyModel" : { + "key" : { + "name" : "SmallModel", + "version" : "0.0.1" + }, + "keyInformation" : { + "key" : { + "name" : "SmallModel_KeyInfo", + "version" : "0.0.1" + }, + "keyInfoMap" : { + "entry" : [ { + "key" : { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + }, + "UUID" : "fec1b353-b35f-4384-b7d9-69622059c248", + "description" : "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\"" + } + }, { + "key" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "UUID" : "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3", + "description" : "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\"" + } + }, { + "key" : { + "name" : "BasicPolicy", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicPolicy", + "version" : "0.0.1" + }, + "UUID" : "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043", + "description" : "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\"" + } + }, { + "key" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "UUID" : "c5651414-fc1c-493b-878d-75f0ce685c36", + "description" : "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\"" + } + }, { + "key" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "UUID" : "790ff718-8dc0-44e0-89d8-1b3bbe238310", + "description" : "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\"" + } + }, { + "key" : { + "name" : "SmallModel", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel", + "version" : "0.0.1" + }, + "UUID" : "a1bd1f4e-713b-456b-b1a8-bb48beee28e8", + "description" : "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\"" + } + }, { + "key" : { + "name" : "SmallModel_Albums", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_Albums", + "version" : "0.0.1" + }, + "UUID" : "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22", + "description" : "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\"" + } + }, { + "key" : { + "name" : "SmallModel_Events", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_Events", + "version" : "0.0.1" + }, + "UUID" : "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8", + "description" : "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\"" + } + }, { + "key" : { + "name" : "SmallModel_KeyInfo", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_KeyInfo", + "version" : "0.0.1" + }, + "UUID" : "b4876774-6907-3d27-a2b8-f05737c5ee4a", + "description" : "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\"" + } + }, { + "key" : { + "name" : "SmallModel_Policies", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_Policies", + "version" : "0.0.1" + }, + "UUID" : "5bcf946b-67be-3190-a906-f954896f999f", + "description" : "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\"" + } + }, { + "key" : { + "name" : "SmallModel_Schemas", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_Schemas", + "version" : "0.0.1" + }, + "UUID" : "c25bf5c3-7f1e-3667-b8a9-971ba21517bc", + "description" : "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\"" + } + }, { + "key" : { + "name" : "SmallModel_Tasks", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_Tasks", + "version" : "0.0.1" + }, + "UUID" : "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef", + "description" : "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\"" + } + } ] + } + }, + "policies" : { + "key" : { + "name" : "SmallModel_Policies", + "version" : "0.0.1" + }, + "policyMap" : { + "entry" : [ { + "key" : { + "name" : "BasicPolicy", + "version" : "0.0.1" + }, + "value" : { + "policyKey" : { + "name" : "BasicPolicy", + "version" : "0.0.1" + }, + "template" : "FREEFORM", + "state" : { + "entry" : [ { + "key" : "OnlyState", + "value" : { + "stateKey" : { + "parentKeyName" : "BasicPolicy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "NULL", + "localName" : "OnlyState" + }, + "trigger" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "stateOutputs" : { + "entry" : [ { + "key" : "OnlyOutput", + "value" : { + "key" : { + "parentKeyName" : "BasicPolicy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "OnlyState", + "localName" : "OnlyOutput" + }, + "outgoingEvent" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "nextState" : { + "parentKeyName" : "NULL", + "parentKeyVersion" : "0.0.0", + "parentLocalName" : "NULL", + "localName" : "NULL" + } + } + } ] + }, + "contextAlbumReference" : [ { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + } ], + "taskSelectionLogic" : { + "key" : "NULL", + "logicFlavour" : "UNDEFINED", + "logic" : "" + }, + "stateFinalizerLogicMap" : { + "entry" : [ ] + }, + "defaultTask" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "taskReferences" : { + "entry" : [ { + "key" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "parentKeyName" : "BasicPolicy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "OnlyState", + "localName" : "BasicTask" + }, + "outputType" : "DIRECT", + "output" : { + "parentKeyName" : "BasicPolicy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "OnlyState", + "localName" : "OnlyOutput" + } + } + } ] + } + } + } ] + }, + "firstState" : "OnlyState" + } + } ] + } + }, + "tasks" : { + "key" : { + "name" : "SmallModel_Tasks", + "version" : "0.0.1" + }, + "taskMap" : { + "entry" : [ { + "key" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ { + "key" : "intPar", + "value" : { + "key" : "intPar", + "fieldSchemaKey" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "optional" : false + } + } ] + }, + "outputFields" : { + "entry" : [ { + "key" : "intPar", + "value" : { + "key" : "intPar", + "fieldSchemaKey" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "optional" : false + } + } ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + } ], + "taskLogic" : { + "key" : "TaskLogic", + "logicFlavour" : "JAVASCRIPT", + "logic" : "executor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;" + } + } + } ] + } + }, + "events" : { + "key" : { + "name" : "SmallModel_Events", + "version" : "0.0.1" + }, + "eventMap" : { + "entry" : [ { + "key" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "nameSpace" : "org.onap.policy.apex.events", + "source" : "source", + "target" : "target", + "parameter" : { + "entry" : [ { + "key" : "intPar", + "value" : { + "key" : "intPar", + "fieldSchemaKey" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "optional" : false + } + } ] + } + } + } ] + } + }, + "albums" : { + "key" : { + "name" : "SmallModel_Albums", + "version" : "0.0.1" + }, + "albums" : { + "entry" : [ { + "key" : { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + }, + "scope" : "GLOBAL", + "isWritable" : true, + "itemSchema" : { + "name" : "IntType", + "version" : "0.0.1" + } + } + } ] + } + }, + "schemas" : { + "key" : { + "name" : "SmallModel_Schemas", + "version" : "0.0.1" + }, + "schemas" : { + "entry" : [ { + "key" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Integer" + } + } ] + } + } + } +} diff --git a/services/services-engine/src/test/resources/policymodels/SmallModelDifferent.json b/services/services-engine/src/test/resources/policymodels/SmallModelDifferent.json new file mode 100644 index 000000000..bbee7daa3 --- /dev/null +++ b/services/services-engine/src/test/resources/policymodels/SmallModelDifferent.json @@ -0,0 +1,416 @@ +{ + "apexPolicyModel" : { + "key" : { + "name" : "SmallModelDifferent", + "version" : "0.0.1" + }, + "keyInformation" : { + "key" : { + "name" : "SmallModel_KeyInfo", + "version" : "0.0.1" + }, + "keyInfoMap" : { + "entry" : [ { + "key" : { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + }, + "UUID" : "fec1b353-b35f-4384-b7d9-69622059c248", + "description" : "Generated description for a concept called \"BasicContextAlbum\" with version \"0.0.1\" and UUID \"fec1b353-b35f-4384-b7d9-69622059c248\"" + } + }, { + "key" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "UUID" : "cc8d3c1a-e975-459a-bcd2-69f423eaa1f3", + "description" : "Generated description for a concept called \"BasicEvent\" with version \"0.0.1\" and UUID \"cc8d3c1a-e975-459a-bcd2-69f423eaa1f3\"" + } + }, { + "key" : { + "name" : "BasicPolicy", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicPolicy", + "version" : "0.0.1" + }, + "UUID" : "d0c5d8ee-5fe7-4978-89ce-4a3e69cad043", + "description" : "Generated description for a concept called \"BasicPolicy\" with version \"0.0.1\" and UUID \"d0c5d8ee-5fe7-4978-89ce-4a3e69cad043\"" + } + }, { + "key" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "UUID" : "c5651414-fc1c-493b-878d-75f0ce685c36", + "description" : "Generated description for a concept called \"BasicTask\" with version \"0.0.1\" and UUID \"c5651414-fc1c-493b-878d-75f0ce685c36\"" + } + }, { + "key" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "UUID" : "790ff718-8dc0-44e0-89d8-1b3bbe238310", + "description" : "Generated description for a concept called \"IntType\" with version \"0.0.1\" and UUID \"790ff718-8dc0-44e0-89d8-1b3bbe238310\"" + } + }, { + "key" : { + "name" : "SmallModelDifferent", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModelDifferent", + "version" : "0.0.1" + }, + "UUID" : "a1bd1f4e-713b-456b-b1a8-bb48beee28e8", + "description" : "Generated description for a concept called \"SmallModel\" with version \"0.0.1\" and UUID \"a1bd1f4e-713b-456b-b1a8-bb48beee28e8\"" + } + }, { + "key" : { + "name" : "SmallModel_Albums", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_Albums", + "version" : "0.0.1" + }, + "UUID" : "72bed9af-ab7d-3379-b9f7-b5eca5c9ef22", + "description" : "Generated description for concept referred to by key \"SmallModel_Albums:0.0.1\"" + } + }, { + "key" : { + "name" : "SmallModel_Events", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_Events", + "version" : "0.0.1" + }, + "UUID" : "796dc6b0-627d-34ae-a5e2-1bc4b4b486b8", + "description" : "Generated description for concept referred to by key \"SmallModel_Events:0.0.1\"" + } + }, { + "key" : { + "name" : "SmallModel_KeyInfo", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_KeyInfo", + "version" : "0.0.1" + }, + "UUID" : "b4876774-6907-3d27-a2b8-f05737c5ee4a", + "description" : "Generated description for concept referred to by key \"SmallModel_KeyInfo:0.0.1\"" + } + }, { + "key" : { + "name" : "SmallModel_Policies", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_Policies", + "version" : "0.0.1" + }, + "UUID" : "5bcf946b-67be-3190-a906-f954896f999f", + "description" : "Generated description for concept referred to by key \"SmallModel_Policies:0.0.1\"" + } + }, { + "key" : { + "name" : "SmallModel_Schemas", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_Schemas", + "version" : "0.0.1" + }, + "UUID" : "c25bf5c3-7f1e-3667-b8a9-971ba21517bc", + "description" : "Generated description for concept referred to by key \"SmallModel_Schemas:0.0.1\"" + } + }, { + "key" : { + "name" : "SmallModel_Tasks", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "SmallModel_Tasks", + "version" : "0.0.1" + }, + "UUID" : "43b015ca-2ed1-3a35-b103-e8a5aa68f1ef", + "description" : "Generated description for concept referred to by key \"SmallModel_Tasks:0.0.1\"" + } + } ] + } + }, + "policies" : { + "key" : { + "name" : "SmallModel_Policies", + "version" : "0.0.1" + }, + "policyMap" : { + "entry" : [ { + "key" : { + "name" : "BasicPolicy", + "version" : "0.0.1" + }, + "value" : { + "policyKey" : { + "name" : "BasicPolicy", + "version" : "0.0.1" + }, + "template" : "FREEFORM", + "state" : { + "entry" : [ { + "key" : "OnlyState", + "value" : { + "stateKey" : { + "parentKeyName" : "BasicPolicy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "NULL", + "localName" : "OnlyState" + }, + "trigger" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "stateOutputs" : { + "entry" : [ { + "key" : "OnlyOutput", + "value" : { + "key" : { + "parentKeyName" : "BasicPolicy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "OnlyState", + "localName" : "OnlyOutput" + }, + "outgoingEvent" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "nextState" : { + "parentKeyName" : "NULL", + "parentKeyVersion" : "0.0.0", + "parentLocalName" : "NULL", + "localName" : "NULL" + } + } + } ] + }, + "contextAlbumReference" : [ { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + } ], + "taskSelectionLogic" : { + "key" : "NULL", + "logicFlavour" : "UNDEFINED", + "logic" : "" + }, + "stateFinalizerLogicMap" : { + "entry" : [ ] + }, + "defaultTask" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "taskReferences" : { + "entry" : [ { + "key" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "parentKeyName" : "BasicPolicy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "OnlyState", + "localName" : "BasicTask" + }, + "outputType" : "DIRECT", + "output" : { + "parentKeyName" : "BasicPolicy", + "parentKeyVersion" : "0.0.1", + "parentLocalName" : "OnlyState", + "localName" : "OnlyOutput" + } + } + } ] + } + } + } ] + }, + "firstState" : "OnlyState" + } + } ] + } + }, + "tasks" : { + "key" : { + "name" : "SmallModel_Tasks", + "version" : "0.0.1" + }, + "taskMap" : { + "entry" : [ { + "key" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicTask", + "version" : "0.0.1" + }, + "inputFields" : { + "entry" : [ { + "key" : "intPar", + "value" : { + "key" : "intPar", + "fieldSchemaKey" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "optional" : false + } + } ] + }, + "outputFields" : { + "entry" : [ { + "key" : "intPar", + "value" : { + "key" : "intPar", + "fieldSchemaKey" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "optional" : false + } + } ] + }, + "taskParameters" : { + "entry" : [ ] + }, + "contextAlbumReference" : [ { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + } ], + "taskLogic" : { + "key" : "TaskLogic", + "logicFlavour" : "JAVASCRIPT", + "logic" : "executor.logger.debug(executor.subject.id);\nvar gc = executor.getContextAlbum(\"BasicContextAlbum\");\nexecutor.logger.debug(gc.name);\nexecutor.logger.debug(executor.inFields);\n\nexecutor.logger.debug(executor.eo);\n\nvar returnValue = executor.isTrue;" + } + } + } ] + } + }, + "events" : { + "key" : { + "name" : "SmallModel_Events", + "version" : "0.0.1" + }, + "eventMap" : { + "entry" : [ { + "key" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicEvent", + "version" : "0.0.1" + }, + "nameSpace" : "org.onap.policy.apex.events", + "source" : "source", + "target" : "target", + "parameter" : { + "entry" : [ { + "key" : "intPar", + "value" : { + "key" : "intPar", + "fieldSchemaKey" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "optional" : false + } + } ] + } + } + } ] + } + }, + "albums" : { + "key" : { + "name" : "SmallModel_Albums", + "version" : "0.0.1" + }, + "albums" : { + "entry" : [ { + "key" : { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "BasicContextAlbum", + "version" : "0.0.1" + }, + "scope" : "GLOBAL", + "isWritable" : true, + "itemSchema" : { + "name" : "IntType", + "version" : "0.0.1" + } + } + } ] + } + }, + "schemas" : { + "key" : { + "name" : "SmallModel_Schemas", + "version" : "0.0.1" + }, + "schemas" : { + "entry" : [ { + "key" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "value" : { + "key" : { + "name" : "IntType", + "version" : "0.0.1" + }, + "schemaFlavour" : "Java", + "schemaDefinition" : "java.lang.Integer" + } + } ] + } + } + } +} |