From 5f0ec1c2d95c377fbec428f11464e93fe442b5ef Mon Sep 17 00:00:00 2001 From: "a.sreekumar" Date: Tue, 29 Jun 2021 13:57:14 +0100 Subject: Cleanup input & outputFields from Task definition 1) Remove the usage of inputField and outputField from Task definition. 2) Fix issues around populating events to task in case of State Finalizer Logic. Change-Id: Ief17f400729410b83c6b7c665980d443e0cf6f28 Issue-ID: POLICY-3336 Signed-off-by: a.sreekumar --- .../plugins/executor/javascript/JavascriptTaskExecutorTest.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutorTest.java b/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutorTest.java index fbf7db864..215491d4e 100644 --- a/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutorTest.java +++ b/plugins/plugins-executor/plugins-executor-javascript/src/test/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptTaskExecutorTest.java @@ -166,19 +166,16 @@ public class JavascriptTaskExecutorTest { internalContext.getContextAlbums().put(contextAlbum.getKey(), contextAlbum); task.getContextAlbumReferences().add(contextAlbum.getKey()); - String parKey0 = "par0"; - task.getOutputFields().put(parKey0, null); - String parKey1 = "par1"; - task.getOutputFields().put(parKey1, null); jte.setContext(null, task, internalContext); - + String parKey0 = "par0"; Map incomingParameters = new HashMap<>(); incomingParameters.put(parKey0, "value0"); AxEvent inEvent = new AxEvent(); inEvent.setParameterMap(Map.of(parKey0, new AxField())); task.setInputEvent(inEvent); + String parKey1 = "par1"; AxEvent outEvent = new AxEvent(); outEvent.setParameterMap(Map.of(parKey0, new AxField(), parKey1, new AxField())); final String eventName = "event1"; -- cgit 1.2.3-korg