aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/plugins-executor
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-09-04 20:13:38 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-04 20:13:38 +0000
commitf7689b84472ab4698d9d96f1de08402208d99ca8 (patch)
treef003c5aef834f2158726ab678eb9a76e1ae37dac /plugins/plugins-executor
parent25ac320ced13ae5da0e55db5404f62237bdaa491 (diff)
parent87be30582d1db37bee7c6b456c0c5c3ca9584963 (diff)
Merge "Fix checkstyle issues in apex model basic"
Diffstat (limited to 'plugins/plugins-executor')
-rw-r--r--plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java6
-rw-r--r--plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java6
-rw-r--r--plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java6
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutor.java10
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutor.java18
-rw-r--r--plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutor.java18
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java2
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java18
-rw-r--r--plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java18
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutor.java10
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutor.java10
-rw-r--r--plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutor.java10
14 files changed, 68 insertions, 68 deletions
diff --git a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java
index 52b78733a..4fff29092 100644
--- a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaStateFinalizerExecutor.java
@@ -88,10 +88,10 @@ public class JavaStateFinalizerExecutor extends StateFinalizerExecutor {
new Class[] { StateFinalizerExecutionContext.class });
returnValue = (boolean) method.invoke(stateFinalizerLogicObject, getExecutionContext());
} catch (final Exception e) {
- LOGGER.error("execute: state finalizer logic failed to run for state finalizer \"" + getSubject().getID()
+ LOGGER.error("execute: state finalizer logic failed to run for state finalizer \"" + getSubject().getId()
+ "\"");
throw new StateMachineException(
- "state finalizer logic failed to run for state finalizer \"" + getSubject().getID() + "\"", e);
+ "state finalizer logic failed to run for state finalizer \"" + getSubject().getId() + "\"", e);
}
// Do the execution post work
@@ -112,7 +112,7 @@ public class JavaStateFinalizerExecutor extends StateFinalizerExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getID() + "," + getSubject().getLogicFlavour() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getId() + "," + getSubject().getLogicFlavour() + ","
+ getSubject().getLogic());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java
index 6343f1a9f..753f08b7e 100644
--- a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskExecutor.java
@@ -88,9 +88,9 @@ public class JavaTaskExecutor extends TaskExecutor {
new Class[] { TaskExecutionContext.class });
returnValue = (boolean) method.invoke(taskLogicObject, getExecutionContext());
} catch (final Exception e) {
- LOGGER.error("execute: task logic failed to run for task \"" + getSubject().getKey().getID() + "\"");
+ LOGGER.error("execute: task logic failed to run for task \"" + getSubject().getKey().getId() + "\"");
throw new StateMachineException(
- "task logic failed to run for task \"" + getSubject().getKey().getID() + "\"", e);
+ "task logic failed to run for task \"" + getSubject().getKey().getId() + "\"", e);
}
// Do the execution post work
@@ -111,7 +111,7 @@ public class JavaTaskExecutor extends TaskExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ "," + getSubject().getTaskLogic().getLogic());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java
index ee33c52d1..a42ff2cfa 100644
--- a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaTaskSelectExecutor.java
@@ -89,10 +89,10 @@ public class JavaTaskSelectExecutor extends TaskSelectExecutor {
returnValue = (boolean) method.invoke(taskSelectionLogicObject, getExecutionContext());
} catch (final Exception e) {
LOGGER.error(
- "execute: task selection logic failed to run for state \"" + getSubject().getKey().getID() + "\"",
+ "execute: task selection logic failed to run for state \"" + getSubject().getKey().getId() + "\"",
e);
throw new StateMachineException(
- "task selection logic failed to run for state \"" + getSubject().getKey().getID() + "\"", e);
+ "task selection logic failed to run for state \"" + getSubject().getKey().getId() + "\"", e);
}
// Do the execution post work
@@ -113,7 +113,7 @@ public class JavaTaskSelectExecutor extends TaskSelectExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + ","
+ getSubject().getTaskSelectionLogic().getLogicFlavour() + ","
+ getSubject().getTaskSelectionLogic().getLogic());
}
diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutor.java b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutor.java
index 66c036375..7b91c5975 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptStateFinalizerExecutor.java
@@ -61,9 +61,9 @@ public class JavascriptStateFinalizerExecutor extends StateFinalizerExecutor {
compiled = ((Compilable) engine).compile(getSubject().getLogic());
} catch (final ScriptException e) {
LOGGER.error("execute: state finalizer logic failed to compile for state finalizer \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException("state finalizer logic failed to compile for state finalizer \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
}
}
@@ -95,9 +95,9 @@ public class JavascriptStateFinalizerExecutor extends StateFinalizerExecutor {
}
} catch (final ScriptException e) {
LOGGER.error("execute: state finalizer logic failed to run for state finalizer \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException("state finalizer logic failed to run for state finalizer \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
}
returnValue = (boolean) engine.get("returnValue");
@@ -120,7 +120,7 @@ public class JavascriptStateFinalizerExecutor extends StateFinalizerExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getLogicFlavour() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getLogicFlavour() + ","
+ getSubject().getLogic());
engine = null;
}
diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutor.java b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutor.java
index 80f744b5d..38be929c0 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutor.java
@@ -60,9 +60,9 @@ public class JavascriptTaskExecutor extends TaskExecutor {
try {
compiled = ((Compilable) engine).compile(getSubject().getTaskLogic().getLogic());
} catch (final ScriptException e) {
- LOGGER.error("execute: task logic failed to compile for task \"" + getSubject().getKey().getID() + "\"");
+ LOGGER.error("execute: task logic failed to compile for task \"" + getSubject().getKey().getId() + "\"");
throw new StateMachineException(
- "task logic failed to compile for task \"" + getSubject().getKey().getID() + "\"", e);
+ "task logic failed to compile for task \"" + getSubject().getKey().getId() + "\"", e);
}
}
@@ -93,25 +93,25 @@ public class JavascriptTaskExecutor extends TaskExecutor {
compiled.eval(engine.getContext());
}
} catch (final ScriptException e) {
- LOGGER.error("execute: task logic failed to run for task \"" + getSubject().getKey().getID() + "\"");
+ LOGGER.error("execute: task logic failed to run for task \"" + getSubject().getKey().getId() + "\"");
throw new StateMachineException(
- "task logic failed to run for task \"" + getSubject().getKey().getID() + "\"", e);
+ "task logic failed to run for task \"" + getSubject().getKey().getId() + "\"", e);
}
try {
final Object ret = engine.get("returnValue");
if (ret == null) {
LOGGER.error("execute: task logic failed to set a return value for task \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException("execute: task logic failed to set a return value for task \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
}
returnValue = (Boolean) ret;
} catch (NullPointerException | ClassCastException e) {
LOGGER.error("execute: task selection logic failed to set a correct return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
throw new StateMachineException("execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
}
// Do the execution post work
@@ -132,7 +132,7 @@ public class JavascriptTaskExecutor extends TaskExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ "," + getSubject().getTaskLogic().getLogic());
engine = null;
}
diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutor.java
index aa9c6650f..570b33b2a 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskSelectExecutor.java
@@ -60,10 +60,10 @@ public class JavascriptTaskSelectExecutor extends TaskSelectExecutor {
try {
compiled = ((Compilable) engine).compile(getSubject().getTaskSelectionLogic().getLogic());
} catch (final ScriptException e) {
- LOGGER.error("execute: task selection logic failed to compile for state \"" + getSubject().getKey().getID()
+ LOGGER.error("execute: task selection logic failed to compile for state \"" + getSubject().getKey().getId()
+ "\"");
throw new StateMachineException(
- "task selection logic failed to compile for state \"" + getSubject().getKey().getID() + "\"", e);
+ "task selection logic failed to compile for state \"" + getSubject().getKey().getId() + "\"", e);
}
}
@@ -96,26 +96,26 @@ public class JavascriptTaskSelectExecutor extends TaskSelectExecutor {
}
} catch (final ScriptException e) {
LOGGER.error(
- "execute: task selection logic failed to run for state \"" + getSubject().getKey().getID() + "\"");
+ "execute: task selection logic failed to run for state \"" + getSubject().getKey().getId() + "\"");
throw new StateMachineException(
- "task selection logic failed to run for state \"" + getSubject().getKey().getID() + "\"", e);
+ "task selection logic failed to run for state \"" + getSubject().getKey().getId() + "\"", e);
}
try {
final Object ret = engine.get("returnValue");
if (ret == null) {
LOGGER.error("execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException(
"execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
}
returnValue = (Boolean) ret;
} catch (NullPointerException | ClassCastException e) {
LOGGER.error("execute: task selection logic failed to set a correct return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
throw new StateMachineException("execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
}
// Do the execution post work
@@ -136,7 +136,7 @@ public class JavascriptTaskSelectExecutor extends TaskSelectExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + ","
+ getSubject().getTaskSelectionLogic().getLogicFlavour() + ","
+ getSubject().getTaskSelectionLogic().getLogic());
engine = null;
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java
index 41ad359eb..f8f66e5d2 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyStateFinalizerExecutor.java
@@ -113,7 +113,7 @@ public class JrubyStateFinalizerExecutor extends StateFinalizerExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getLogicFlavour() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getLogicFlavour() + ","
+ getSubject().getLogic());
container.terminate();
container = null;
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java
index 8db650fa1..56b28d02e 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskExecutor.java
@@ -113,7 +113,7 @@ public class JrubyTaskExecutor extends TaskExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ "," + getSubject().getTaskLogic().getLogic());
container.terminate();
container = null;
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java
index 85c7ba018..8405f4e60 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyTaskSelectExecutor.java
@@ -114,7 +114,7 @@ public class JrubyTaskSelectExecutor extends TaskSelectExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + ","
+ getSubject().getTaskSelectionLogic().getLogicFlavour() + ","
+ getSubject().getTaskSelectionLogic().getLogic());
container.terminate();
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java
index 71dce5801..e1c0f096a 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskExecutor.java
@@ -67,8 +67,8 @@ public class JythonTaskExecutor extends TaskExecutor {
compiled = Py.compile_flags(logic, filename, CompileMode.exec, new CompilerFlags());
}
} catch (final PyException e) {
- LOGGER.warn("failed to compile Jython code for task " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to compile Jython code for task " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to compile Jython code for task " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to compile Jython code for task " + getSubject().getKey().getId(),
e);
}
@@ -104,24 +104,24 @@ public class JythonTaskExecutor extends TaskExecutor {
final Object ret = interpreter.get("returnValue", java.lang.Boolean.class);
if (ret == null) {
LOGGER.error("execute: task logic failed to set a return value for task \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException("execute: task logic failed to set a return value for task \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
}
returnValue = (Boolean) ret;
} catch (NullPointerException | ClassCastException e) {
LOGGER.error("execute: task selection logic failed to set a correct return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
throw new StateMachineException(
"execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"",
+ + getSubject().getKey().getId() + "\"",
e);
}
}
/* */
} catch (final Exception e) {
- LOGGER.warn("failed to execute Jython code for task " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to execute Jython code for task " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to execute Jython code for task " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to execute Jython code for task " + getSubject().getKey().getId(),
e);
}
@@ -144,7 +144,7 @@ public class JythonTaskExecutor extends TaskExecutor {
@Override
public void cleanUp() throws StateMachineException {
interpreter.cleanup();
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ "," + getSubject().getTaskLogic().getLogic());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java
index d28001d87..4f4d38a19 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonTaskSelectExecutor.java
@@ -66,10 +66,10 @@ public class JythonTaskSelectExecutor extends TaskSelectExecutor {
compiled = Py.compile_flags(logic, filename, CompileMode.exec, new CompilerFlags());
}
} catch (final PyException e) {
- LOGGER.warn("failed to compile Jython code for task selection logic in " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to compile Jython code for task selection logic in " + getSubject().getKey().getId(),
e);
throw new StateMachineException(
- "failed to compile Jython code for task selection logic in " + getSubject().getKey().getID(), e);
+ "failed to compile Jython code for task selection logic in " + getSubject().getKey().getId(), e);
}
}
@@ -104,27 +104,27 @@ public class JythonTaskSelectExecutor extends TaskSelectExecutor {
final Object ret = interpreter.get("returnValue", java.lang.Boolean.class);
if (ret == null) {
LOGGER.error("execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
throw new StateMachineException(
"execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"");
+ + getSubject().getKey().getId() + "\"");
}
returnValue = (Boolean) ret;
} catch (NullPointerException | ClassCastException e) {
LOGGER.error("execute: task selection logic failed to set a correct return value for state \""
- + getSubject().getKey().getID() + "\"", e);
+ + getSubject().getKey().getId() + "\"", e);
throw new StateMachineException(
"execute: task selection logic failed to set a return value for state \""
- + getSubject().getKey().getID() + "\"",
+ + getSubject().getKey().getId() + "\"",
e);
}
}
/* */
} catch (final Exception e) {
- LOGGER.warn("failed to execute Jython code for task selection logic in " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to execute Jython code for task selection logic in " + getSubject().getKey().getId(),
e);
throw new StateMachineException(
- "failed to execute Jython code for task selection logic in " + getSubject().getKey().getID(), e);
+ "failed to execute Jython code for task selection logic in " + getSubject().getKey().getId(), e);
}
// Do the execution post work
@@ -146,7 +146,7 @@ public class JythonTaskSelectExecutor extends TaskSelectExecutor {
@Override
public void cleanUp() throws StateMachineException {
interpreter.cleanup();
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + ","
+ getSubject().getTaskSelectionLogic().getLogicFlavour() + ","
+ getSubject().getTaskSelectionLogic().getLogic());
}
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutor.java b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutor.java
index 8cd76a94d..ea39c6d74 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelStateFinalizerExecutor.java
@@ -59,8 +59,8 @@ public class MvelStateFinalizerExecutor extends StateFinalizerExecutor {
try {
compiled = MVEL.compileExpression(getSubject().getLogic());
} catch (final Exception e) {
- LOGGER.warn("failed to compile MVEL code for state " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to compile MVEL code for state " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to compile MVEL code for state " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to compile MVEL code for state " + getSubject().getKey().getId(),
e);
}
}
@@ -89,8 +89,8 @@ public class MvelStateFinalizerExecutor extends StateFinalizerExecutor {
returnValue =
(boolean) MVEL.executeExpression(compiled, getExecutionContext(), new HashMap<String, Object>());
} catch (final Exception e) {
- LOGGER.warn("failed to execute MVEL code for state " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to execute MVEL code for state " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to execute MVEL code for state " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to execute MVEL code for state " + getSubject().getKey().getId(),
e);
}
@@ -112,7 +112,7 @@ public class MvelStateFinalizerExecutor extends StateFinalizerExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getLogicFlavour() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getLogicFlavour() + ","
+ getSubject().getLogic());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutor.java b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutor.java
index 8599eabac..966a8004a 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskExecutor.java
@@ -59,8 +59,8 @@ public class MvelTaskExecutor extends TaskExecutor {
try {
compiled = MVEL.compileExpression(getSubject().getTaskLogic().getLogic());
} catch (final Exception e) {
- LOGGER.warn("failed to compile MVEL code for task " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to compile MVEL code for task " + getSubject().getKey().getID(), e);
+ LOGGER.warn("failed to compile MVEL code for task " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to compile MVEL code for task " + getSubject().getKey().getId(), e);
}
argumentNotNull(compiled, "MVEL task not compiled.");
}
@@ -89,8 +89,8 @@ public class MvelTaskExecutor extends TaskExecutor {
returnValue =
(boolean) MVEL.executeExpression(compiled, getExecutionContext(), new HashMap<String, Object>());
} catch (final Exception e) {
- LOGGER.warn("failed to execute MVEL code for task " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to execute MVEL code for task " + getSubject().getKey().getID(), e);
+ LOGGER.warn("failed to execute MVEL code for task " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to execute MVEL code for task " + getSubject().getKey().getId(), e);
}
// Do the execution post work
@@ -111,7 +111,7 @@ public class MvelTaskExecutor extends TaskExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + "," + getSubject().getTaskLogic().getLogicFlavour()
+ "," + getSubject().getTaskLogic().getLogic());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutor.java b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutor.java
index 3cb5d9bf6..4991fbade 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutor.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelTaskSelectExecutor.java
@@ -60,8 +60,8 @@ public class MvelTaskSelectExecutor extends TaskSelectExecutor {
try {
compiled = MVEL.compileExpression(getSubject().getTaskSelectionLogic().getLogic());
} catch (final Exception e) {
- LOGGER.warn("failed to compile MVEL code for state " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to compile MVEL code for state " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to compile MVEL code for state " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to compile MVEL code for state " + getSubject().getKey().getId(),
e);
}
}
@@ -90,8 +90,8 @@ public class MvelTaskSelectExecutor extends TaskSelectExecutor {
returnValue =
(boolean) MVEL.executeExpression(compiled, getExecutionContext(), new HashMap<String, Object>());
} catch (final Exception e) {
- LOGGER.warn("failed to execute MVEL code for state " + getSubject().getKey().getID(), e);
- throw new StateMachineException("failed to execute MVEL code for state " + getSubject().getKey().getID(),
+ LOGGER.warn("failed to execute MVEL code for state " + getSubject().getKey().getId(), e);
+ throw new StateMachineException("failed to execute MVEL code for state " + getSubject().getKey().getId(),
e);
}
@@ -113,7 +113,7 @@ public class MvelTaskSelectExecutor extends TaskSelectExecutor {
*/
@Override
public void cleanUp() throws StateMachineException {
- LOGGER.debug("cleanUp:" + getSubject().getKey().getID() + ","
+ LOGGER.debug("cleanUp:" + getSubject().getKey().getId() + ","
+ getSubject().getTaskSelectionLogic().getLogicFlavour() + ","
+ getSubject().getTaskSelectionLogic().getLogic());
}